Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Df5c+DHKepovIHlJ6fqCjk
Power Automate - Building Flows
Answered

Adding attachments from Microsoft Form to Task Planner

Like (0) ShareShare
ReportReport
Posted on 6 Jun 2024 06:47:23 by 22

Hey all

 

I was wondering if you could help me - I have built a flow which collects user question data and uploaded documents into a task in planner. However, I can't add the uploaded file to task for the life of me - I've gone through every possible walkthrough on forums that I've found and nothing seems to work - can anyone tell me where I'm going wrong please?

 

Parse JSON is as follows:

 

{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {},
"size": {
"type": "integer"
},
"referenceId": {
"type": "string"
},
"driveId": {
"type": "string"
},
"status": {
"type": "integer"
},
"uploadSessionUrl": {}
},
"required": [
"name",
"link",
"id",
"type",
"size",
"referenceId",
"driveId",
"status",
"uploadSessionUrl"
]
}
}
 
looking at the failed run(s), it is failing on the 'add attachment' step, which I've coded the 'name' to be as follows:
 
item()?['name']
 
I've also coded the 'update task details' to include the following in the references section (screenshot 3)
 
Any help on this would be great!
 
Thanks
  • Sphynx2120 Profile Picture
    22 on 06 Jun 2024 at 12:46:09
    Re: Adding attachments from Microsoft Form to Task Planner

    Hey

     

    With some tweaking at my end, I have managed to figure what I was doing wrong. I must say thank you for your help in this matter, you have been amazing and patient with myself!

     

    Thank you so much

  • Sphynx2120 Profile Picture
    22 on 06 Jun 2024 at 10:31:53
    Re: Adding attachments from Microsoft Form to Task Planner

    Hey

     

    I've tried the above and now the flow will not work either way (with or without an upload) 😞

     

    Is the condition an AND function or is it an OR function? I've tried both and both fail

     

    This is the error that the flow throws out (please find attached screenshot)

  • Verified answer
    v-yetonggu-msft Profile Picture
    on 06 Jun 2024 at 10:14:48
    Re: Adding attachments from Microsoft Form to Task Planner

    Hi @Sphynx2120 ,

    Ok,I don't know if you're going to put the ones that don't contain attachments in different buckets, but if you're going to separate them into different buckets, you can look at this test:

    Add a create a task control to each of the yes and no branches, so that when attachments are included, the task is created in one bucket, and if there are no attachments, the task is created in another bucket

    vyetonggumsft_3-1717668877135.png

    vyetonggumsft_1-1717668627833.png

    Best Regards,

    Sunshine Gu

  • Sphynx2120 Profile Picture
    22 on 06 Jun 2024 at 10:03:03
    Re: Adding attachments from Microsoft Form to Task Planner

    Hey

     

    Thanks for your help, we are nearly there!

     

    The flow works, however it is putting in a blank task along side the one that has the upload attached? PLease find attached screenshots

  • v-yetonggu-msft Profile Picture
    on 06 Jun 2024 at 09:53:03
    Re: Adding attachments from Microsoft Form to Task Planner

    Hi @Sphynx2120 ,

    Please take a screenshot of the flow from my last reply, whether you have uploaded a file or not, we have already created the task. If you upload a file then we update the task and add attachments, and if you don't upload a file, then we have already created the task before we judgement.

     

    Best Regards,

    Sunshine Gu

  • Sphynx2120 Profile Picture
    22 on 06 Jun 2024 at 09:46:00
    Re: Adding attachments from Microsoft Form to Task Planner

    Please find attached screenshot of current flow

  • Sphynx2120 Profile Picture
    22 on 06 Jun 2024 at 09:44:41
    Re: Adding attachments from Microsoft Form to Task Planner

    Hey

     

    We need a task with the uploaded file that customer uploads on the form - that is completed as above 🙂

    If the customer does not upload a file, we still need a task creating, but obviously without an attachment on the task card - is this possible with a condition?

  • v-yetonggu-msft Profile Picture
    on 06 Jun 2024 at 09:39:45
    Re: Adding attachments from Microsoft Form to Task Planner

    Hi @Sphynx2120 ,

    So what do you want to update the task in the case of false?

     

    Best Regards,

    Sunshine Gu

  • Sphynx2120 Profile Picture
    22 on 06 Jun 2024 at 09:36:35
    Re: Adding attachments from Microsoft Form to Task Planner

    Hey

     

    Thanks for your help.

     

    I'm a bit confused here - I require the task to be made if the customer has or hasn't uploaded any files, how would I do that?

     

    I'm assuming you create a task under the false column, and then update task details? But what needs to go in the condition?

  • v-yetonggu-msft Profile Picture
    on 06 Jun 2024 at 09:14:18
    Re: Adding attachments from Microsoft Form to Task Planner

    Hi @Sphynx2120 ,

    When the flow is triggered, we create a task first, and then determine whether to upload the file, if the file is uploaded, we will update the task details, and if it is not uploaded, we will not perform any operation.

    Please check this test:

    vyetonggumsft_0-1717665096982.png

    vyetonggumsft_2-1717665330096.png

    empty(Upload File Dynamic Content)

    Best Regards,

    Sunshine Gu

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 - Building Flows

#1
stampcoin Profile Picture

stampcoin 45

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 25 Super User 2025 Season 1

#3
Chriddle Profile Picture

Chriddle 21 Super User 2025 Season 1

Overall leaderboard