Hi,
I have a flow that is triggered by a submission of a form. The form allows for multiple file uploads under one question.
I parse the JSON and then based on the body of the JSON get the file content (from a group sharepoint site) and then append it to an array variable.
The problem is I only ever get the first file I have uploaded. I know it is the way that I am doing the apply to each but can't seem to spot what I am doing wrong.
Thanks.
Solved! Go to Solution.
Hi @Anonymous
Glad you got it sorted.
To send the attachments via email you will need to make an adjustment to the append to array step.
The append to array step needs to look like below. And for the ContentBytes property you will need to wrap the results from the Get File Content action in a base64() expression. This converts the File Content into a string
Once you have populated the array you can then pass it to the attachments property in the Advanced Options of the Send Email action.
By default the advanced options asks you for a attachment name and attachment content, however there is a little icon to the right of the attachments section that says "switch to input entire array", if you click on this then you can put the attachment array variable in
Hopefully this helps
Hi @Anonymous
Looking at where you are retrieving the file content you are wrapping the parse json in a first expression which will only pull out the first result from the Parse Json action
Thanks Gareth, not too sure I am following though.
Here I have the flow "working" but it is not going through each item
Hey Gareth,
Following you now. Last question. If I wanted to now have both of these attachments attached to an send email action, how do i do this ?
Hi @Anonymous
Glad you got it sorted.
To send the attachments via email you will need to make an adjustment to the append to array step.
The append to array step needs to look like below. And for the ContentBytes property you will need to wrap the results from the Get File Content action in a base64() expression. This converts the File Content into a string
Once you have populated the array you can then pass it to the attachments property in the Advanced Options of the Send Email action.
By default the advanced options asks you for a attachment name and attachment content, however there is a little icon to the right of the attachments section that says "switch to input entire array", if you click on this then you can put the attachment array variable in
Hopefully this helps
Thanks Graham, yes I found that and have set it up as directed:
But when I then test, I get
Anyone has the complete procedure in creating a template? I am struggling quite a bit following the threads here. Thanks.
Hi @GlennGall
I wrote an article on how this could be done
https://garethhunt.io/index.php/2020/02/18/power-automate-handling-multiple-attachments/
Hopefully this helps, if you need anymore help let me know
Hi Gareth1,
Thank you very much for the information! My flow is working now.
However, it creates multiple list as well with different attachment each, depending on the number of attachments submitted.
I also want to resolve this, as it may affect my reporting later for the number of entries (it will be counted on the number of attachments and not on response in sharepoint).
One solution I did is to auto create a folder in the document library linked to the title of the form, and all attachments are saved there.
But I am struggling on making a link from the library to the attachment of the item list - there is no template available on this or maybe yes?
Probably, you have already done this in the past?
Thank you very much for the support.
GlennGall
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
70 | |
22 | |
17 | |
17 | |
13 |
User | Count |
---|---|
125 | |
34 | |
31 | |
28 | |
26 |