Language: English
In this tutorial we set up an automation that posts a message to a Microsoft Teams channel each time a new record is added to a form — directly from ActivityInfo, with no intermediary service.
We assume the role of a coordinator whose team works in a Teams channel. The team tracks projects in a Projects form, and wants each newly submitted project announced in the channel as it arrives.
What you need
- A form to watch. Ours is a Projects form with a text field Project Name with the code
NAMEand a reference field Partner with the codePARTNER, but any form will do — adjust the field references to yours. - Permission to design the database in ActivityInfo.
- A Microsoft Teams channel, and permission to add a workflow to it. Teams receives webhooks through the Workflows app (the older "Incoming Webhook" Office 365 connectors have been retired by Microsoft).
Step 1: Create a webhook workflow in Teams
- In Teams, go to the channel that should receive the messages and click ⋯ (More options) next to the channel name.
- Select Workflows.
- Choose the webhook template — named "Send webhook alerts to a channel" or "Post to a channel when a webhook request is received", depending on your Teams version.
- Name the workflow, for example "ActivityInfo", confirm the team and channel, and add the workflow.
- Copy the URL Teams displays when the workflow is created — it begins with
https://prod-...logic.azure.com/...or similar.
Step 2: Add the automation
- In ActivityInfo, open the database, select the Projects form, and select Automations in the form's detail pane.
- Select Add automation and name it "Announce new projects in Teams".
- Select Click here to get started and choose the On record added trigger.
- Label the trigger, select Select form, choose the Projects form, confirm, and select Done.
Step 3: Add the webhook step
- Select Add a new step, then Action, then Fire webhook.
- Give the step a label, for example "Post to Teams channel".
- Paste the Teams workflow URL into the Webhook URL field.
- Set the Payload format to Custom, so we can write exactly the message body the Teams workflow expects.
Step 4: Write the message
Select Edit payload.
Enter the message body — a JSON object with a single
textproperty, which the Teams webhook workflow posts to the channel. The${...}references are filled in from the record that fired the automation; the field list on the right inserts them for you:{"text": "New project submitted: ${NAME} by ${PARTNER.NAME}, added by ${_user.name}"}Values are automatically escaped for JSON, so project names containing quotes or line breaks cannot break the message.
Select Done to close the payload editor, and Done again to close the step.
Select Save. The automation is now active.
Step 5: Test
- Add a test record to the Projects form.
- Within moments, the message appears in the Teams channel with the project's details filled in.
Richer messages with Adaptive Cards
The Teams workflow also accepts Adaptive Cards, which can carry headings, bold text, facts, columns, and buttons linking back to ActivityInfo. Design the card, then paste it into the payload editor wrapped in a message envelope, adding ${...} references where the record's values belong:
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "New project submitted"
},
{
"type": "TextBlock",
"text": "**${NAME}** by ${PARTNER.NAME}, added by ${_user.name}",
"wrap": true
}
]
}
}
]
}
Adaptive Card text renders **double asterisks** as bold.
Going further
- Announce only some projects: add a filter step between the trigger and the webhook — for example
CONTAINS(SECTORS, "Health")to announce only health-sector projects. - Announce status changes instead: use the On record edited trigger with the filter
STATUS != _previous.STATUS, and include both values in the message:${_previous.STATUS} → ${STATUS}.
Related articles
- Webhook step — all payload formats in detail
- Send a message to Google Chat when a record is added
- Post a workflow when a webhook request is received in Teams (external link)
- Adaptive Cards designer (external link)