cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Add Form Attachments to Planner Task

Hello,

I am very new to Power Automate, but I was able to use Forms to build a flow that creates a task in Planner when a Form is submitted.  I am able to Update the Task Details with all the information I need except the files that the submitter added to the form.  Instead, those files are moved to a folder somewhere that is not easy to access.

 

How do I get the files submitted with the form added to the Planner Task?

Thanks,

Jacob

27 REPLIES 27
rsaikrishna
Community Champion
Community Champion

@Anonymous 

 

The attachments submitted in the form are stored in the OneDrive. 

 

To copy the attachments from the MS Form, you can refer the following blog:

https://www.bythedevs.com/post/working-with-files-on-ms-forms-in-ms-power-automate

 

If you want to attach the attachments with the Planner Task, you can refer the following blog:

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

Note: The above blog save the attachments from email but you can ignore it and use the logic to create planner task and include attachments.

 

Please let me know if you have any questions.

 

Regards

Krishna Rachakonda

If my reply helps resolving the issue, please mark the reply as Accepted Solution

 

Anonymous
Not applicable

Hello Krishna, I appreciate the feedback. Unfortunately, I'm not understanding the coding well enough to decipher how to use these examples on a MS Form instead of an email.  Planner Tasks have a place to put attachments so I would really like the attachments from the Form to end up there instead of having to look them up in the OneDrive folder.  Can you help clarify the logic behind this flow so that I might be able to understand how to convert?  Thanks.

@Anonymous 

 

I will create a sample and will share it with you shortly.

 

Regards

Krishna

Anonymous
Not applicable

Was this solved? Is there an example with screenshots you can post? I'm also confused about this and am having trouble translating all this Outlook instruction to Forms attachments.

Anonymous
Not applicable

Hi tojzanc, My IT department figured it out for me.  I'll attach photos of the flow they used.

Anonymous
Not applicable

jacobs1292_0-1595433526531.png

 

dm_elementwa
Advocate I
Advocate I

After scraping through SO MANY FORUMS and watching a bucket load of YouTube videos I have FINALLY worked out the solution to this and its no where near as complicated as some people made it out to be.

I am a novice to intermediate Power Automate user, so I'll try to keep this simple. I hope this helps someone! Took me 3 days to figure out.

 

1. OK, so first you want to set up capturing the form responses as per usual and I also like to grab the profile of the user who submitted the request so I can use it later on in the flow. I then have it create an item in a Sharepoint List (which I made columns for all my form responses).

Screen Shot 2020-10-14 at 10.34.03 am.png

 

2. Add the "Parse JSON" step (this is where I got confused). The Content is the attachment form field and the Schema (to make life easier) you can just copy and paste the below:

 

{
    "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"
        ]
    }
}

 

Screen Shot 2020-10-14 at 10.46.54 am.png

 

3. Next step is to add "Get File Content Using Path". (Don't worry about adding the Apply to Each, it will automatically apply this in a moment). Type in the file path to the OneDrive location. It will be /Apps/Microsoft Forms/***Form Folder Name Here***/Question/ then add the "name" dynamic content. It will automatically switch this to an Apply To Each step and apply the Body in the output section.

In this step I have it update the attachment to the sharepoint item (not sure if this step is crucial to then adding it to Planner, but I did it anyway!)

Screen Shot 2020-10-14 at 10.50.45 am.png

 

4. Add your next step outside of the Apply To Each box which is to "Create a Task" in Planner. Then add a 1 minute delay following the creation of the task.

Screen Shot 2020-10-14 at 10.59.48 am.png

 

5. Now add an "Apply to Each" and within this step, "Update Task Details". Now the part where it adds attachments! The reference alias will be the 'name' of the file and the reference resource is the 'link'. No weird expressions, formulas or complicated code - these are dynamic content options that will appear for you in the list! 🙂 

Screen Shot 2020-10-14 at 11.02.45 am.png

 

EXAMPLE:

Screen Shot 2020-10-14 at 11.06.47 am.png

***IMPORTANT*** If you require several people within your organisation to be able to access these attachments, you have to give them permission from the OneDrive folder to be able to view or edit these links!
Open your OneDrive App in a browser and navigate to the Form folder. You'll want to grant access to the 'Question' folder for that form. Click on the more options (...) and select 'Manage access'. Then, where it says "Direct Access" click on the "+" icon and type in the group or individual email addresses of the people you would like to grant the access too. I gave them edit permissions, but I'm pretty sure view permissions work also.

Screen Shot 2020-10-14 at 11.15.47 am.png

Screen Shot 2020-10-14 at 11.16.16 am.png

 

Now you're done! 🍾🥳

Thank you for the step-by-step explanation, I just started with power automation and I think this saves me a few days of work.

By the way: I omitted the sharepoint update step and it seems to work all the same.

 

you're welcome! glad I could help someone and minimise days of searching 😉

juresti
Continued Contributor
Continued Contributor

Hi,

 

I've been trying to attach a file this way, except it links it instead.

 

What does your link look like which causes it to attach instead of link?

 

I don't see a way to attach it.

 

Capture.PNG

 

Hey @juresti ,

 

Unfortunately, that part I couldn't work out. I too wanted the attachments, not a link to the attachment, and I tried several formulas to try and detect the type of attachment, but it wouldn't work for me. I just had to stick with links.

juresti
Continued Contributor
Continued Contributor

Thanks @dm_elementwa 

 

I thought I may had missed something.

 

By the way, I have also looked at the API access for planner which would expose all available interactions with the connector.

https://docs.microsoft.com/en-us/graph/api/plannertaskdetails-update?view=graph-rest-1.0&tabs=http

 

I didn't find an attachment method there either. It must exist though, because they let you attach manually. It could be it is just not documented.

At least that is what I think.

 

cwest204
Regular Visitor

This method works great if there is an attachment.  However, it fails when there is no attachment.  Has anyone else experienced this or knows how to solve for the "null" value?  When I attempt to put a control in for attachment, or even adding a question asking if they have an attachment I get the same error.  The error reads, "Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of the template action 'Apply_to_each' at line '1 and column '7592' cannot reference action 'Parse_JSON' must either be in 'runAfter' path or within a scope action on the 'runAfter' path of action 'Apply_to_each' or be a Trigger.'.'.

Any ideas/help?

This was my solution to solve the problem of the flow failing when there is no attachment submitted.

 

After the steps for When a new response is submitted and Get response details, add a step to Initialize variable. Call it something like formsAttachments and set the type to Array.

 

Screen Shot 2021-08-26 at 1.19.19 PM.png

 

Add a condition step after initializing the variable to check if there's an attachment. Do this by using the formula empty() and inside the parentheses put the dynamic content for the title of your attachment question. Set this to check if empty is equal to false.

 

Screen Shot 2021-08-26 at 1.12.03 PM.png

 

Inside the If yes step, put the Parse JSON and Get file content using path steps. You'll also have to add a step to Append to array variable. The name will be the same name you used in the initialize variable step. Now for the Value field, this will change depending if you are using a Form that you created through your own account (OneDrive) or a Form you created through Teams (SharePoint).

 

If you created the Form through your own account, the files will be in OneDrive, so the Value will be:

{

"Name": "@{items('Apply_to_each')['name']}",

"ContentBytes": @{base64(body('Get_file_content_using_path'))}

}

 

If you created the Form through Teams, the files will be in SharePoint, so the Value will be:

{
"alias": "@{items('Apply_to_each')['name']}",
"resourceLink": @{items('Apply_to_each')['link']}
}

 

Screen Shot 2021-08-26 at 1.21.19 PM.png

 

Then add your Create a task and Update task details steps. In the References area, click the small T in the upper right corner to Switch to input entire array, click to Add dynamic content and select your formsAttachments variable.

 

Screen Shot 2021-08-26 at 1.36.55 PM.png

 

Screen Shot 2021-08-26 at 1.37.08 PM.png

 

And done! I hope this helped 🙂

 

Screen Shot 2021-08-26 at 1.04.25 PM.png

Thank you @VeronicaDeSalvo 

 

I stopped using planner partly because I couldn't add attachments.

 

Adding the attachments is the same as adding them to an Send an Email action.

 

I can see it is hard to figure it out on planner because of the name they use - Reference Alias. . . .

 

It is also good to learn there is a difference between Teams and other account attachment formats.

@dm_elementwa Thanks a bunch ! You made my day !!!

Thank you so much, this worked perfectly!  I skipped the whole create item in SP bit, as I don't need another list to save it in, and it still worked.  I think I was getting stuck where I wasn't adding an apply to each for the update task.

Hi KatLane, I'm really new to this but have somehow managed to create a flow that creates a Task from a Form and posts a message in the Chat section, however, mine is not picking up attachments, but I also do no need to save anything to SP, but just need to get the attachment from the form added/passed to the Task created. Would you mind sharing your Flow please?

Here's an image of my current flow.

 

Thank you!

Create task from form.jpg

@dm_elementwa I keep trying this but I keep getting a "404 -File or directory not found" error. It works fine for extracting/attaching the attachments from Forms to Lists. But when I try to attach the attachments to a Planner Task, I get this 404 error. I've tried multiple different ways, but keep getting the same result. Can someone please explain where I'm going wrong?

 

 

Helpful resources

Announcements

Exclusive LIVE Community Event: Power Apps Copilot Coffee Chat with Copilot Studio Product Team

It's time for the SECOND Power Apps Copilot Coffee Chat featuring the Copilot Studio product team, which will be held LIVE on April 3, 2024 at 9:30 AM Pacific Daylight Time (PDT).     This is an incredible opportunity to connect with members of the Copilot Studio product team and ask them anything about Copilot Studio. We'll share our special guests with you shortly--but we want to encourage to mark your calendars now because you will not want to miss the conversation.   This live event will give you the unique opportunity to learn more about Copilot Studio plans, where we’ll focus, and get insight into upcoming features. We’re looking forward to hearing from the community, so bring your questions!   TO GET ACCESS TO THIS EXCLUSIVE AMA: Kudo this post to reserve your spot! Reserve your spot now by kudoing this post.  Reservations will be prioritized on when your kudo for the post comes through, so don't wait! Click that "kudo button" today.   Invitations will be sent on April 2nd.Users posting Kudos after April 2nd at 9AM PDT may not receive an invitation but will be able to view the session online after conclusion of the event. Give your "kudo" today and mark your calendars for April 3, 2024 at 9:30 AM PDT and join us for an engaging and informative session!

Tuesday Tip: Unlocking Community Achievements and Earning Badges

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!     THIS WEEK'S TIP: Unlocking Achievements and Earning BadgesAcross the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. These badges each signify a different achievement--and all of those achievements are available to any Community member! If you're a seasoned pro or just getting started, you too can earn badges for the great work you do. Check out some details on Community badges below--and find out more in the detailed link at the end of the article!       A Diverse Range of Badges to Collect The badges you can earn in the Community cover a wide array of activities, including: Kudos Received: Acknowledges the number of times a user’s post has been appreciated with a “Kudo.”Kudos Given: Highlights the user’s generosity in recognizing others’ contributions.Topics Created: Tracks the number of discussions initiated by a user.Solutions Provided: Celebrates the instances where a user’s response is marked as the correct solution.Reply: Counts the number of times a user has engaged with community discussions.Blog Contributor: Honors those who contribute valuable content and are invited to write for the community blog.       A Community Evolving Together Badges are not only a great way to recognize outstanding contributions of our amazing Community members--they are also a way to continue fostering a collaborative and supportive environment. As you continue to share your knowledge and assist each other these badges serve as a visual representation of your valuable contributions.   Find out more about badges in these Community Support pages in each Community: All About Community Badges - Power Apps CommunityAll About Community Badges - Power Automate CommunityAll About Community Badges - Copilot Studio CommunityAll About Community Badges - Power Pages Community

Tuesday Tips: Powering Up Your Community Profile

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!   This Week's Tip: Power Up Your Profile!  🚀 It's where every Community member gets their start, and it's essential that you keep it updated! Your Community User Profile is how you're able to get messages, post solutions, ask questions--and as you rank up, it's where your badges will appear and how you'll be known when you start blogging in the Community Blog. Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile.     Password Puzzles? No Problem! Find out how to sync your Azure AD password with your community account, ensuring a seamless sign-in. No separate passwords to remember! Job Jumps & Email Swaps Changed jobs? Got a new email? Fear not! You'll find out how to link your shiny new email to your existing community account, keeping your contributions and connections intact. Username Uncertainties Unraveled Picking the perfect username is crucial--and sometimes the original choice you signed up with doesn't fit as well as you may have thought. There's a quick way to request an update here--but remember, your username is your community identity, so choose wisely. "Need Admin Approval" Warning Window? If you see this error message while using the community, don't worry. A simple process will help you get where you need to go. If you still need assistance, find out how to contact your Community Support team. Whatever you're looking for, when it comes to your profile, the Community Account Support Knowledge Base article is your treasure trove of tips as you navigate the nuances of your Community Profile. It’s the ultimate resource for keeping your digital identity in tip-top shape while engaging with the Power Platform Community. So, dive in and power up your profile today!  💪🚀   Community Account Support | Power Apps Community Account Support | Power AutomateCommunity Account Support | Copilot Studio  Community Account Support | Power Pages

Super User of the Month | Chris Piasecki

In our 2nd installment of this new ongoing feature in the Community, we're thrilled to announce that Chris Piasecki is our Super User of the Month for March 2024. If you've been in the Community for a while, we're sure you've seen a comment or marked one of Chris' helpful tips as a solution--he's been a Super User for SEVEN consecutive seasons!   Since authoring his first reply in April 2020 to his most recent achievement organizing the Canadian Power Platform Summit this month, Chris has helped countless Community members with his insights and expertise. In addition to being a Super User, Chris is also a User Group leader, Microsoft MVP, and a featured speaker at the Microsoft Power Platform Conference. His contributions to the new SUIT program, along with his joyous personality and willingness to jump in and help so many members has made Chris a fixture in the Power Platform Community.   When Chris isn't authoring solutions or organizing events, he's actively leading Piasecki Consulting, specializing in solution architecture, integration, DevOps, and more--helping clients discover how to strategize and implement Microsoft's technology platforms. We are grateful for Chris' insightful help in the Community and look forward to even more amazing milestones as he continues to assist so many with his great tips, solutions--always with a smile and a great sense of humor.You can find Chris in the Community and on LinkedIn. Thanks for being such a SUPER user, Chris! 💪 🌠  

Find Out What Makes Super Users So Super

We know many of you visit the Power Platform Communities to ask questions and receive answers. But do you know that many of our best answers and solutions come from Community members who are super active, helping anyone who needs a little help getting unstuck with Business Applications products? We call these dedicated Community members Super Users because they are the real heroes in the Community, willing to jump in whenever they can to help! Maybe you've encountered them yourself and they've solved some of your biggest questions. Have you ever wondered, "Why?"We interviewed several of our Super Users to understand what drives them to help in the Community--and discover the difference it has made in their lives as well! Take a look in our gallery today: What Motivates a Super User? - Power Platform Community (microsoft.com)

March User Group Update: New Groups and Upcoming Events!

  Welcome to this month’s celebration of our Community User Groups and exciting User Group events. We’re thrilled to introduce some brand-new user groups that have recently joined our vibrant community. Plus, we’ve got a lineup of engaging events you won’t want to miss. Let’s jump right in: New User Groups   Sacramento Power Platform GroupANZ Power Platform COE User GroupPower Platform MongoliaPower Platform User Group OmanPower Platform User Group Delta StateMid Michigan Power Platform Upcoming Events  DUG4MFG - Quarterly Meetup - Microsoft Demand PlanningDate: 19 Mar 2024 | 10:30 AM to 12:30 PM Central America Standard TimeDescription: Dive into the world of manufacturing with a focus on Demand Planning. Learn from industry experts and share your insights. Dynamics User Group HoustonDate: 07 Mar 2024 | 11:00 AM to 01:00 PM Central America Standard TimeDescription: Houston, get ready for an immersive session on Dynamics 365 and the Power Platform. Connect with fellow professionals and expand your knowledge. Reading Dynamics 365 & Power Platform User Group (Q1)Date: 05 Mar 2024 | 06:00 PM to 09:00 PM GMT Standard TimeDescription: Join our virtual meetup for insightful discussions, demos, and community updates. Let’s kick off Q1 with a bang! Leaders, Create Your Events!  Leaders of existing User Groups, don’t forget to create your events within the Community platform. By doing so, you’ll enable us to share them in future posts and newsletters. Let’s spread the word and make these gatherings even more impactful! Stay tuned for more updates, inspiring stories, and collaborative opportunities from and for our Community User Groups.   P.S. Have an event or success story to share? Reach out to us – we’d love to feature you!

Users online (5,276)