I currently work with a client who wants to simplify their workflow in Microsoft Planner. They needed files automatically attached to tasks whenever specific actions happened, like adding a file to SharePoint. This saved them time and ensured their team had the correct files ready for their tasks.
In this tutorial, I will show you how to attach single and multiple files to planner tasks using Power Automate.
Attach Files to Planner Tasks Using Power Automate
Imagine you are managing a project where team members regularly upload important documents, such as project briefs or status reports, to a SharePoint document library. Ensure these files are automatically attached to corresponding tasks in Microsoft Planner to keep everything organized.
For this example, I created a SharePoint document library called Project Documents:

Before I explain how to create the flow, we must create a plan in Planner. To create a new plan in Planner, log in with your credentials. Click on +New Plan in the left navigation, provide a name for the plan, select an existing group, and then click Create Plan.

Now follow the below steps:
1. Create an automated cloud flow. Give the flow name and select the trigger When a file is created (properties only). Also, provide the Site Address and Library Name.

2. Add Create sharing link for a file or folder action and provide below parameters:
- Site Address: Select the SharePoint site address from the drop-down.
- Library Name: Select the library name where your file will be uploaded.
- Item Id: Select the Id from the dynamic content (When a file is created (properties only)).
- Link Type: Select the link type based on the requirement.
- Link Scope: Select the link scope based on the requirement.

3. Next, add Create a task action and provide below parameters:
- Group Id: Select the Group Name of your plan.
- Plan Id: Select the Plan Name.
- Title: Provide the title from the dynamic content, or you can give your name.
- Bucket Id: Select the bucket id as Todo.
- Start Date Time: Provide the below expression, as the start date always equals today:
formatDateTime(utcNow(),'yyyy-MM-dd') - Due Date Time: Provide the below expression:
addDays(utcNow(),3,'yyyy-MM-dd')- Assigned User Ids: Provide the assigned user id.

4. Then add the Update task details action and provide the below parameters:
- Task Id: Select the Id from dynamic content.
- Description: Provide the description.
- Reference Alias 1: Provide the Name from (When a file is created (properties only) action).
- Reference Resource Link 1: Provide the Sharing link from dynamic content.

Save the flow, go to the SharePoint document library, and add the file.

After the flow runs successfully, go to Planner. You will see that the task has been created, and the file is attached.

Add Multiple Files to a Planner Task using Power Automate
In the example above, we saw how to add a single file to a Planner task. I will show you how to add multiple files to a Planner task using Power Automate.
Now follow the below steps:
1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

2. Add an “Initialize variable” action, provide a name for the variable, and set the type to Array.

3. To retrieve multiple files, add the Get files (properties only) action and provide the below parameters:
- Site Address: Select the SharePoint site address from the drop-down.
- Library Name: Select the library name where your file will be present.

4. Add Create sharing link for a file or folder action and provide below parameters:
- Site Address: Select the SharePoint site address from the drop-down.
- Library Name: Select the library name where your file will be uploaded.
- Item Id: Select the Id from the dynamic content (Get files (properties only)).
- Link Type: Select the link type based on the requirement.
- Link Scope: Select the link scope based on the requirement.

5. Inside For each, add Append to array variable action and provide below parameters:
- Name: Select the variable name from the drop-down.
- Value: Provide the below expression:
{
"alias": @{item()?['{Name}']},
"resourceLink": @{outputs('Create_sharing_link_for_a_file_or_folder')?['body/link/webUrl']}
}
6. Next, add Create a task action and provide below parameters:
- Group Id: Select the Group Name of your plan.
- Plan Id: Select the Plan Name.
- Title: Provide the title from the dynamic content, or you can give your name.
- Bucket Id: Select the bucket id as Todo.
- Start Date Time: Provide the below expression, as the start date always equals today:
formatDateTime(utcNow(),'yyyy-MM-dd') - Due Date Time: Provide the below expression:
addDays(utcNow(),3,'yyyy-MM-dd')- Assigned User Ids: Provide the assigned user id.

7. Then add the Update task details action and provide the below parameters:
- Task Id: Select the Id from dynamic content.
- Description: Provide the description.
- Reference: Provide the above array variable from dynamic content.

Now, click on save and run the flow manually. After the flow runs successfully, go to the planner, and you can see your task gets created with multiple files.

Conclusion
In this tutorial, I explained how to attach files to planner tasks using Power Automate. We started by setting up a flow to attach a single file to a task whenever a file is added to a SharePoint document library. Then, I expanded on how to attach multiple files to planner tasks using Power Automate.
Also, we cover below examples:
- Send Teams Messages Using Power Automate
- Add Attachments to SharePoint List Items using Power Automate
- Create an Array From a String Using Power Automate
- Add Item to SharePoint List Using Power Automate
- Create a Site Column in SharePoint Online Using Power Automate
- Create an Array From SharePoint List Items Using Power Automate

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.