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

Community site session details

Session Id :
Copilot Studio - General
Suggested answer

copilot answers back to flows in power automate. how to?

(0) ShareShare
ReportReport
Posted on by
Hello! i have a flow created that is sending information from jira cloud to an agent. the agent is responding fine to each ticket as suspected but how can I get this data back to my flow so I can send it back out to Jira?
 
I have a condition that while true, it will do a select and go through the array of tickets. then i have an apply to each condition and for every ticket/object in the array, its executing copilot studio agent. 
 
my agent is actually getting the data and responding fine but once when i create an action using compose I only get a random number which I suspect to besomething like a conversation id or transaction id or something as the id is the same for all 19 tickets in the query or for all the 19 objects.
 
I just can't figure out a way to bring that data back or how to get it out of copilot to be able to send it to Jira back as a comment. 
Categories:
I have the same question (0)
  • Suggested answer
    Jerry-IN Profile Picture
    83 on at
    copilot answers back to flows in power automate. how to?
    Hello  ,
     
    I understand you're facing a challenge with getting a response back from your Copilot Studio agent into your Power Automate flow. It's a common point of confusion, and you are correct in your suspicion—the value you're getting back is indeed a conversation ID, not the agent's reply. The action you are likely using initiates the conversation asynchronously, which is why you can't directly access the response in the next step of your flow.
     
    To get the agent's response back into your flow, you need to configure your Copilot Studio agent to explicitly return a value to the calling flow. This involves creating the conversation logic within a Copilot Studio topic and then defining a specific output parameter for the response.
     
    Here is a step-by-step guide on how to achieve this:
    1. Configure Your Copilot Studio Agent to Return a Value
    • The key is to build your logic inside a Copilot Studio topic and use its built-in capabilities to pass data in and out.
    • Create a Topic for the Interaction: Inside your Copilot Studio agent, create a new topic. This topic will handle the process of receiving the Jira information and generating a response.
    • Set the Trigger: Use the trigger When an action is called. This allows the topic to be invoked from Power Automate.
    • Define an Input Parameter: Create an input parameter for the topic to receive the data from your Jira ticket (e.g., a text variable named JiraTicketContent).
    • Add Your Agent's Logic: Add the nodes for your agent's existing logic that processes the input and generates the response.
    • Define an Output Parameter: This is the most critical step. Add a Return value(s) to caller node at the end of your topic.
    • Inside this node, create an output parameter (e.g., a text variable named AgentResponse).
    • Set the value of this output parameter to the variable that holds your agent's generated response.
    • Save and Publish your agent.
    2. Modify Your Power Automate Flow
    • Now, you'll adjust your "Apply to each" loop in Power Automate to call the new topic and receive the response.
    • Remove the Old Action: Delete the current action that calls your agent and returns the conversation ID.
    • Add the New Topic Action: Search for the Copilot Studio connector and find the new topic you created. It will appear as a callable action.
    • Map the Inputs and Outputs:
    • The action will now have a field for the input parameter you defined (JiraTicketContent). Map the relevant data from your Jira ticket array to this field.
    • Crucially, the action will also now have an output field (AgentResponse) that you can use in subsequent steps.
    • Use the Response: You can now access the AgentResponse output from the Copilot Studio action in the rest of your flow. You can use a Compose action to see the value and then pass it to the Jira connector's Add a comment to an issue action.
    By following this pattern, your Power Automate flow will correctly wait for the Copilot Studio topic to finish executing and will receive the response directly in an output variable, allowing you to complete your workflow and send the data back to Jira.
     
    I hope this helps you resolve the issue.
     
    Best Regards,
    Jerald Felix

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 235 Super User 2025 Season 2

#3
trice602 Profile Picture

trice602 166 Super User 2025 Season 2

Last 30 days Overall leaderboard