web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Trigger copilot studio...
Copilot Studio
Suggested Answer

Trigger copilot studio conversation from Flow

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, I wonder if it is possible to trigger a copilot studio copilot topic by means of a powerautoamte flow?

If so, how does this work?

Categories:
I have the same question (0)
  • adilei Profile Picture
    Microsoft Employee on at

    You could do that via Directline, but why? What sort of requirement will be addressed with this pattern?

     

    Key concepts in the Bot Framework Direct Line API 3.0 - Azure AI Bot Service - Bot Service | Microsoft Learn

  • drlreinhard7 Profile Picture
    Microsoft Employee on at

    Want to trigger a conversation from a PowerApp via a button flow and use a value from a text field as trigger message that I send over. 

    I tried direct line but have difficulties getting it work. 

    Do you have some more specific info on directline and how this needs to be configured in detail?

  • adilei Profile Picture
    Microsoft Employee on at

    Not sure what specifics are needed, but here is a collection with some calls to Directline (the endpoint is for a non-us copilot)

     

    {
    	"info": {
    		"_postman_id": "5f615dff-8ef4-43ab-abfa-822bffc9ca44",
    		"name": "directline",
    		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    		"_exporter_id": "3035135"
    	},
    	"item": [
    		{
    			"name": "Authenticate",
    			"request": {
    				"auth": {
    					"type": "bearer",
    					"bearer": [
    						{
    							"key": "token",
    							"value": "",
    							"type": "string"
    						}
    					]
    				},
    				"method": "POST",
    				"header": [],
    				"url": {
    					"raw": "https://europe.directline.botframework.com/v3/directline/tokens/generate",
    					"protocol": "https",
    					"host": [
    						"europe",
    						"directline",
    						"botframework",
    						"com"
    					],
    					"path": [
    						"v3",
    						"directline",
    						"tokens",
    						"generate"
    					]
    				}
    			},
    			"response": []
    		},
    		{
    			"name": "Get Activities",
    			"protocolProfileBehavior": {
    				"disableBodyPruning": true
    			},
    			"request": {
    				"auth": {
    					"type": "bearer",
    					"bearer": [
    						{
    							"key": "token",
    							"value": "",
    							"type": "string"
    						}
    					]
    				},
    				"method": "GET",
    				"header": [],
    				"body": {
    					"mode": "raw",
    					"raw": "{\r\n \"locale\": \"en-EN\",\r\n \"type\": \"message\",\r\n \"from\": {\r\n \"id\": \"user1\"\r\n },\r\n \"text\": \"hello\"\r\n}",
    					"options": {
    						"raw": {
    							"language": "json"
    						}
    					}
    				},
    				"url": {
    					"raw": "https://europe.directline.botframework.com/v3/directline/conversations/Jwo4U8SNUqh9JxfGQrzeIi-eu/activities",
    					"protocol": "https",
    					"host": [
    						"europe",
    						"directline",
    						"botframework",
    						"com"
    					],
    					"path": [
    						"v3",
    						"directline",
    						"conversations",
    						"Jwo4U8SNUqh9JxfGQrzeIi-eu",
    						"activities"
    					]
    				}
    			},
    			"response": []
    		},
    		{
    			"name": "Send Activity",
    			"request": {
    				"auth": {
    					"type": "bearer",
    					"bearer": [
    						{
    							"key": "token",
    							"value": "",
    							"type": "string"
    						}
    					]
    				},
    				"method": "POST",
    				"header": [],
    				"body": {
    					"mode": "raw",
    					"raw": "{\r\n \"locale\": \"en-EN\",\r\n \"type\": \"message\",\r\n \"from\": {\r\n \"id\": \"user1\"\r\n },\r\n \"text\": \"hello\"\r\n}",
    					"options": {
    						"raw": {
    							"language": "json"
    						}
    					}
    				},
    				"url": {
    					"raw": "https://europe.directline.botframework.com/v3/directline/conversations/Jwo4U8SNUqh9JxfGQrzeIi-eu/activities",
    					"protocol": "https",
    					"host": [
    						"europe",
    						"directline",
    						"botframework",
    						"com"
    					],
    					"path": [
    						"v3",
    						"directline",
    						"conversations",
    						"Jwo4U8SNUqh9JxfGQrzeIi-eu",
    						"activities"
    					]
    				}
    			},
    			"response": []
    		},
    		{
    			"name": "Start Conversation",
    			"request": {
    				"auth": {
    					"type": "bearer",
    					"bearer": [
    						{
    							"key": "token",
    							"value": "",
    							"type": "string"
    						}
    					]
    				},
    				"method": "POST",
    				"header": [],
    				"url": {
    					"raw": "https://europe.directline.botframework.com/v3/directline/conversations",
    					"protocol": "https",
    					"host": [
    						"europe",
    						"directline",
    						"botframework",
    						"com"
    					],
    					"path": [
    						"v3",
    						"directline",
    						"conversations"
    					]
    				}
    			},
    			"response": []
    		}
    	],
    	"event": [
    		{
    			"listen": "prerequest",
    			"script": {
    				"type": "text/javascript",
    				"packages": {},
    				"exec": [
    					""
    				]
    			}
    		},
    		{
    			"listen": "test",
    			"script": {
    				"type": "text/javascript",
    				"packages": {},
    				"exec": [
    					""
    				]
    			}
    		}
    	],
    	"variable": [
    		{
    			"key": "conversationID",
    			"value": ""
    		}
    	]
    }
  • drlreinhard7 Profile Picture
    Microsoft Employee on at

    Thanks but that does not help much. 

    I need more specific information on what needs to be setup in Azure and PowerAutomate to make this work

  • Suggested answer
    ninihen Profile Picture
    119 on at
    Do you mean trigger a conversation with a Copilot Agent inside of a Power Automate flow? 

    If so, use the Copilot connector, action Execute Agent and wait (operationId: ExecuteCopilotAsyncV2)
     


    Then the response will return in the action output:
    outputs('Execute_Agent_and_wait')?['body/lastResponse']

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 704

#2
Vish WR Profile Picture

Vish WR 249

#3
Haque Profile Picture

Haque 244

Last 30 days Overall leaderboard