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

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! 💪 🌠  

Tuesday Tips: Community Ranks and YOU

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: Community Ranks--Moving from "Member" to "Community Champion"   Have you ever wondered how your fellow community members ascend the ranks within our community? What sets apart an Advocate from a Helper, or a Solution Sage from a Community Champion? In today’s #TuesdayTip, we’re unveiling the secrets and sharing tips to help YOU elevate your ranking—and why it matters to our vibrant communities. Community ranks serve as a window into a member’s role and activity. They celebrate your accomplishments and reveal whether someone has been actively contributing and assisting others. For instance, a Super User is someone who has been exceptionally helpful and engaged. Some ranks even come with special permissions, especially those related to community management. As you actively participate—whether by creating new topics, providing solutions, or earning kudos—your rank can climb. Each time you achieve a new rank, you’ll receive an email notification. Look out for the icon and rank name displayed next to your username—it’s a badge of honor! Fun fact: Your Community Engagement Team keeps an eye on these ranks, recognizing the most passionate and active community members. So shine brightly with valuable content, and you might just earn well-deserved recognition! Where can you see someone’s rank? When viewing a post, you’ll find a member’s rank to the left of their name.Click on a username to explore their profile, where their rank is prominently displayed. What about the ranks themselves? New members start as New Members, progressing to Regular Visitors, and then Frequent Visitors.Beyond that, we have a categorized system: Kudo Ranks: Earned through kudos (teal icons).Post Ranks: Based on your posts (purple icons).Solution Ranks: Reflecting your solutions (green icons).Combo Ranks: These orange icons combine kudos, solutions, and posts. The top ranks have unique names, making your journey even more exciting! So dive in, collect those kudos, share solutions, and let’s see how high you can rank!  🌟 🚀   Check out the Using the Community boards in each of the communities for more helpful information!  Power Apps, Power Automate, Copilot Studio & Power Pages

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)

Users online (6,316)