Hello,
I am very green with Power Automate. I have only built the simplest of flows over the past couple of years.
I have created a flow that performs the following:
- Trigger is form submission
- Gets response details
- Starts and waits for an approval
- If yes, send an email and create a planner task in a bucket and update the planner task details
- If no, send an email and create a planner task in a bucket and update the planner task details
This all works without a hitch. I am parsing the JSON to allow me to add the attachment from the form and add it to the approval step. The attachment shows in the approval email and in MS Teams approvals.
The problem:
I can't get the attachment to add to the last step of updating the planner task details. I'm concerned that I don't have the skill based on some of the videos I watched online.
Can someone help or break it down to allow me to understand how I might be able to do this? I have added an image of my flow as well.
Thank you,
- Jared
Hi Manish,
Thank you so much! You're a life saver.
The only issue now is that if someone doesn't attach a file, then the flow fails with the following error at the Parse JSON step.
Hi Jared,
Here is the sample flow.
Firstly, initialize an array variable 'referenceArray' that holds the details of attachments:
Post that adds "Create share link" action to create a link for each file uploaded by the user. When you pass the field Identifier (Id) from the output of parse json action, the flow will wrap this action inside 'Apply to each' action loop.
Next, immediately after creating link add "Append to array variable" action to add json code:
{
"alias": "<dynamic file name from parse json action>",
"resourceLink": "@{outputs('Create_share_link')?['body/WebUrl']}"
}
Finally, outside apply to each block add "Update task details" action to pass the attachment array object. Click 'Switch to input entire array' button:
and pass the array variable dynamically as shown below:
Output
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1