Skip to main content

In Power Automate, we receive direct approval requests in Microsoft Teams for the approval process. Similarly, is there a way to receive approval requests in Microsoft Teams when a bot runs in Automation Anywhere, without using Copilot for approvals?

@sushhhh you could use Microsoft Teams Graph API and the REST web services package to setup approval requests via your control room. Alternatively, you can also search our Bot Store for a Microsoft Teams package: https://botstore.automationanywhere.com/


Hi ​@sushhhh ,

 

It is possible. Here is a short demo of the same. 

 

Automation 360 Release . 30 | Streamline Complex Processes with Multi-User Approvals - YouTube

 

Here is how you can integrate A360 with MS Teams. 

 

MS-Teams-Integration/Automation Anywhere/manifest.json at main · AutomationAnywhere/MS-Teams-Integration · GitHub


May be you can try configuring incoming Webhooks which can be called via REST Actions within AA taskbot without using Automation Copilot.


Can anybody please share how to develope the api task bot in automation anywhere so that whwn a process is running, the approver gets a notification in their microsoft teams for approval.


@sushhhh you could use Microsoft Teams Graph API and the REST web services package to setup approval requests via your control room. Alternatively, you can also search our Bot Store for a Microsoft Teams package: https://botstore.automationanywhere.com/

Tried the graphApi one but it didn’t work and also tried to add the microsoft teams package to my control room, where it is getting unsucessful while installing it into the RPA Workspace

 


 

Can anybody please share how to develope the api task bot in automation anywhere so that whwn a process is running, the approver gets a notification in their microsoft teams for approval.

 

Here is the basic idea that you can refer to.

 

Method 1

 

  1. Trigger Identification

    • Inside your Task Bot, embed logic to monitor for specific process initiation.
    • Example: Use If Condition to check if [ProcessName] == 'InvoiceApproval'.
  2. Data Capture

    • Gather necessary details (e.g., Request ID, Submitter, Timestamp).
    • Use a Dictionary or JSON Object variable to store payload data.
  3. API Call to Microsoft Teams

    • Direct Microsoft Graph API (advanced)
      Call the Teams API. (Requires OAuth token setup via Azure AD + proper API permissions)

  4. Capture Approval Response

    • Task Bot polls status or receives a webhook to continue processing.

 

 

Method 2

 

Create Microsoft Teams Incoming Webhook

  1. In the Teams channel where the approver is present, click on “...” (More options) next to the channel name.
  2. Select Connectors.
  3. Search for and add Incoming Webhook.
  4. Name the webhook (e.g., “Approval Notification”).
  5. Copy the generated Webhook URL—you will need this in your bot.

 

Prepare JSON Payload

  1. Construct the JSON message for Teams.

Example JSON for a simple text message:

{"text": "Approval required: Process XYZ is running and needs your approval."}

  1. In the bot, assign this JSON as a string to the 

    MessagePayloadvariable.

Example (in Automation Anywhere syntax):

Set Variable MessagePayload = "{\"text\": \"Approval required: Process XYZ is running and needs your approval.\"}"

Send POST Request to Teams Webhook

  1. Use the REST Web Service action from Automation Anywhere.

  2. Configure it as follows:

    • Method: POST
    • URL:

      %WebhookURL%

    • Headers: Add header 

      Content-Type with value application/json

    • Body: 

      %MessagePayload%

    • Content Type: JSON
  3. Save the response if needed for logging or error handling.

Integrate Bot into Your Process

  • Call or trigger this bot at the point where approval notification is needed.

 

Can anybody please share how to develope the api task bot in automation anywhere so that whwn a process is running, the approver gets a notification in their microsoft teams for approval.

 

Here is the basic idea that you can refer to.

 

Method 1

 

  1. Trigger Identification

    • Inside your Task Bot, embed logic to monitor for specific process initiation.
    • Example: Use If Condition to check if [ProcessName] == 'InvoiceApproval'.
  2. Data Capture

    • Gather necessary details (e.g., Request ID, Submitter, Timestamp).
    • Use a Dictionary or JSON Object variable to store payload data.
  3. API Call to Microsoft Teams

    • Direct Microsoft Graph API (advanced)
      Call the Teams API. (Requires OAuth token setup via Azure AD + proper API permissions)

  4. Capture Approval Response

    • Task Bot polls status or receives a webhook to continue processing.

 

 

Method 2

 

Create Microsoft Teams Incoming Webhook

  1. In the Teams channel where the approver is present, click on “...” (More options) next to the channel name.
  2. Select Connectors.
  3. Search for and add Incoming Webhook.
  4. Name the webhook (e.g., “Approval Notification”).
  5. Copy the generated Webhook URL—you will need this in your bot.

 

Prepare JSON Payload

  1. Construct the JSON message for Teams.

Example JSON for a simple text message:

{"text": "Approval required: Process XYZ is running and needs your approval."}

  1. In the bot, assign this JSON as a string to the 

    MessagePayloadvariable.

Example (in Automation Anywhere syntax):

Set Variable MessagePayload = "{\"text\": \"Approval required: Process XYZ is running and needs your approval.\"}"

Send POST Request to Teams Webhook

  1. Use the REST Web Service action from Automation Anywhere.

  2. Configure it as follows:

    • Method: POST
    • URL:

      %WebhookURL%

    • Headers: Add header 

      Content-Type with value application/json

    • Body: 

      %MessagePayload%

    • Content Type: JSON
  3. Save the response if needed for logging or error handling.

Integrate Bot into Your Process

  • Call or trigger this bot at the point where approval notification is needed.

The first approch i couldn’t explore much because I don’t have the sufficient permission for the Azure account, so tried the second approach by following the steps you have mentioned and i am not getting any notification in my teams when a mesage is coming, and it is coming in the form of an adaptive card which the webhook only supports. But my requirement is to get a notification in Teams if the bot gets triggered and I need to see a message with the copilot link attached so that I can approve or reject the request by seeing the details in a form type structure. Can you please share your thoughts how to achieve this.

youtube link: 

 


Hi ​@Padmakumar.

I have tried the first approach, as I didn’t have sufficient permission for Azure set up, I couldn’t explore more on that. So I tried the second approach step by step as you have provided, by adding an incoming webhook to one of the channel in microsoft teams and it is only supporting adaptive cards

But my requirement is something else, I want to get a proper notification in my teams if my bot gets triggered as shown in the youtube link provided, I will receive a message from there I can click on the link to see the form data for approval or reject.

How to achieve this, if you know any approach without using the Microsoft Graph Api, kindly let me know.


Hi ​@Padmakumar.

I have tried the first approach, as I didn’t have sufficient permission for Azure set up, I couldn’t explore more on that. So I tried the second approach step by step as you have provided, by adding an incoming webhook to one of the channel in microsoft teams and it is only supporting adaptive cards

But my requirement is something else, I want to get a proper notification in my teams if my bot gets triggered as shown in the youtube link provided, I will receive a message from there I can click on the link to see the form data for approval or reject.

How to achieve this, if you know any approach without using the Microsoft Graph Api, kindly let me know.

 

This is because you didn't mention any reference or link to your Form in the JSON payload. 

You may try with something like this.

{
  "text": "**Approval Required**\nProcess XYZ is running and needs your approval.\n[Click here to review and approve](https://yourformhost.com?id=12345)"
}