Posting to Microsoft Teams with workflows

Does your team work in Microsoft Teams? A workflow can post a message in a Teams channel, for example when your AI agent finds a lead or a chat needs a follow-up.

tawk.to has no Teams step, so you connect the two yourself. In Teams, you create a workflow that receives messages. In tawk.to, an HTTP request step sends them. You copy a URL and a short message template, and you do not write code.

Time: about 20 minutes.

What you can and cannot do

You canPost a message to a Teams channel, private channels too. Put live details in it, for example a lead's name, email address and need, or an AI summary of the chat.
You cannotReply to the visitor from Teams. Put the visitor's name, email address or chat messages straight into the message: they must come from your AI agent or an AI step (see What you can put in the message below).
You needThe property admin role in tawk.to, and a Teams account that can use the Workflows app in your channel. The Teams template in this guide does not need a premium Power Automate license.
Compared to SlackSlack has a built-in step, so it is quicker to set up. See Sending Slack alerts with workflows.
Note: Microsoft retired the old Incoming Webhook connector for Teams in May 2026. Use the Workflows app in Teams, as in this guide.

Step 1: Create a workflow in Teams

  1. In Teams, go to the channel for your alerts.
  2. Next to the channel name, click More options (…).
  3. Click Workflows.
  4. Search for and select the Send webhook alerts to a channel template.
  5. Follow the steps on the screen. Check that the team and channel are correct, then save the workflow.
  6. Copy the webhook URL that Teams shows.
Important: Anyone who has this URL can post to your channel. Keep it private.

The Teams workflow belongs to the person who created it. If that person leaves your company, the alerts can stop. To prevent this, add a colleague as a co-owner of the workflow in Power Automate.

For more, see Microsoft's guide Send messages in Teams using incoming webhooks.

Step 2: Add an HTTP request step in tawk.to

  1. Open your workflow in Automations > Workflows.
  2. Click Add step.
  3. Click Action.
  4. In Category, select Developer tools.
  5. In Action, select HTTP request.
  6. In URL, paste the URL from Teams.
  7. In Method, select POST.
  8. In JSON body, paste the template below.
  9. Change the text in the "text" lines to suit your alert.
  10. Click Save.
You do not need any Headers. tawk.to sends the body as JSON.
Each TextBlock is one line in the Teams message. To add a line, copy a TextBlock line and change its text. Put a comma between lines, but not after the last one.

Note: The JSON body must be valid JSON, or you cannot save the step. Keep each {{ }} value inside quotation marks, as in the template. tawk.to inserts the details safely, even when they contain quotation marks or line breaks.

What you can put in the message

Workflow starts fromWhat you can useExample
Your AI agent (AI agent trigger)The details that the agent collects{{trigger.name}}, {{trigger.email}}, {{trigger.need}}
A chat (for example Chat transcript created)The output of an AI step that summarizes the chat{{nodes.<step ID>.output}}
An earlier stepIts outputA new ticket number or deal ID
Why chats need an AI step: the visitor's name, email address and chat messages are private details. An HTTP request cannot send them, because only Slack steps and conditions can use them. An AI step can read them, though. Ask it for a short summary with the name, email address and need, then put its output in the message.

The quickest start is the Qualified lead hand-off template. Your AI agent already collects the name, email address and need there, and the template above uses those details. Delete the template's Send Slack notification step and add the HTTP request step in its place.

For every detail you can use, see Using runtime data in workflows.

Step 3: Test it

  1. In the Settings tab, turn on Enabled and click Save.
  2. Click the Runs tab.
  3. Click Run now.
  4. In Trigger data (JSON), change the sample values to a test name and email address.
  5. Click Run now.
  6. Check your Teams channel for the message.
  7. Click the run to see the HTTP status.
A status from 200 to 299 means that Teams accepted the message.

Important: Run now starts a real run, so every step runs. A test of Qualified lead hand-off, for example, also creates a real deal.

If it does not work

What you seeWhat to do
The run failed with status 400Teams did not accept the message. Compare the JSON body with the template: only the "text" lines should differ.
The run failed with status 401 or 403The Teams workflow does not accept messages from tawk.to. Use the Send webhook alerts to a channel template, not a version that accepts messages only from specific people.
The run failed with status 404The Teams workflow was deleted or turned off. Turn it on, or create a new one and paste its URL.
The run succeeded, but no message arrivedOpen the workflow in Teams or Power Automate and check its run history for errors.
By default, any status outside 200 to 299 fails the step and stops the run. If later steps should still run, turn on Continue even if the request fails in the step. Later steps can then check the HTTP status.

For more about runs and errors, see Testing, monitoring and troubleshooting workflow runs.

Good to know

  • Limits in Teams: a message can be up to 28 KB. Teams slows down workflows that send more than 4 messages a second.
  • Copies: a copy made with Duplicate keeps the HTTP request step and its URL. Check that the copy should post to the same channel before you turn it on.

Related guides


Have a question we haven't covered or need support?

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us