Slack Trigger

Receive Slack messages and events as workflow triggers.

When to Use

Use Slack Trigger when:

  • You want to run a workflow when someone posts a message or mentions your bot
  • You need to react to emoji reactions or channel activity
  • Slack is the event source and your workflow runs asynchronously

For sending messages back to Slack, pair this with Slack Send Message.

Connection

Slack Workspace — required. Use Tensorify's managed Slack app:

  1. Open Connections (or click Manage on the node) and use Add to Slack.
  2. Approve bot scopes in Slack.
  3. Pick that connection on this trigger (and on Slack Send Message if you reply).
Add to Slack

You do not create your own Slack app or paste a Request URL for the managed path. Tensorify receives Events API traffic at a single platform URL and routes by workspace team_id.

Output

HandleTypeDescription
payloadobjectNormalized Slack event payload

The payload (accessed as {{ slack.* }}) shape:

FieldTypeDescription
userstringSlack user ID of the event author
channelstringChannel ID where the event occurred
textstringMessage text (for message and mention events)
timestampstringSlack message timestamp (ts)
thread_tsstringThread parent timestamp, if the message is in a thread
event_typestringEvent type (e.g. message, app_mention, reaction_added)
raw_eventobjectFull Slack event object for advanced use cases

Settings

Events

SettingTypeDefaultDescription
event_typesmulti-selectmessage, app_mentionSlack event types to listen for: message, app_mention, reaction_added, message.channels

Filters

SettingTypeDefaultDescription
channel_filterstring—Only trigger for events in this channel ID. Leave empty to accept all channels.

Testing

SettingTypeDefaultDescription
mockPayloadcode editor (JSON)Sample Slack event JSONJSON body to inject when running this workflow locally for testing.

Fallback: Env Vars

Prefer managed Connections. Only if you run a custom Slack app, configure these on Env Vars:

Env VarDescription
SLACK_BOT_TOKENBot User OAuth Token (xoxb-...) from your Slack app
SLACK_SIGNING_SECRETSigning secret used to verify incoming Slack requests

Example

Canvas

React to bot mentions and reply in the same thread:

  1. Add to Slack under Connections (managed Tensorify app).
  2. Drop Slack Trigger, pick the connection, set event_types to app_mention (and/or message).
  3. Deploy the workflow.
  4. In Slack, /invite the bot into the channel.
  5. Mention the bot or post a message — a run should appear.
  6. Add Slack Send Message with the same connection — Channel {{ slack.channel }}, Thread Timestamp {{ slack.timestamp }} or {{ slack.thread_ts }}, Message Text your reply.

Access event data in downstream nodes:

{{ slack.user }}
{{ slack.text }}
{{ slack.channel }}
{{ slack.event_type }}

The plugin handles Slack's URL verification challenge automatically.

TSL

import slack from @tensorify/slack-trigger:1.0.0
import slack_send from @tensorify/slack-send-message:1.0.0

node trigger @tensorify/slack-trigger:1.0.0 {
    event_types = ["app_mention"]
    channel_filter = ""
}

node reply @tensorify/slack-send-message:1.0.0 {
    channel = "{{ slack.channel }}"
    thread_ts = "{{ slack.timestamp }}"
    text = "Thanks for mentioning me, <@{{ slack.user }}>!"
}

trigger.payload -> reply.input

Common Gotchas

  • Bot messages ignored: Slack does not deliver bot-authored messages by default. Subscribe to app_mention if you want the bot to respond when tagged.
  • Missing scopes: Ensure your Slack app has the OAuth scopes required for the events you subscribe to (e.g. channels:history, app_mentions:read).
  • Channel filter: Use the channel ID (e.g. C01234ABCDE), not the channel name.
  • Signing secret (managed): Platform verifies signatures; you only need SLACK_SIGNING_SECRET for a self-managed custom Slack app.

See Also

On this page