How to Create Clickable Links for Multiple Microsoft Forms Attachments
Question details
The user needs to extract URLs for all files uploaded via Microsoft Forms and convert them into clickable links within a generated document or PDF.

- Product
- Power Automate / Microsoft Forms
- Device & OS
- not provided
- Scenario
- Generating a PDF document from Microsoft Forms responses that contain multiple file attachments.
- Observed behavior
- Power Automate natively extracts only the first uploaded file's URL, failing to process the remaining attachments in the array.
Ensure your Microsoft Form is configured to accept multiple file uploads and that you have access to Power Automate with connectors capable of converting HTML or Word documents to PDF.
Use an Apply to Each Loop in Power Automate
Process the JSON array of attachments systematically to extract and combine all file names and URLs before generating the PDF.
Because Microsoft Forms stores multiple file uploads as a JSON array, you cannot map the attachment dynamic content directly into a single string. You must parse the array and loop through each item to capture every link.
Add a 'Parse JSON' action in your flow. Use the attachment response dynamic content from Microsoft Forms as the content input, and generate the schema from a sample response.
Add an 'Initialize variable' action at the top level of your flow. Set its type to 'String' to store the combined HTML links.
Add an 'Apply to each' action and select the parsed JSON array as the input. Inside the loop, add an 'Append to string variable' action.
In the 'Append to string variable' action, format the link using HTML (e.g., <a href="@{items('Apply_to_each')?['link']}">@{items('Apply_to_each')?['name']}</a><br>). This creates a clickable URL for each individual file.
Use the completed string variable as dynamic content inside your 'Create HTML file' or 'Populate a Microsoft Word template' action, which you can then proceed to convert to a PDF.

Try WPS Office for Your Document and PDF Needs
While Power Automate handles complex automated workflows, WPS Office is an excellent, free alternative to Microsoft Office for editing, viewing, and managing the final PDF and Office documents you generate.
- 1. Download and Install: Visit the WPS Office website to download the free suite and install it on your computer.
- 2. Open Your Generated Document: Locate the PDF or Word document generated by your workflow and open it directly in WPS Office.
- 3. Review Clickable Links: Use the WPS PDF viewer to test the clickable links and ensure all your Microsoft Forms attachments are correctly referenced.

Frequently Asked Questions
Why does Power Automate only extract the first attachment from Microsoft Forms?
Microsoft Forms outputs multiple attachments as a JSON array. If you attempt to use the dynamic content directly without iterating through the array via an 'Apply to each' loop, Power Automate defaults to fetching only the first item.
Can I format the extracted attachment links as a bulleted list in my final PDF?
Yes. You can initialize a string variable with HTML list tags (<ul>). Inside your 'Apply to each' loop, append each attachment link surrounded by list item tags (<li>), and then close the unordered list tag (</ul>) after the loop finishes.
Where is the best place to ask for help with Power Automate workflows?
The Microsoft Power Automate Community is the official and most active forum for troubleshooting flow logic, complex JSON parsing, and Office Scripts integrations.




