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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / How to create a list/a...
Copilot Studio
Unanswered

How to create a list/array of user responses and trigger a flow to save them in Sharepoint list?

(0) ShareShare
ReportReport
Posted on by
Hi All!
 
Power Platform newbie here, trying to work on a requirement:
 
I am working on a Q&A chatbot in Copilot that dynamically gets questions from Sharepoint list. Basically, in the beginning of conversation, user will select one topic and based on the selected topic, questions will be presented to user. (I have one Sharepoint List where I have listed topic-wise questions). I could get these questions dynamically in Copilot.
 
Now, I want to do this:
  1.  Confirm user inputs for each questions at the end of conversation. For which, I want to create an array-like functionality that stores all user inputs.
  2.  Send these answers back to Sharepoint List. i.e. need to trigger a flow from Copilot that saves these data in List.
 
How can I implement this? I tried creating variables that stores user's answers but it is overlapping and at the end, it just shows me the last record. (I have used patch(), I don't know any other way) 
 
Please someone guide me, how can I save these user's answers to all the questions and save it back to Sharepoint list? 
 
Any guidance or help will be much appreciated!:)
Categories:
I have the same question (0)
  • SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
     
    Instead of using individual variables, you should use a collection or an array-like structure to store user inputs dynamically for each question
     
    At the start of the conversation, initialize an empty array - Set(userResponses, []);
    As the user answers each question, append the input to the array along with the associated question.  Collect(userResponses, {
        Question: CurrentQuestion,
        Answer: UserAnswer
    });
     
    Once all questions are answered, display the userResponses array to the user for confirmation.
    "Here are your responses:
    1. [Question 1]: [Answer 1]
    2. [Question 2]: [Answer 2]
    ...
    Do you want to submit these responses?"
     
     
    Use Power Automate to save the collected responses into a SharePoint List.
    Trigger Power Automate from Copilot:
    Add a step in Copilot to trigger the Power Automate flow using the "Call an Action"  Pass the userResponses array as a parameter to the flow.
    {
        "Responses": [
            {
                "Question": "What is your name?",
                "Answer": "John Doe"
            },
            {
                "Question": "What is your favorite color?",
                "Answer": "Blue"
            }
        ]
    }
     
    Create the Power Automate Flow: 
    • Use a manual trigger or an HTTP request trigger to accept the userResponses array.
    • Parse JSON: Parse the input JSON to extract individual responses.
    • Create Items in SharePoint: Use the "Create Item" action in Power Automate to add each response to the SharePoint List.
     
    pls try - Thanks.
  • VS-07011110-0 Profile Picture
    on at
    Hello @SaiRT14,
     
    Thanks for the suggestion but I believe, we dont have Collect function in Copilot studio. Can you please let me know how to make this possible? 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard