Start a flow
When a chat command arrives
Starts the flow from a Slack slash command or button, or a Teams message or card button, with no AI involved.
Nodes › TriggersOpen in Neblex
- Good for
- ChatOps
- Role
- Starts a flow
- Find it in
- Nodes › Triggers
When to use it
- People should start a flow from Slack or Teams with a command such as /deploy api env=prod.
- A button in a chat message should approve or run something.
- The flow should reply in the conversation when it is done.
Reach for something else when
AI agentWhen the person should talk to an AI agent rather than type a fixed command.Form (starts flow)When the input needs a form with validated fields.
Example
/deploy api env=prod in Slack starts a deployment flow that replies at once and posts the outcome when it is done.
How it works
- Settings
- Chat app: Slack or Microsoft Teams; Chat URL: the address to give the chat app (
/api/hooks/{workspace}/{flow}/chat); for Slack, Slack signing secret: a connection holding your Slack app's signing secret; for Teams, Bot app ID: your Azure Bot's Microsoft App ID; Commands: the commands it answers, separated by commas [every command]; Reply: what the person sees at once [nothing]. - Behaviour
- In Slack, set the Chat URL as the Request URL of each slash command and as the Interactivity Request URL for buttons; in Teams, as the bot's messaging endpoint. Only an active flow answers. Every Slack request is checked with the signing secret and must be at most five minutes old; every Teams request must carry a token Microsoft signed for your bot. Each command or button press starts one run, also if the chat app sends it again, with one record:
platform,command,text,args(the command's words; quotes keep words together),params(itsname=valuewords; for a Teams card button, the fields of its data),user,channel,teamandaction(the button pressed). A Slack button's command is its action id and its text its value. In Teams the command is the first word of the message (a mention of the bot is left out), or thecommandfield of a card button's data. Slack addsresponse_urlandtrigger_id, so a later step can post the result; Teams addsservice_url,activity_idandbot, so a Teams step can answer in the conversation. A command the flow does not answer starts nothing. When the run cannot start (the monthly runs are used up, the flow is busy), Slack shows the person why; Teams is told to send it again. - Example
/deploy api env=prodin Slack starts a deployment flow withparams.env=prod, which replies "Deploying api to prod" at once and posts the outcome toresponse_urlwhen it is done.
Add it to a flow
- Open the flow from Build › Workflows.
- Open Nodes and find When a chat command arrives under Triggers. Drag it onto the canvas as the first step.
- Connect it to the next step and open its settings with ✎ Edit.
- Save and test with Run, then set the flow Active so it starts on its own.
More in Start a flow
WebhookStarts the flow the moment another system calls its address.Nodes › TriggersForm (starts flow)Starts the flow when someone submits a form, with their answers as the input.Nodes › TriggersScheduleRuns the flow on a repeating interval or at set times.Nodes › TriggersPoll for changesChecks a system regularly and starts a run only for records that are new or changed.Nodes › TriggersLive streamSubscribes to a queue, topic or stream and runs the flow for each message as it arrives.Nodes › TriggersWhen calledMakes the flow callable by other flows, the API and AI agents, with a declared input and output.Nodes › Triggers