As more and more organizations move towards remote work, communication and collaboration tools have become essential for seamless and efficient workflows. Microsoft Teams is one such tool that allows teams to communicate, collaborate, and stay productive from anywhere. Teams Approvals is a feature within Microsoft Teams that enables users to create, manage, and track approvals directly within Teams. On the other hand, ServiceNow is a powerful platform for managing workflows, incidents, and service requests. Integrating Teams Approvals with ServiceNow can streamline approval processes and improve overall efficiency.
There are different ways to implement this integration, but in this post, we will discuss two scenarios. The first scenario involves setting up a scheduler trigger on Power Automate to retrieve pending approvals from Teams Approvals and update them in ServiceNow. The second scenario involves receiving pending approvals directly in ServiceNow and updating them accordingly. By the end of this post, you'll have a better understanding of how to integrate Microsoft Teams Approvals with ServiceNow and the benefits it can bring to your organization.
ServiceNow provides a free development environment called the Now Platform (https://developer.servicenow.com/dev.do), which enables developers to quickly build, test, and deploy applications to improve workflows and productivity within their organizations. With a free account on the Now Platform, you can start building powerful applications that leverage ServiceNow's advanced capabilities for workflow management, incident management, and service requests. Whether you're an experienced developer or just getting started, the Now Platform offers a flexible and easy-to-use environment for creating custom solutions tailored to your organization's unique needs.
Go to the Microsoft Teams website (https://www.microsoft.com/en-us/microsoft-teams/group-chat-software) and click on the "Sign up for free" button.
Enter your email address and click on "Next". If you already have a Microsoft account, you can sign in with that account.
Create a new password and click on "Sign up".
Follow the prompts to complete the setup process, such as entering your name and company information.
Once your account is set up, you can download the Microsoft Teams app on your desktop or mobile device and start collaborating with your team.
With a free Microsoft Teams account, you can chat with colleagues, make voice and video calls, share files, and collaborate on projects from anywhere. Plus, with its seamless integration with other Microsoft products, such as Office 365 and SharePoint, Microsoft Teams can help streamline your organization's workflows and improve productivity.
Microsoft provides a free Power Automate environment (https://powerautomate.microsoft.com/en-us/#home-signup), which enables users to automate workflows across multiple applications and services. With Power Automate, you can create automated processes, such as approvals, notifications, and data synchronization, to save time and increase efficiency. Whether you're a business user or a developer, the Power Automate environment provides an intuitive and easy-to-use interface for creating and managing workflows. Plus, with its seamless integration with other Microsoft products, such as Teams and SharePoint, Power Automate can help streamline your organization's workflows and improve collaboration.
First, ensure that you have a valid account for both Microsoft Teams and ServiceNow, as well as access to Power Automate.
Here's a scenario on how to integrate Microsoft Teams Approvals with ServiceNow using Power Automate's scheduled trigger:
Open a web browser and go to the Power Automate portal.
Sign into Power Automate using your Microsoft account or organizational account.
Once you're signed in, you should see the Power Automate portal dashboard. On the left-hand menu, click on "Create" to create a new flow.
Choose a template from the available options, or start from scratch by selecting "Instant - from blank" or "Scheduled - from blank" depending on whether you want to trigger the flow manually or automatically at a scheduled time.
The "Instance name" field should contain the name of your ServiceNow instance, such as "myinstance.service-now.com". The "Username" and "Password" fields should contain your ServiceNow login credentials.
In case you want to know more about the ServiceNow tables, ServiceNow provides the REST API Explorer, which is a web-based tool that allows you to explore and test the ServiceNow REST APIs. You can use the REST API Explorer to understand the different REST APIs provided by ServiceNow and how to use them to perform various operations on your ServiceNow instance. It is available within your ServiceNow instance under the "System Web Services" menu.
This is the query value: state=requested^sys_updated_on>@{getPastTime(30,'Minute','yyyy-MM-ddTHH:mm:ss')}
In the "Select an output from previous steps" box, select the value result from the "Format pending approval result" step.
Click on the "Add an action" button to add a new action to the step.
In the search bar, type "ServiceNow" and select the "ServiceNow" connector from the list of available connectors. Choose the "Get Record" connector:
This step is needed to get the details about the approval, like short description, description and opened by.
In the System ID field, select the value Approval for.
Click on the three dots (...) in the top right corner of the "Get Record" step to access the dropdown menu. Select Rename, and in the "Rename step" dialog box, enter "Get Task Detail" as the new name for the step.
Click on the "Add an action" button to add a new action to the step. This step is to get the approver email.
In the search bar, type "ServiceNow" and select the "ServiceNow" connector from the list of available connectors. Choose the "Get Record" connector.
In the Record Type field, make sure to select the second "User" item in the dropdown list, which corresponds to the "user" table and not the first one which is for the staging environment.
In the System ID field, select the value Approver.
Click on the three dots (...) in the top right corner of the "Get Record" step to access the dropdown menu. Select Rename, and in the "Get Approver email" dialog box, enter "Get Task Detail" as the new name for the step.
Repeat the steps 19-21 to get the requestor email.
In the System ID field, select the value Opened By.
Follows the expected result:
The next step is sending the approval request to Microsoft Teams Approvals app.
Select Approve/Reject - Everyone must approve for the Approval type field.
Select the Short description for the title, the approver email for the Assigned to field and the description for the details field.
This action will update the corresponding approval records in ServiceNow with the latest information retrieved from Microsoft Teams.
In the Record Type field, make sure to select the second "Approval" item in the dropdown list, which corresponds to the "approval" table from production environment and not the first one which is for the staging environment.
In the System ID field, select the Sys ID from the Get pending approvals step.
In the Comments field, select the Responses Comments from the Start and wait for an approval step.
In the State field, inform the value approved.
Repeat the steps 32-35, but add the new action inside the If not step and the value rejected for the State field.
Save the flow and enable it to run at the scheduled interval you specified.
As approvals are requested and processed in Microsoft Teams, the scheduled flow will retrieve the pending approvals and update the corresponding records in ServiceNow.
Access Microsoft Teams, open the Approvals App and observe that ServiceNow pending approvals will be there:
This topic is covered in the part 2.
The following article demonstrates how to use Logic Apps (or Power Automate) to detect approval requests on ServiceNow and enable approvers to approve or reject requests directly from Teams via Adaptive Cards and Logic Apps.
Furthermore, the fact that this solution does not require premium connectors and only requires user access that is cheap is a significant advantage. This means that even smaller organizations with limited budgets can benefit from this solution and automate their approval processes without having to invest heavily in expensive tools and software. Overall, this solution seems like an excellent way to automate approval processes and improve the efficiency of organizational workflows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.