Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 3NWMHTwp89/YpSd7avDs7c
Power Automate - Using Flows
Unanswered

Create a task in planner and add file from sharepoint

Like (0) ShareShare
ReportReport
Posted on 11 Apr 2023 18:41:15 by

Good afternoon,

 

I created a flow that will add a new task to Planner, and name it after a file in a sharepoint folder. Basically, I have to create a bunch of planner tasks, name them the same name as files in sharepoint, then attach that file. I have successfully created the task and named it after the file, but I can't figure out how to get that file attached. I will be dropping multiple files in at a time, so each task needs the associated file attached. Any ideas? So I drop five files in the sharepoint folder, 5 tasks are created, each named after each file, then attached that corresponding file. Here is what I have:

Flow.JPG

  • dw_22801 Profile Picture
    on 20 Apr 2023 at 20:21:17
    Re: Create a task in planner and add file from sharepoint

    Thanks!

  • Expiscornovus Profile Picture
    31,661 Most Valuable Professional on 13 Apr 2023 at 08:02:03
    Re: Create a task in planner and add file from sharepoint

    Hi @dw_22801,

     

    You should be able to delete the trigger action and replace it with another one. However, the fields of that action which are used in other actions will also be removed. So, you would have to reconfigure settings of other actions as well, when you replace a trigger action.

  • dw_22801 Profile Picture
    on 12 Apr 2023 at 18:54:03
    Re: Create a task in planner and add file from sharepoint

    Thanks! Is there not a way to just replace the deprecated action, or delete it and add a new one in place? Can actions only be added at the end? Surely I don't have to create an entirely new flow since I want to change the first action?

  • Expiscornovus Profile Picture
    31,661 Most Valuable Professional on 12 Apr 2023 at 09:12:48
    Re: Create a task in planner and add file from sharepoint

    Hi @dw_22801,

     

    You can use a Update task details action for this. In that action you can set a reference like a link to a file. You just need to collect the file path.

     

    Btw, it looks like you are using a deprecated trigger action. Which I wouldn't recommend using.

     

    Below is an example

     

    1. Place a Get file metadata using path action directly after the trigger action

    a. Use the expression below to use the x-ms-file-id property value and decode the characters which are encoded (like the / slash)

     

    replace(replace(triggerOutputs()?['headers/x-ms-file-id'], '%252f', '/'), '%2b', ' ')

     

     

    2. Place a Update task details action at the end

    a. Use the id of the Create a task action

    b. Use the File Name variable in the Reference Alias

    c. Use the expression below as the hyperlink to the file. In concatenates the site address and the relative file path values together

     

    concat(trigger()['inputs']['parameters']['dataset'], outputs('Get_file_metadata_using_path')?['body/Path'])

     

     

    concat_path_siteaddress.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Using Flows

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 7 Super User 2025 Season 1

#1
rzaneti Profile Picture

rzaneti 7 Super User 2025 Season 1

#3
vipuljain03 Profile Picture

vipuljain03 4

Overall leaderboard

Featured topics

Restore a deleted flow
Loading started