Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Add 0-n attachments from SharePoint to a Planner task in Power Automate

Posted on April 25, 2021April 25, 2021 by Tom

“I have a Power Automate flow set up to create tasks in Planner as well as update the task details, but how do I add also attachments?”


Some Planner tasks need more information than just the task itself and a checklist. It can be a task created from a SharePoint item, task from a file in a SharePoint library, or a repeated task created from a SharePoint template. In all these situation Power Automate can add also attachments to the Planner task during creation. But how can you do it with various (0-n) number of attachments?

Single attachment (flow triggered on a file)

First things first, if your flow is triggered on a file, you can add the file directly. Use the ‘File name with extension’ as the ‘Reference Alias’ and ‘Link to item’ as the ‘References Resource link’. The ‘References Type of the reference’ can stay empty.

Since the flow will trigger on a file, the file must exist. And since you can’t attach another file to a file, there’ll be always just a single file = you can use the detailed input.

Power Automate add Planner attachments

But if your flow is not triggered on a file, or if you want to attach few more files from other sources, you’ll need to store them in an array.

Multiple attachments

The approach is similar to adding multiple attachments to an email or to an approval task. You should build an array with the attachments and then use the array in the ‘Update task details’ action. If it’s an array, it doesn’t matter how many attachments it has. Empty array will add 0 attachments, array with N items will add N attachments.

Firstly, initialize an array variable, the one that will contain all the attachments.

Initialize array variable

Secondly, get all the files you’d like to add to the Planner task. You can use ‘Get attachments’ to get the file ‘DisplayName’ and ‘AbsoluteUri’ from item attachments, and append them to the array:

Get attachments from SharePoint item

Or ‘Get files (properties only)’ to get the file ‘File name with extension’ and ‘Link to item’ from a document library, and append them to the array.

Get attachments from SharePoint list

In all situations, the format used in the ‘Append to array variable’ must be as below:

{
  "alias": "<FileName>",
  "resourceLink": "<LinkToFile>"
}

Note: <…> indicates a placeholder, replace it including the < and >.

Once you’ve got all the files in an array (after the ‘Apply to each’ processing the files) you can add them to the Planner task.

Add 0-n attachments from SharePoint to a Planner task in Power Automate

Summary

When you add attachment to a Planner task with Power Automate, you don’t add the whole file (unlike an email or an approval task). You add just a link to the file – a file stored in SharePoint in this case. As long as the file is in SharePoint, you can reference it from the task. It can be item attachments, it can be files from a document library, or you could even create an attachments template similar to the task checklists.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

4 thoughts on “Add 0-n attachments from SharePoint to a Planner task in Power Automate”

  1. Ally Ward says:
    August 16, 2022 at 7:21 pm

    Hi Tom
    I’ve got all of this working, including multiple attachments by using the array. However, I’m finding just one of each attachment is defaulting to ‘show on card’. How do I get all of them to not show on card?

    Reply
    1. Tom says:
      August 25, 2022 at 6:41 pm

      Hello Ally,
      I’m not sure if you there’s such an option, I never tried that.

      Reply
  2. DG says:
    February 8, 2023 at 3:48 pm

    I have a list of files in SharePoint, created by various users. I need each file uploaded into a submissions folder to create its own Planner task and attach the file to the task. Each file will have a different name. The above doesn’t look like it’s doing these steps.

    Reply
    1. Tom says:
      February 22, 2023 at 7:09 pm

      Hello DG,
      no, it doesn’t, the described solution only tells you how to attach file to task, only a small part of the process you described.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes