web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Attaching files/docume...
Power Automate
Unanswered

Attaching files/documents using Get file using path

(0) ShareShare
ReportReport
Posted on by 78

Hello community,

 

The purpose of this flow to create a planner task when a message is created in conversations and to include or update the task with the attachments.

 

I am able to successfully create a task when a new message is created on the planner conversatons tab.  For example, i am using the planner connector "When a new channel message is added" and condition to identify the name of the message and "Create a task" planner task creation. 

 

Since planner conversations have their sharepoint document library, I wanted to see if I can update the task with "Get file metadata using path " and "Create sharing link for a file or folder". Currently the connection is broken at Get file metadate using path action.

Status is 404 error. I am not sure if i've configured this correctly. 

 
Categories:
I have the same question (0)
  • AlanPs1 Profile Picture
    2,471 on at

    Hi @mthiru 

    Whilst this isn't a direct solution. You are using MS Teams and this uses email most of what you need and more is covered in here.

    Might be worth a look - https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Create-Planner-Task-and-Include-Attachments-From-Outlook-Email/ba-p/245121

     

    Maybe recreate this how to blog and see if you can transfer the techniques to your own project.

     

    If you find my posts helpful, please mark with thumbs up

     

    If this solves your issue, please click "Accept as Solution"

     

    Any questions, just ask.

     

    Thanks, Alan

  • v-bacao-msft Profile Picture
    on at

     

    Hi @mthiru ,

     

    Could you share a screenshot of the Flow configuration? Is the file you selected in the Get file metadata using path action fixed or dynamically changed?

     

    The 404 error indicates that there is a problem with the configuration of the action. Please provide more details so that we can analyze the specific problem.

     

    Best Regards,

  • mthiru Profile Picture
    78 on at

    Hi Alan,

     

    Thanks for your post. I originally referred to your post to start our own flow. Only issue is that we have exchange on premises so the flow is not triggered from the receipt of an email.  What I did as a work around was create a rule in Outlook 2016 and associated the my planner email account to a emails which would create a conversation in planner. Once the item is created in planner this would create a task. What i want to be able to do is update the task with any attachments in the conversation if there are attachments in the conversation. As a planner usually has it Sharepoint Library, I thought I would be able to grab the reference document from the Sharepoint library and update the planner task. I am not sure how to do that.

     

    I tried to follow your post from this point "Scope If Email Has Attachments Create Sharing Link”.

  • mthiru Profile Picture
    78 on at

    Hi, 

     

     

     

    Flow 1.PNGFlow 2.PNG

     

  • v-bacao-msft Profile Picture
    on at

     

    Hi @mthiru ,

     

    You can get the contentUrl and name of the file contained in the attachment and add the attachment to the task details using the variable.

    Image reference:

    99.PNG

    Details in Apply to each:

    100.PNG

    Hope it helps.

     

    Best Regards,

  • mthiru Profile Picture
    78 on at

    Hi Barry

     

    Thanks for the post. I followed your directions and I have an error at the update task details level.  Error is :The request is invalid:\r\nInvalid JSON. The property name '' is not valid. The name of a property cannot be empty."

     

    The flow creates the task but fails at stage 'updating the task with the attachment'. 

     

    {
    "error": {
    "code": "",
    "message": "The request is invalid:\r\nInvalid JSON. The property name '' is not valid. The name of a property cannot be empty.",
    "innerError": {
    "request-id": "8d6e6401-3e93-40c8-801b-5f9c7ee1ca4d",
    "date": "2019-11-15T18:26:02"
    }Flow 1.PNGFlow 2.PNG
    }
    }

  • v-bacao-msft Profile Picture
    on at

     

    Hi @mthiru ,

     

    Can you share the details of your configuration? In particular, the Update task details action and the expression configured in the Append to array variable.

    You didn't get the contentUrl correctly, so the value of resourceLink is null, which is not the expected parameter value to be configured.

    Please follow the expression I provided, here is contentUrl instead of content.

    115.PNG

     

    Best Regards,

  • mthiru Profile Picture
    78 on at

    Hi

     

    Please see images of the whole flow configuration. 

    In the append to array variable here is the following expressions used:

       Name : items('Apply_to_each')['name']

       ContentUrl: items('Apply_to_each')['contentUrl']

     

    Within the update task details, expressions used:

    Task id: body('Create_a_task')?['id']

    Variables: ('References')

     

    Flow 1.PNGFlow 2.PNG

  • v-bacao-msft Profile Picture
    on at

     

    Hi @mthiru ,

     

     

    Please note that the configuration of the screenshots I provided, the Update task details action is configured outside of Apply to each, and is the last step.

     

    Please check it.

     

    Best Regards,

  • mthiru Profile Picture
    78 on at

    @v-bacao-msft 

     

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard