rencore.com (opens in a new tab) Start a trial (opens in a new tab)

Send a Teams notification for policies

Last updated Automation

AI summary

You can automatically notify your team by posting messages to a Teams channel whenever automations run, such as when policies are violated. Set up an incoming webhook in Teams and create an automation action that sends a custom notification message. The automation allows you to specify the trigger condition and customize the message content to inform your team about governance events.

Post a message to a Teams channel whenever an automation runs, for example on a policy violation. You first create an incoming webhook in Teams, then an automation that uses it.

Before you begin

  • Your Rencore role includes the Create Automation permission. Owner, Admin and Contributor have it. See Rencore roles.
  • You can add connectors to the Teams channel that should receive the message.
  • The Send message to a static Teams channel action uses the “Incoming Webhook” connector of Microsoft Teams and sends the message as a connector card. Microsoft is retiring Office 365 connectors in Teams, and a Workflows webhook URL has not been tested with this action. If your channel cannot add an “Incoming Webhook” connector, use the Post a message to a Teams channel action instead. It posts to the channel through Microsoft Graph and needs no webhook.

Steps

Create a Teams webhook

  1. Open the Microsoft Teams client.

  2. Go to the team and channel where you want to send the notification.

  3. Open the action menu of the channel and click Connectors.

    Teams Connectors
  4. Search for “Webhook”.

    Webhook Search
  5. Click Add next to the “Incoming Webhook” connector, then Add on the connector detail dialog.

    Add Webhook
  6. Enter a name and upload an image, for example the Rencore Governance logo.

    Webhook Setup
  7. Click Create.

  8. Click the Copy Icon next to the webhook URL field.

    Webhook URL
  9. Click Done.

Create the automation

  1. Go to Automation > Add Automation > Create Custom Automation.
  2. Set the trigger (e.g. on policy violation) and its settings (e.g. Disabled user accounts with assigned licenses), then click Next.
  3. Click + to add an action.
  4. Search for “Send message to a static Teams channel” and click Send message to a static Teams channel.
  5. Paste the copied URL into the Webhook URL field.
  6. Enter your name in Sender.
  7. Enter the message to post to the channel in Body (e.g. Quick Reminder, that {{User.DisplayName}}/{{User.UserEmail}} currently still has Licenses assigned to them, although they have been deleted. Please look into this and remove it where applicable.).
  8. Click Test Action to test the notification.
  9. Click Save.
  10. Click Next at the top of the page.
  11. Enter a Title, Description, Category and Icon for the automation.
  12. Click Done.
  13. Click Save and enable to turn the automation on, or Save as draft to save it without enabling it.

Frequently asked questions

Which permission do I need to create a Teams notification automation?

Your Rencore role must include the Create Automation permission. Owner, Admin and Contributor have it.

What can I do if my Teams channel cannot add an incoming webhook connector?

Use the Post a message to a Teams channel action instead. It posts to the channel through Microsoft Graph and needs no webhook.

Can I use a workflows webhook URL with the send message to a static Teams channel action?

This has not been tested. The Send message to a static Teams channel action uses the Incoming Webhook connector of Microsoft Teams and sends the message as a connector card. Microsoft is retiring Office 365 connectors in Teams.

How do I get the webhook URL for the Teams channel?

In Teams, open the channel action menu, click Connectors, and add the Incoming Webhook connector. Enter a name, click Create, then click the Copy Icon next to the webhook URL field.

How can I test the Teams notification before turning on the automation?

Click Test Action after you enter the Webhook URL, Sender and Body in the Send message to a static Teams channel action. Then click Save. You can later choose Save as draft to keep the automation disabled.