
Hello, I am creating a flow in Power Automate.
What I mean is that I create a form using MS Forms, which is sent to Chat in MS Teams using power autoamte. All text fields pass correctly, but the attachment added to MS Forms is displayed as text and not an attachment file.
I remember that I need to add some variables in power automate but I don't remember how. Can you tell me what I need to do to ensure that the attachment added in MS Forms is also transferred to the chat message?
Hi @SebastianSzyrok ,
It doesn't relate to variables, you need to leverage Parse JSON. Please refer to below thread:
Adding attachment from Form to Teams - Power Platform Community (microsoft.com)
1) Get response details
2) Parse the content of the file question (in this case, "Business justification"). The parse json schema would be:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {},
"size": {
"type": "integer"
},
"referenceId": {
"type": "string"
},
"driveId": {
"type": "string"
},
"status": {
"type": "integer"
},
"uploadSessionUrl": {}
},
"required": [
"name",
"link",
"id",
"type",
"size",
"referenceId",
"driveId",
"status",
"uploadSessionUrl"
]
}
}
3) Then, you could select link property to get the url of the file, and name to get its name, and use those actions to get the content and copy it to the Sharepoint document library related to Teams.
Best regards,