I have a Microsoft Form with a dozen questions that all allow for multiple file uploads. These files are uploaded to a SharePoint site. Upon completion of the form, I'm trying to send an email with links to the forms loaded into SharePoint. I attempted to follow the following post:
My problem is, I can't figure out how to convert the output of the Parse JSON step into a string array using only the "name" and "link" elements, nor how I can dynamically reference those array components in the body of the email.
Solved! Go to Solution.
Hi again!
I think you are following similar steps as here, right?
https://www.bythedevs.com/post/working-with-date-time-data-of-excel-in-power-automate
So I am assuming more complex scenario... in your form you offer the possibility to upload files through two different questions. In the Forms Survey I just implemented as example, questions are called 'Release Notes' and 'Self Cetification Test Results'. Both of these questions allow multiple attachments upload (up to 4 in my example).
Now in the Flow I need an array variable, I just called it formsLinks:
I opted to process in paralel both responses (please refer to 'Condition Self Certification Test Starus', and 'Condition Release Notes'), but you can process them sequentially. If you just have one question for file upload, then just need one.
Now the processing I do inside any of these Conditions is the following:
Last Condition verifies that variable 'formsLinks' is not empty. ON the true branch I build an HTML table so I can add it to the email body.
HTML has two columns: FileName and Link. If you need more columns (i.e. Question NAme, Submission Date Time, email of the requestor) just add them in the 'Append to array'.
Hope this helps
Proud to be a Flownaut!
Hi again!
"Regarding your last comment about OneDrive, I have moved this form to a Microsoft Team site, so the form submission stores the uploaded files on the Team's SharePoint, and the recipients of the email are all members of that Team. Therefore, there is no need to email the attachments since a link works fine. "
Thanx for sharing! Very valuable info
Now on your last challenge, plesa have a look to this old dirty but also efficient way to add hyperlinks to an HTML table in Flow:
https://powerusers.microsoft.com/t5/Building-Flows/How-to-format-link-properly-in-Create-HTML-table-...
Hope this helps
Proud to be a Flownaut!
Hi @JimSutt ,
Please try to use the following expression to format hyperlink:
replace(replace(replace(body('Create_HTML_table'), '<', '<'), '>', '>'), '"', '"')
Image reference:
Hope this helps.
Best Regards,
Proud to be a Flownaut!
Hi again!
I think you are following similar steps as here, right?
https://www.bythedevs.com/post/working-with-date-time-data-of-excel-in-power-automate
So I am assuming more complex scenario... in your form you offer the possibility to upload files through two different questions. In the Forms Survey I just implemented as example, questions are called 'Release Notes' and 'Self Cetification Test Results'. Both of these questions allow multiple attachments upload (up to 4 in my example).
Now in the Flow I need an array variable, I just called it formsLinks:
I opted to process in paralel both responses (please refer to 'Condition Self Certification Test Starus', and 'Condition Release Notes'), but you can process them sequentially. If you just have one question for file upload, then just need one.
Now the processing I do inside any of these Conditions is the following:
Last Condition verifies that variable 'formsLinks' is not empty. ON the true branch I build an HTML table so I can add it to the email body.
HTML has two columns: FileName and Link. If you need more columns (i.e. Question NAme, Submission Date Time, email of the requestor) just add them in the 'Append to array'.
Hope this helps
Proud to be a Flownaut!
Oops!
One final thought. Please bear in mind that, uploaded files are stored in your OneDriveForBusiness, meaning the links I am currently injecting in the HTML Table are OneDriveForBusiness links. If you wish to send this email to your teammates, you need to manually assign permissions to anyone else to access these files.
Or... move the files into a Sharepoint Library, so you can use action block 'Grant access to item or file' to automatically grant permissions. If this last one is your goal, then you need to share Sharepoint links instead
Hope this helps
Proud to be a Flownaut!
@efialttes, thank you for your response! Your approach covers most of what I was looking for. However, my goal is not to keep the filename and link as separate columns in the email, but rather list the filenames as links in a single column. What I attempted to do with your solution was to replace the "value" in the "Append to array variable" with a single column. Since it's still a JSON object, I'm forced to give it a column heading, so I'm using:
Trouble is, when inserted as HTML, the tags are converted to strings.
While I have multiple questions that each allow multiple attachments, I created a simple form for testing your solution. Here's what I created:
After the "Create HTML Table" step, I insert the output into the body of the email. I would prefer not to include the the "Filename" header as I'm inserting this HTML table into a larger table, but I can live with it. However, I would prefer the email to include just the image filenames as links to the files.
Regarding your last comment about OneDrive, I have moved this form to a Microsoft Team site, so the form submission stores the uploaded files on the Team's SharePoint, and the recipients of the email are all members of that Team. Therefore, there is no need to email the attachments since a link works fine.
Hi again!
"Regarding your last comment about OneDrive, I have moved this form to a Microsoft Team site, so the form submission stores the uploaded files on the Team's SharePoint, and the recipients of the email are all members of that Team. Therefore, there is no need to email the attachments since a link works fine. "
Thanx for sharing! Very valuable info
Now on your last challenge, plesa have a look to this old dirty but also efficient way to add hyperlinks to an HTML table in Flow:
https://powerusers.microsoft.com/t5/Building-Flows/How-to-format-link-properly-in-Create-HTML-table-...
Hope this helps
Proud to be a Flownaut!
Hi @JimSutt ,
Please try to use the following expression to format hyperlink:
replace(replace(replace(body('Create_HTML_table'), '<', '<'), '>', '>'), '"', '"')
Image reference:
Hope this helps.
Best Regards,
I guess we got a happy ending, right? If so, Congrats!
Please remember mark this topic as "Solved" by clicking "Accept as a solution". This way other community members facing this same problem in the future have the chance to find a solution faster. Please note you can even select several replies as as 'Solution', even from different community members!
Thanx for your contribution to keep this community great!
Proud to be a Flownaut!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
27 | |
26 | |
23 | |
14 | |
10 |
User | Count |
---|---|
63 | |
51 | |
30 | |
29 | |
24 |