A. Trigger
When a new response is submitted
Form ID: Your Form
B. Get response details
Get response details
Form ID: Your Form
Response ID: Response ID
C. Parse the uploaded files questions JSON
For each file upload question, the answer is a JSON array string.
Example:
[
{
"name": "filename1.pdf",
"link": "https://yourtenant-my.sharepoint.com/..."
},
...
]
Use Parse JSON action on the file upload question response.
Use the following sample schema (adjust according to your JSON):
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"
}
},
"required": ["name", "link"]
}
}
D. Compose the email body step-by-step
Initialize a variable, say emailBody, string type, set it initially empty.
Use Append to string variable action conditionally for each question:
If question answer is not empty:
Append:
<b>Question 1:</b> Answer 1<br>
For file upload question, after parsing JSON, append clickable links like:
html:
<b>Uploaded files:</b><br>
<a href='filelink1'>filename1</a><br>
<a href='filelink2'>filename2</a><br>
E. Send email action
Use Send an email (V2) action,
To: your specific email,
Subject: e.g. "New Form Submission from [Responder Name or ID]",
Body: use the emailBody variable,
Make sure Is HTML option is set to Yes.
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
Regards,
Riyaz