Example: send Teams notification

This article briefly teaches how to send ticket notifications via Microsoft Teams integration using a webhook.

1. Add Teams connector

First, you need to add the webhook feature in Teams to enable communication with the system. The following explanation uses the Teams desktop application; for other methods, refer to https://support.microsoft.com/zh-tw/teams Help Center.

Create Incoming WebHook

Click the “…” item in the left menu, then search for Incoming WebHook and click Incoming WebHook.

Add to current team

Click the “Add to team” button, choose the team or channel you want to send to, then click “Configure connector.”

Enter relevant information

Enter the WebHook name and other information in order, then click “Create” to add it.

Finally, we need to copy the URL below, which will be used later in FIRST LINE’s Webhook settings to send notifications.

2. Add Webhook script

Next, you need to call the API URL via a “Webhook script,” so go to the webhook script settings in the left menu and add one.

First set the basic webhook information in order

  • Webhook name: enter “Teams Ticket Notification”; you can adjust this as needed.

  • Request URL: paste the URL you copied earlier from Teams.

  • Request method: choose POST.

  • Parameters: enter the following JSON format; you can adjust it according to the data to be transmitted, and the message format can refer to Office 365 Connectors API Reference.

3. Add automation

Finally, after creating the “Send LINE Notification” Webhook script, it will not run automatically, so we need to set the desired conditions via the “Automation” feature and select this “Webhook” as the trigger in the “Actions.”

According to the example scenario, when a staff member creates a ticket with priority set to urgent, a notification will be sent to Teams, so configure as follows

  • Automation name: enter “Urgent Ticket Teams Notification” for easy identification.

  • Operation trigger source: choose the “Staff system operation” item.

  • When triggering a specified event: choose “When record is created”; updates will not cause repeated sends.

  • Meet specific conditions: add “Priority” and set it to trigger only when it is “Urgent.”

  • Execute the following action: choose “Run Webhook script” and select the “Teams Ticket Notification” created in the previous step.

Now, when a support agent creates an urgent ticket, the Teams team or channel you specified will receive a notification from FIRST LINE 😊.

Last updated