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 / Save Forms Attachment ...
Power Automate
Unanswered

Save Forms Attachment to Specific OneDrive Folder

(0) ShareShare
ReportReport
Posted on by 114

I have a very simple form with two questions;

 

Category (dropdown list)

 - cat01

 - cat02

 - cat03

 

Attachment (file upload)

 

When the form is submitted I am using a flow to generate an approval, this works as expected. See image of current working flow.

 

Screenshot 2022-03-30 143705.png

 

After the approval is true, I want to save the attachment to a specific folder in my OneDrive. e.g.

 

if ms form category == cat01 then save to My Docs/stuff/cat01

if ms form category == cat02 then save to My Docs/stuff/cat02

if ms form category == cat03 then save to My Docs/stuff/cat03

 

I am using OneDrive for business. 

 

How can I achieve this?

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @jonboylib 

    It looks like you have everything figured out except how to save the files to a specific OneDrive folder.

    Here is a link to a blog post that explains how

    The blog post saves the file to SharePoint - just substitute a OneDrive for Business create file action for the SharePoint create file action.

    Obviously you'll need a condition to determine to which folder you will save the files.

     

     

  • jonboylib Profile Picture
    114 on at

    @ScottShearer Thanks, I now have most of it working. I am able to create the file as you have suggested, however when I add a condition to check for the form 'Budget Code' it always fails.

     

    I am checking if the 'Budget Code' is equal to '6987 - Equipment'. This is a string type variable (varBudgetCode) I set earlier in the flow.

     

    Any ideas why it's not working? See images below.

     

    Screenshot 2022-03-30 143705.pngScreenshot 2022-03-30 154542.pngScreenshot 2022-03-30 154629.pngScreenshot 2022-03-30 154701.png

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @jonboylib 

    Can you post a screen shot of your condition in edit/design mode?

     

     

  • jonboylib Profile Picture
    114 on at

    Sure, see below @ScottShearer 

     

    Screenshot 2022-03-30 160056.png

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @jonboylib 

    Can you do the following please:

    1. Add a compose action immediately after the Get file metadata action
    2. set the compose action equal to the varBudget variable
    3. Run the Flow and post a screen shot of the run that shows the Compose action outoput

    Also, I said to add a condition but you could have used a switch action as well.

     

  • jonboylib Profile Picture
    114 on at

    I've done that, see image below @ScottShearer Still returning false.

     

    Screenshot 2022-03-30 161259.png

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @jonboylib 

    Try putting the variable reference in your condition inside of a trim() expression

    Also try deleting 6987 - Equipment in your expression and re-entering it. 

  • jonboylib Profile Picture
    114 on at

    I've added it inside a trim as you can see, still fails @ScottShearer 

     

    Screenshot 2022-03-30 164000.png

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @jonboylib 

    Please add trim() to the left side of your condition and test

     

  • jonboylib Profile Picture
    114 on at

    @ScottShearer adding a trim on both sides worked - thanks!

     

    Any idea why?!

     

    The official documentation is really bad.

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard