Microsoft Teams approvals with custom connectors

You can use the approvals hub in Microsoft Teams to quickly integrate approvals workflows into existing line of business apps that do not have their own approvals system. You achieve this by using a custom connector to 'connect' to the existing line of business apps.

Tip

When you use the approvals hub, you get to manage all your approvals in a central location.

This article shows you how to:

  • Create a custom connector.
  • Add a trigger and actions to a custom connector.
  • Create an approval flow.
  • Use the approvals hub in Teams to manage approvals that you created with the flow.

Prerequisites

Create a custom connector

  1. Sign in to Power Automate.

  2. Expand Data, and then select Custom connectors.

  3. Select New custom connector, and then Create from blank from the dropdown list.

  4. In the Connector name field, enter a name for the custom connector, and then select Continue.

  5. In General Information, enter a Description and a Host.

  6. At the bottom of the screen, select Security.

  7. Select the authentication type that your API uses.

  8. At the bottom of the screen, select Definition.

Add a trigger

You need a trigger to serve as the first step in the approval flow that you'll create.

Some common approval triggers are:

  • When a new row is created.
  • Wen a row is updated.

Tip

Both Webhook and polling triggers work with approval flows.

  1. Continuing from the earlier steps, select New Trigger in the Triggers list.

    A screenshot that shows the expanded triggers list and the option to create a new trigger.

  2. Enter a Summary, Description, Operation ID, and select a Trigger type.

  3. Select either important or advanced for the visibility the trigger to make the trigger available when you create the approval flow.

  4. Below the Request heading, select Import from sample.

  5. Define the Verb, URL, Headers, and Body for your trigger.

    Screenshot that shows the sample options that you can select.

  6. Add a response.

    The response configuration depends on your trigger type (Webhook or polling). Webhook triggers require a callback URL parameter and a location header that contains a value that's used to delete the Webhook registration.

  7. Configure the Webhook Response and Trigger configuration.

  8. Configure the polling response to meet your needs.

  9. Configure the trigger to meet your needs.

Create an approval flow

Now that you've created your custom connector, it's time to create your approval flow that uses the custom connector.

  1. Sign in to Power Automate.

  2. Select New flow, and then select Automated cloud flow.

  3. Select Skip on the Build an automated cloud flow screen.

  4. Select the Custom tab, and then select your new custom connector.

  5. Select a trigger from your custom connector.

  6. Select New step.

  7. Search for "approvals", and then select Start and wait for an approval.

  8. Select the Approval type, and then populate the required fields on the Start and wait for an approval card.

  9. Select New step > Control > Condition.

  10. Select the Choose a value text box, and then search the dynamic content for "Responses Approver response".

  11. Update the condition with the desired result.

    Important

    The "Approve" or "Reject" approval responses are case sensitive.

    Completed condition card.

  12. Add an action in both condition result sections.

    Condition branches populated with actions.

Manage approvals generated by the approval flow

  1. Sign in to Microsoft Teams.

  2. Search for the approvals app, and then select it.

  3. View your received and sent approvals.

  4. Take an action that activates your custom connector’s trigger.

  5. View the new approval request in flow run history.

  6. View the new approval request in the approvals app.

  7. Select the approval request, review the details, and then select Reject or Approve.

    Reject or approve the request.

  8. View the completed approval request in flow run history.

  9. View the completed approval request in approvals app.

  10. Confirm in the target system the approval completion update steps were executed successfully.

See also