Slack Web API

Slack is a cloud-based set of proprietary team collaboration tools and services.

Integration with LogicHub

Connecting with Slack

To connect to Slack following details are required:

  • Label: Connection name.
  • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
  • Slack Application token: Slack Application token for the application used.

Actions with Slack

Post Message - Channel

Post a message on Slack channel.

Inputs to this Action

  • Connections: Choose a connection that you have created.
  • Message Template: Jinja-templated message string that will be posted on slack. Example: '{{message_col}}'.
  • Channel Name: Jinja templated Channel name. Example: {{channel_name_column_name}}

Output of Action
JSON containing the following items:

  • has_error: True/False
  • error: message/null
  • result: Success message string
{
   "result":"Successfully posted message to Slack",
   "error":null,
   "has_error":false
}

Post Message - User

Post a message on Slack directly to a user

Inputs to this Action

  • Connections: Choose a connection that you have created.
  • Message Template: Jinja-templated message string that will be posted on slack. Example: {{message_col}}
  • User Name: Jinja templated User name. Example: {{user_name_column_name}}

Output of Action
JSON containing the following items:

  • has_error: True/False
  • error: message/null
  • result: Success message string
{
   "result":"Successfully posted message to Slack",
   "error":null,
   "has_error":false
}

Posting message to private channels

  • Open the channel in slack app.
  • Type / to open the command palette
  • Click on Add apps to this channel
  • Search for your app and click on it.
  • Now you will see a successful addition message on the channel.
  • You can now use this channel with this App in the integration.

Did this page help you?