Join the Team Forms community

E
R
A
T
C

Get the attached uploads in from response

Last updated 2 months ago
A
Alex

Hey!

i am trying to get the upload attachments in the form response using the get response attachment actions. However, when i pass the body of the json file as content ( to attach to an email ), i get the array.

I checked the json file and the body is indeed an array. How can i get the file name and content to use in a flow to send the uploads as attachment in an email.

Thanks

A
Anthony Phan
Marked as solution

Hi Alex!

The "Get Response Attachments" flow action returns an array because there can be multiple files uploaded in a single response. In addition, this action returns a download URL to each file instead of the file contents. These factors can be a little confusing and makes it a little trickier to handle in Microsoft Power Automate, however it's possible to achieve what you are after with a few extra steps.

Here's a screen shot of the workflow I built to achieve this.

The key steps are:

  1. Initialize an array variable to store the file contents

  2. User the download URL returned by "Get Response Attachments" in the "HTTP action" to download the file contents for each uploaded file (in a loop)

  3. Append the file contents to the array variable in step 1

  4. Pass the array variable to the "Send Email" action

For your reference I have also attached an export of the workflow file which you can use to import into your own Power Automate environment.

Download Example

Note that the example above will soon be added to the official Team Forms Power Automate Templates.

View full solution
A
1 comment
A
Anthony Phan

Hi Alex!

The "Get Response Attachments" flow action returns an array because there can be multiple files uploaded in a single response. In addition, this action returns a download URL to each file instead of the file contents. These factors can be a little confusing and makes it a little trickier to handle in Microsoft Power Automate, however it's possible to achieve what you are after with a few extra steps.

Here's a screen shot of the workflow I built to achieve this.

The key steps are:

  1. Initialize an array variable to store the file contents

  2. User the download URL returned by "Get Response Attachments" in the "HTTP action" to download the file contents for each uploaded file (in a loop)

  3. Append the file contents to the array variable in step 1

  4. Pass the array variable to the "Send Email" action

For your reference I have also attached an export of the workflow file which you can use to import into your own Power Automate environment.

Download Example

Note that the example above will soon be added to the official Team Forms Power Automate Templates.