Teams Post a Message and set to Important using Flow Designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 02:29 PM
I'm looking for some help in how to use Flow Designer to post a message in a Teams chat with high importance. I have searched the interwebs without any luck. Has anyone done this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2024 05:57 AM
Thank you for your replies, we are testing the suggestions at the moment and I'll update once I know if one worked!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2024 06:10 AM
Sure, you can use the Flow Designer in ServiceNow to post a message in a Teams chat with high importance. Here's a step-by-step guide:
1. **Create a Webhook in Microsoft Teams:**
- Go to the Teams channel where you want to post messages.
- Click on the three-dot menu and select "Connectors".
- Search for "Incoming Webhook" and click "Configure".
- Provide a name for the webhook, upload an image to associate with data from the webhook, and click "Create".
- Copy the webhook URL provided by Teams and click "Done".
2. **Create a Flow in ServiceNow Flow Designer:**
- Navigate to Flow Designer in ServiceNow and click on "New".
- Provide a name for the flow and select a trigger for the flow (e.g., when a record is created or updated).
- Click "Submit" to create the flow.
3. **Add an Action to the Flow to Post a Message to Teams:**
- In the flow, click on "Add Action".
- Search for "Web Request" and select "Make Web Request".
- Paste the webhook URL you copied from Teams into the "Endpoint" field.
- Set the "Method" to "POST".
- In the "Body" field, enter the JSON for the message you want to post. For example:
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"summary": "Issue 1234",
"themeColor": "0078D7",
"title": "Card's title",
"text": "Card's text",
"sections": [
{
"activityTitle": "Activity title",
"activitySubtitle": "Activity subtitle",
"activityImage": "http://example.com/image.jpg",
"facts": [
{
"name": "Fact name",
"value": "Fact value"
}
],
"markdown": true
}
]
}
- Click "Done" to add the action to the flow.
4. **Test the Flow:**
- Trigger the flow in ServiceNow (e.g., by creating or updating a record).
- Check the Teams channel to see if the message was posted.
Please note that Microsoft Teams does not support setting the importance of a message via a webhook. The importance of a message can only be set when sending a message directly in Teams.
nowKB.com