Pega-Powered A2A Integration with Microsoft Power Automate

Enjoyed this article? See more similar articles in :fire::fire::fire: Pega Cookbook - Gen AI Recipes :fire::fire::fire: series.

Building an A2A Integration with Power Automate

A practical, step-by-step guide to securely connect Pega and Microsoft Power Automate for real-time agent-triggered automation.

This post provides a step-by-step guide to creating an Application-to-Application (A2A) integration between Microsoft Power Automate and Pega. The integration enables Agents to trigger automated workflows that interact directly with Pega using APIs.

Key Highlights:

  • Create a Power Automate Flow triggered when an Agent initiates a request.

  • Use HTTP actions to obtain an OAuth access token from Pega.

  • Send structured JSON messages from Power Automate to Pega using the token.

  • Capture and process the Pega response, then return it to the Agent.

  • Integrate the Flow seamlessly into the Agent interface for real-time interaction.

This approach helps streamline agent interactions, reduce manual effort, and enhance automation efficiency. Ideal for use cases involving secure communication and data exchange between Pega and external applications.

Create a New Agent Flow in Power Automate

Step 1: Trigger the Flow when an Agent initiates a call.

Step 2: Add an HTTP action to request the access token from Pega.

Step 3: Initialize a variable to store the token.

Step 4: Extract the token using:

outputs('TokenRequest').body.access_token

Step 5: Add another HTTP action to send the message to Pega with the following body:

URI: Agent Card URL as Input

Documentation - https://docs.pega.com/bundle/platform/page/platform/gen-ai/connecting-agent-external-agent.html

{

  "jsonrpc": "2.0",

  "id": 2,

  "method": "message/send",

  "params": {

    "message": {

      "messageId": "7c1292ac-2084-9444-8e6e-b6c25f982c82",

      "contextId": "@{triggerBody()?['text_1']}",

      "role": "user",

      "kind": "message",

      "parts": [

        {

          "kind": "text",

          "text": "@{triggerBody()?['text']}"

        }

      ]

    }

  }

}

Step 6: Initialize a variable to store the response from Pega.

Step 7: Populate the response variable using:

outputs('AgentRequest').body.result.parts[0].text

Step 8: Send the response back to the Agent.

Step 9: Publish the Flow & Link this Flow to your Agent interface.

PEGA benefits

Why this integration matters for agent experiences and enterprise automation

· Pega-first orchestration for secure, governed workflow execution

· Faster agent resolution with real-time responses back to the Agent

· Reduced manual effort via Power Automate triggers + API-driven actions

· Scalable integration pattern for repeatable A2A use cases

Enjoyed this article? See more similar articles in :fire::fire::fire: Pega Cookbook - Gen AI Recipes :fire::fire::fire: series.