We have many MS Forms each with different number of questions. In my Agent Flow, I have used Parse JSON on output of Get_Response_Details() action. Then used removeproperty() to remove "responder" and "submitDate". Below is my new object.
{
"variables": [
{
"name": "vFormResponses",
"type": "Object",
"value": {
"rbc2b5586363b4b7f94560a2e66b42e3b": "Test1 936",
"r7e7f03ffed0248558339580c97960824": "Test2 936"
}
}
]
}
My question is how to save the values "Test1 936" and "Test2 936" to a string variable.

Raghunath BhukanPosted Jan 7, 2026, 2:35 AM
In Copilot Studio / Power Automate (Agent Flow), the key thing to understand is:
Your form responses are now stored as an object with dynamic keys, and you want to extract only the values and store them in a single string variable.
Current Object (What You Have)
Your object variable looks like this:
You want a string like:
(or newline-separated, if you prefer)
Solution 1: Convert Object Values ? Array ? String (Recommended)
Step 1: Get values of the object
Use this expression:
This converts the object into an array:
Step 2: Join values into a single string
Use the
join()function.Comma-separated string:
New-line separated string:
Step 3: Set String Variable
Add Set variable action:
Name:
vResponsesTextType: String
Value (Expression):
? Result:
Solution 2: Append Using “Apply to each” (More Control)
Use this if you want formatting per question.
Steps:
Initialize a String variable
vResponsesText= emptyAdd Apply to each
Input:
Inside loop ? Append to string variable
? Result:
Solution 3: Key + Value (If Needed Later)
If you ever need question ID + answer, use:
inside Apply to each over:
Best Practice Recommendation
For dynamic MS Forms with variable questions:
? Remove
responderandsubmitDate(good call)? Use
values()to extract answers? Use
join()for compact storage? Store as plain text for logging, email, or DB storage
Final Answer (Short)
To save
"Test1 936"and"Test2 936"into a string variable, use: