Skip to main content

Slack

Messaging and sheets

The Slack connector posts messages to a Slack channel through an incoming webhook, and optionally through a bot token from your own Slack app.

When to use it​

  • A run tells a channel that something finished, failed or needs a person.
  • The Human Approval node asks for its decision in Slack.

This connector sends messages only. To read Slack content, use the Generic REST API connector.

What you need​

  • An incoming webhook URL for the target channel, created in your Slack app's Incoming Webhooks settings.
  • For the bot path: the same Slack app's Client ID and Client Secret, the DataLug Redirect URI added to the app's redirect URLs under OAuth & Permissions, and the bot scopes chat:write and chat:write.public.

Connect​

The connection form lists its steps on the left. Open any step from that list. The Environments step holds the values that differ per environment.

Test connection is in the form footer. Beside it, Test against picks Base, the connection as saved, or an environment, whose values are applied first.

FieldStepWhat to enter
CredentialAuthenticationWebhook or OAuth. Default Webhook.
Incoming Webhook URLAuthenticationRequired for both. Such as https://hooks.slack.com/services/....
Client IDAuthenticationOAuth only. From the Slack app's Basic Information page.
Client SecretAuthenticationOAuth only. From the same page.
Redirect URIAuthenticationOAuth only. Filled in. Add it to the Slack app as a redirect URL.
Bot Access TokenAuthenticationOAuth only. Filled in when you press Connect Slack and approve the app.
Default Channel (Optional)ConnectionSuch as #alerts. A message can name its own channel.
Default Bot Name (Optional)OptionsThe sender name shown in Slack.
Default Icon Emoji (Optional)OptionsSuch as :robot_face:.

The Redirect URI is filled in for you. Copy it with the copy button and add it to the app registration exactly as shown. Use Edit beside the field only when the app is registered against a different address for DataLug.

The webhook URL is required even when you add the bot token. A connection with only a bot token does not save. When a bot token is present, messages are sent with it.

Stored secrets are never sent back to the browser.

Supported operations​

Post Message on a Notification node. The action sets the Notification type, the Channel, the Sender name and the Message. Blank values use the connection defaults.

The message is a template. It takes the same placeholders as an email, such as {{sys.execution.id}}, {{vars.exec.myKey}} and {{sample.firstRow.field}}.

Limits​

  • Messages through one connection to one channel are sent at most one per second. Extra messages wait their turn.
  • An incoming webhook posts only to the channel it was created for. A channel name on the action applies to the bot path.

Troubleshooting​

  • Test connection passes but nothing arrives. The credential is valid and the destination is wrong. Check the channel on the action, then the connection default.
  • Messages reach one channel and not another. With the bot path, invite the app to each private channel it posts to. With a webhook, create one webhook per channel.
  • The message is sent but looks wrong. Build it with a Message node first and preview it there. The connector sends what it is given.