I have a form using an upload field and I understand the method using arrays to send multiple attachments and it runs perfectly fine.
However what I would like to do is have several upload sections through the form sent as attachments
Example:
Section 1
Name
Date
Upload Field 1
Section 2
Address
Phone
Upload Field 2
And then in my email have attachments from both Upload field 1 and upload field 2
Current working version with ONE upload field (upload field named "Question")
Solved! Go to Solution.
Hi @Pardee
I would initialize a variable of type array and append all elements (from both arrays) to it.
Then use that variable as the parameter for the attachments.
Cheers
Manuel
------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.
Hi @Pardee
It's possible to have multiple upload fields in your forms. Just add them with different questions:
After this, you have the fields to parse in Flow. They will appear in Power Automate with the same names as the questions, but I think they will always be arrays of elements, not only one element. I haven't tested this, but I think this will happen even if you define that you only want one file.
Is this what you need?
Cheers
Manuel
------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.
I am capturing the file from the second upload I just simply need to add it to the attachments/email
This is my form
This is the array used for the first upload field, only one variable is allowed per attachment which means I can not duplicate process and add another array and the image from the second upload is not included with the flow as is. (Note the full flow is in OP)
This is the JSON Parse Schema I have
{
"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"
]
}
}
Is there something I can do to include the additional upload in this array?
In the end I anticipate about 5 separate upload fields required on this form I would like to be attached or included inside the email
(If I call the element question 2 in the body of the email I get all the metadata, if I could clear that out and take the link and have html format it into an image that would work as well)
Hi @Pardee
I would initialize a variable of type array and append all elements (from both arrays) to it.
Then use that variable as the parameter for the attachments.
Cheers
Manuel
------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.
Both have been initialized as arrays but are being output to a string when I am trying to declare them as an array. Am I missing a step, do I need to concatenate or something? I am unfamiliar with the visual syntax flows use
Hi @Pardee
You have two array variables (The "multiple attachments" and "question 2"). Remove one of them and attach all (from questions 1 and 2) to the same variable. Then use that one on the email.
Cheers
Manuel
------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.
Hi All,
I too am having the same issue. I have a form with multiple fields that require uploads. I can upload one to email but not the rest. I tried doing multiple parse JSONs but I think that just screwed everything up. I am self-taught in powerautomate so I do need a bit of spoon feeding. Can someone help me out??
Then under the send from sharebox dropdown, go to advanced options and ensure your attachments are set up correctly:
Thank you,
I am trying to execute this now.
In condition 2 (under initialize variable 2)
what do I put in there?
I wouldn't put anything there, that is just a conditional variable in my form that chooses which email group and format to send the content in.
If you want to be safe you can just leave the conditional as a true and leave the false blank or even remove it though I have note tested the flow without it...which should not matter, you know... code.
User | Count |
---|---|
26 | |
15 | |
13 | |
10 | |
10 |
User | Count |
---|---|
45 | |
29 | |
29 | |
23 | |
22 |