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

run parameters for flow in powerapps, createfile, file content & file path

Please i am trying to use a flow that allows users to upload a pdf or docx file to a sharepoint site from powerapps. i have tried to add the flow in powerapps but not sure what the values for the run parameters file name, file content & file path should be, as i intend for it to be dynamic.

 

when i created the flow i chose the ask in powerapss option, but dont know how to complete the process in powerapps. thank you.flow.png

cheers,

Aj.

17 REPLIES 17
v-yamao-msft
Community Support
Community Support

Hi Aj01,

 

I guess that you have created a flow looks like below. May I suggest you configure the Folder Path when you creating the flow?

1.PNG

Then you could create an app and configure the OnSelect property of a button as savefilefrompowerapps.Run(TextInput1.Text,TextInput2.Text).

2.PNG

 

Hope this could be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Mabel,

 

Thank you for your response. Please can I just clarify, what folder path am I to use in creating the flow? The point is , I want people to be able to upload documents from their phones or laptops, so if I put a fixed folder path, would it still allow for this to happen? and how do I choose which folder path to use? Thank you.

 

Cheers,

Ajoke

Anonymous
Not applicable

HI Mabel,

 

I tried to add a folderpath like you suggested. Apart from not knowing what to do, I clicked on that folder icon by the side and this was the error message - 

  • error executing the api datasets/https%253A%252F%252Funilever.sharepoint.com%252Fsites%252FTalentSpottingGhana%252FTalent%252520Spotting%252520Ghana%252FForms%252FAllItems.aspx/rootfolders
  • *File name
    Please what does this mean? Thank you.
     
    Cheers,
    Aj

Hi Aj01,

 

When creating the flow, I tried to configure the Folder Path as “Ask in PowerApps”. As currently we are not able to create a connection from PowerApps to SharePoint library, so I was not able to configure the Folder Patch in the app.
So I tried to configure the Folder Path as the library which has been created in SharePoint site. Just as the screenshot I provided before.

 

From the error message, I assumed that you were not using the right Site URL, please enter the URL of your site, then click the “Show Picker” button to select the folder path.


About how to specify a SharePoint site, hope this document could be a reference for you:
https://powerapps.microsoft.com/en-us/tutorials/app-from-sharepoint/

 

Please feel free reply if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Mabel,

 

Thank you I made some progress today. I specified only the URL, and I was able to get options for the folders. A couple of things though,

 

1. My document library didn't show up in the list of folders (I chose documents as it was the closest.

2. When I wanted to define onselect parameters, the values as specified below didn't work and it still promted me for createfile_filename, etc,filecontent,filepath so not sure what to do next. I put in the Text1.text etc , but that didn't work.

 

This seems to be the missing part of the puzzle (and of course why my new folder wasn't showing). Thanks a lot.

 

Cheers,

Ajoke

 

Anonymous
Not applicable

I wanted to attach a picture, please see below.

issues2.png

 

Anonymous
Not applicable

Hi Mabel,

 

Please I am still expecting a reply on this. I am stuck on running the flow in powerapps. After specifying folder path in flow, on specifying the onselect parameters I am still being asked to input file name, content type , folder path and it is rejecting the suggested textinput1.text, etc Please help.

 

Thanks a lot,

Aj

Hi Aj01,

 

Have you created a Document library in SharePoint Online? In the screenshot I provided before, I selected "test library3", as I have already created this library. So if you have one, you should be able to select it when configuring "Folder Path".

 

Please try to delete the old flow then recreate a new one, then add it to the app.
I found that if I just update the flow, the changes would not reflect directly on the app, delete and recreate the flow would be helpful.

 

Please try it and let me know if it works.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Mabel,

 

Things are getting really frustrating over here. I created a new flow, still the run parameters, where TextInput1.Text,TextInput2.Text were still not accepted. I am not sure what to do. On the flow page I got the following error message

 

Flow run timed out because the starting action was not performed. Please try again

 

Also I noticed that both the CDS and the Sharepont sites were not available to be connected to my edit form. It's really

frustrating.

 

Cheers and thanks so far,

Aj

Anonymous
Not applicable

Hi Mabel,

 

Please see below a picture showing the error. Please did I miss anything?

last one.png

 

It shows invalid name.

 

Cheers and thank you.

 

Aj 

Hi Aj01,

 

About the flow you have created, the run parameters that are needed in the function box should be the actual name of the Text input controls on your app.


Please try to click the Text input controls under “Your Name” and “Your Email” to get the actual name of the Text input controls. By selecting the control, you could get the name at here:

2.PNG

 

Then when you run the flow, a file named as “Your Name” will be saved to the library, and the file content would be “Your Email”.

 

But please check this thread, currently it is not possible to attach a file to a form so there is not control can be used to open up a file picker and select the file and upload the file to Library or other destinations.
https://powerusers.microsoft.com/t5/PowerApps-Forum/Attachment-upload-to-library/m-p/8133/highlight/...

 

Also, you could vote the idea at here, and seems that this idea has a status “Planned”, I guess this feature would be coming soon:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/Attach-a-file-to-form/idi-p/20596


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Mabel,

 

Thank you for your response. The thing is I am not particular about attaching the file to the form. All I want to achieve is upload the file to sharepoint from Powerapps. I have even changed the design of the app and taken away the form and now all you do is click the upload button and select file. I want the resultant action to be that the file is uploaded to sharepoint (without the form).

 

I'm not sure I understand the text input control. Are you saying I should create a text input box where the name of the file would be spelt out? Can I achieve the above? Without a form because if that cannot be achieved, then I wonder why the flow exists?

Also I realised that when I click on the upload control, it opens mybrowse file window but all the files are greyed out, they cannot be selected. Please help because this function would take away a lot of my troubles.

 

Cheers,

Aj

Anonymous
Not applicable

Hi Mabel,

 

Please I am still expecting your response. Thank you.

 

Cheers,

Aj

 

 

 

Hi Aj,

 

Apologize for late response.

 

What do you mean by this “Upload control”? Is it the “Import” control under Controls or the “Add picture” control under Media? I am not sure with this.

 

Could you help to clarify this statement “Also I realised that when I click on the upload control, it opens mybrowse file window but all the files are greyed out, they cannot be selected”?
I am not able to reproduce this on my side, how could you do this?

 

By using a flow to create a file to SharePoint library, we can only specify the File Name and File Content using Text input controls. About your questions:
Yes, we should use a Text input control for the file name. It can be achieved by using Flow.
And currently PowerApps only support the connection to SharePoint list but not library, for the file content, we are not able to select files by opening the browse file window, so only text input controls can be used for it.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PowerApp_UploadFlow.jpg

 

I agree that this is beyond frustration. I have spent 8 hours tring to get my first Flow to flow (no pun intended). I created a Library in Sharepoint Online to store my photos. I created a Flow titled; Upload a Photo to Sharepoint from Power Apps. As the title inplies, I would like to upload a photo from PowerApps to my Sharepoint Library, NOT to Sharepoint list, which I know is not currently possible.

 

When I created my Flow, Dynamic content was added for the File Name & File Content fields. Createfile_Filename & Createfile_FileContent. In PowerApps I have tried creating both an AddPicture & Image control, and then adding them to my flow as;

UploadphotototoSharePointfromPowerApps.Run(AddMediaButton3,TextInput1.Text) where AddMediaButton3 is an AddPicture control and TextInput1 is a simple text input control.

or;

UploadphotototoSharePointfromPowerApps.Run(Image3,TextInput1.Text) where Image3 is an Image control and TextInput1 is a simple text input control.

 

Both of these bring up errors, specifically, "Invalid number of arguments". I have tried adding; Media, Text, Image, Picture, and several other terms to the end of the mmedia or image control with no success.

 

I have read through this thread and others indicating that both of these fields; FileName & FileContent need to be text fields. But then, how is the Flow supposed to upload a photo? I am totally stumped and cannot find one verifiable example describing what these two fields are supposed to contain.

 

I have successfully tried two different methods to copy photos to Excel via OneDrive using Patch. But I wanted to see how the Flow would work. But I have been striking out so far.

 

 

Anonymous
Not applicable

Have exactly the same problem here and tried to find a solution for hours .... it's really frustrating that it seems not to be possible to send multiple variables/values from PowerApps to Flow (or backwards).

Any news out there?

Hi everyone,

 

Sorry if I'm a little too late, but I've been having this issue and just found the solution.  No tricks - it's pretty easy:

 

  1. Ensure the name of your flow matches the "Ask in Powerapps" Flow variable (all characters before the underscore) that you're trying to pass, i.e. if your variable's name is "Sendanemail_To," then your Flow must be named "Sendanemail"
  2. Check how many copies of the same variable exist as an option in your Flow by clicking on the variable and scrolling to the bottom of your variable option window that pops up.  The number of copies will determine the number of arguments that you must include in the Run command in PowerApps, i.e. if you have "Sendanemail_To, Sendanemail_To_1,Sendanemail_To_2" available, you'll need to include three arguments in your Run command.
  3. At this point you may have to force PowerApps to recogize the updated flow immediately by either or all: (a) restarting PowerApps, (b) turning the flow off and turning it back on,/re-doing the Flow from scratch or via copying the Flow and deleting the original, ensuring the remaining copy is named per step #1.
  4. In Powerapps, assign your Flow as usual, and format the Run command parameters per this example: Sendanemail.Run(Text1,Text2...) where "Text" is either a Label or TextInput (with ".Text" appended, of course) or if you'd like to pass text directly as a parameter, just include whatever text you need enclosed in quotation marks.  In my case, I can either pass an email address enclosed in quotes, an email address that's a DataCardValue/Label/TextInput, or User().Email if I wanted an email sent to the user.
  5. Lastly, make sure that your number of arguments matches the number of variables per step #2.  If you don't need that many variables, assign double-quotes ("") in place of the variable.

Helpful resources

Announcements

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!

Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

Users online (5,308)