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 / copilot answers back t...
Copilot Studio
Answered

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

(0) ShareShare
ReportReport
Posted on by 20
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 (1)
  • Suggested answer
    Jerald Felix Profile Picture
    354 Super User 2026 Season 1 on at
    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
  • JO-12092151-0 Profile Picture
    20 on at
    @Jerry-IN and All,
     
    I was not able to get what you say to work. 
     
    i was able to do the following:
     
    Here is a step-by-step guide on how to achieve this:
    • I created a topic and called it: jiratickets
    • Set the Trigger to "it's invoked" could not find a better fit. here are the options i had:
      a message is received"
      "a custom client event occurs"
      "an activity occurs"
      "The conversation changes"
      "its invoked"
      "it's redirected to"
      "the user is inactive for awhile"
      "A plan completes"
      "An AI-generated response is about to be sent"
    • i created a condition and called it if. using variable controlkey (type string) is equal to suggestsop
      • i figure i would create a json key in the power automate flow that says: 
        json('{"controlkey": "suggestsop"}')
    • then I addded a node "custome prompt" prompt asking Ai to parse he block of text and extra fields into the variables i created.
      "

      you will receive a block of text called JiraPayload. Extract these fields exactly:

      issuekey

      issueSummary

      issueDescription

      issueStatus

      issuereporter

      issuecreated

      if a field is missing, leave it blank. Respond as JSON with these exact keys only. "

      then from there I got stuck as the outputs, will not let me pick all the variables i had created.
    • I also did not find a node that would let me define parameters. 
     
    i was not able to do the following:
    Modify Your Power Automate Flow
    • could not adjust my "Apply to each" loop in Power Automate to call the new topic and receive the response since i could not find the action that can be used for that. so all the steps after that could not be explored.


    apologies, I am still very new at this and could not get this done with your suggestion. see attached for screenshots of it.

    i would appreciate your or anybody else's suggestion that can help me get this done. or if anybody want to do a share screen. thats also welcomed.
    Screenshot 2025-0...
    Screenshot 2025-0...

    Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

  • Verified answer
    JO-12092151-0 Profile Picture
    20 on at
    I was able to fix my problem by simply using the tool "Add comment (V2)" and updating the agent instructions to tell it to reply using that tool. 
    I would like to still learn how to do this for other tools that wont have a published tool like this as I will be able to leverage their apis but I hope this helps everyone else. 
     
    I also hope in the future for specific detials as this tool keeps changing and the right terms are important. 

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!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 612

#2
chiaraalina Profile Picture

chiaraalina 170 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 116

Last 30 days Overall leaderboard