Sending Slack alerts with workflows
Your team works in Slack, but your chats, leads and tickets are in tawk.to. A workflow can post to a Slack channel when something needs attention, for example when your AI agent finds a lead or a visitor gives a chat a thumbs-down.
Workflows have a built-in Slack step, so all you need from Slack is a webhook URL for each channel.
Time: about 10 minutes. Most of it is in Slack.
Workflows have a built-in Slack step, so all you need from Slack is a webhook URL for each channel.
Time: about 10 minutes. Most of it is in Slack.
What you can and cannot do
| You can | Post to any Slack channel, public or private, with a different channel for each step. Put live details in the message, for example the visitor's name and email address, their last message, an AI summary or a new ticket number. |
| You cannot | Reply to the visitor from Slack, add buttons to the message or put the full chat transcript in it. To include the chat, add an AI step that summarizes it and put the summary in the message. |
| You need | Someone who can add an app to your Slack workspace. Workflows itself is on all plans. |
Step 1: Create a Slack incoming webhook
An incoming webhook is a private web address for one Slack channel. Whatever tawk.to sends to it, Slack posts in that channel.
Each channel needs its own webhook. To post to two channels, repeat these steps.
- Open Slack's guide to incoming webhooks and follow it to create a Slack app for your workspace.
- In your app, turn on Incoming Webhooks.
- Click Add New Webhook.
- Select the channel for your alerts.
- Copy the webhook URL. It starts with https://hooks.slack.com/.
Each channel needs its own webhook. To post to two channels, repeat these steps.
Step 2: Add a Slack step to your workflow
- Open your workflow in Automations > Workflows.
- Click Add step.
- Click Action.
- In Category, select Communication.
- In Action, select Send Slack notification.
- Under Slack channel for this step, paste your webhook URL in Slack webhook URL.
- In Channel label (optional), type the channel name, for example #sales.
- Click Apply.
- Type the Message.
- Type a Title if you want one.
- Click Save.
The message can be up to 4,000 characters, and the title up to 200.
What you can put in a message
The message can carry live details about each run. Click Available runtime data in the step to see every detail that this workflow offers. What you can use depends on what starts the workflow:
| Workflow starts from | You can use |
|---|---|
| A chat (for example Chat transcript created) | {{record.visitorName}}, {{record.visitorEmail}}, {{record.lastMessage}}, {{record.rating}} |
| Your AI agent | The details that the agent collects, for example {{trigger.name}} and {{trigger.email}} |
| An earlier step | Its output, for example an AI summary {{nodes.<step ID>.output}} or a new ticket number |
For example, for a lead that your AI agent hands over:
The visitor's name, email address and messages are private details. A Slack step can use them, but most other actions cannot. For the full rules, see Using runtime data in workflows.
- Title: New lead from the AI agent
- Message: {{trigger.name}} ({{trigger.email}}) wants: {{trigger.need}}
The visitor's name, email address and messages are private details. A Slack step can use them, but most other actions cannot. For the full rules, see Using runtime data in workflows.
Start from a template that already posts to Slack
Many templates have a Send Slack notification step built in. You paste your webhook URL in the Finish setting up this template checklist, and the template is ready to turn on.
| Template | Posts when |
|---|---|
| Never miss a new conversation | Nobody replies to a new conversation in 5 minutes |
| First-response SLA guard | A new ticket has no agent reply after 4 hours |
| Bad-rating recovery | A visitor gives a chat a thumbs-down |
| Qualified lead hand-off | Your AI agent finds a lead |
| Escalate to a human | Your AI agent hands a chat to your team |
| Request a call-back | A visitor asks your AI agent for a call |
For more ideas and what each one needs, see What can I automate using workflows?
Post the result of every run
You can also send the result of each run to Slack without a Slack step. This suits workflows that end with an AI step, such as a weekly summary.
- Open the Settings tab of the workflow.
- Turn on Post run output to Slack.
- Under Run output channel, paste a webhook URL and click Apply.
- Click Save.
Good to know
- A workflow with an unconnected Slack step cannot be saved. You see No Slack destination is configured. Connect a webhook as in step 2, or delete the Slack step. In a template, click the trash icon next to Slack channel in the checklist.
- Copies do not keep Slack channels. When you click Duplicate, the copy has no Slack destinations, and Post run output to Slack starts off. Connect each channel again before you turn on the copy.
- A removed webhook makes the step fail. If someone removes the webhook or the app in Slack, the Slack step fails on the next run. You see this in the Runs tab. Create a new webhook, then click Replace in the step and paste the new URL. See Testing, monitoring and troubleshooting workflow runs.
- Microsoft Teams has no built-in step, but you can post to it with an HTTP request. See Posting to Microsoft Teams with workflows.
Related guides
Have a question we haven't covered or need support?
- Chat with us (live chat is available 24/7)
- Visit our Feedback page
- Schedule a call with us
