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 Apps / Want to connect ShareP...
Power Apps
Suggested Answer

Want to connect SharePoint "submit for approval" button with power app

(1) ShareShare
ReportReport
Posted on by 50
I have created a power automate flow on SharePoint document library, i am triggering this automation by clicking the button in SharePoint "submit for approval". Now i am creating a  power app and i want my power app to trigger this automation flow directly from power app. How can i add a button in Power App which triggers this backend automation.
SharePoint "Submit for approval" button Screen Shot :-
 
Categories:
I have the same question (0)
  • scalca Profile Picture
    243 Moderator on at
    the flow in this case can't be added to the app directly without putting some work because it can be triggered only for a selected file/item
    in power apps studio you'll find on the left action bar the flow menu to add or create flows to your app.
     
     
    i'll suggest to create a copy of the original flow and first of all change the trigger to power apps trigger
    then add a button with run function in the OnSelect property like 
    YourFlow.Run()
    pls share some more inputs of the apporval flow to further assist you
  • Hritikpatel317 Profile Picture
    50 on at
    Hi scalca,
     
    Thank you so much for quick reply, actually my flow is big that's why i didn't make any changes to my flow and i was finding some other solution for this but i think i have to make my power app like the way you suggest.
    I have three level approval work flow where i have members upload document and filled some other columns in sharepoint document library and then it goes for approval and i also have sharepoint list for approver where i can change my approvers.
    please provide me more information so that i can deployed my automation in power app.
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Hi Hritik, 

    You will need your SharePoint library as data source in your app and a vertical gallery with your library in the Items property. You will then add a button in the gallery to save the link to item in a Variable and trigger the approval flow with run function (passing the variable). 

    You will then create a Power Automate flow with Power Apps as the trigger and a text input. Followed by approval steps and any other steps. 
     
    For the button's OnSelect property in the app: 
    Set(path, ThisItem.'Link to item'); 
    Send_Approval_Flow.Run(path)
    This should be able to help you start and go into the direction of your desired solution. I hope I have interpreted this right. 

    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
     
  • scalca Profile Picture
    243 Moderator on at
    You'll have to adapt your flow in order to run it from the app itself
    the reason as I mentioned is, that currently you are using for a selected file in SharePoint library trigger, which obviously can't work to be triggered from an app.
    therefore it has also some dependency how you're designing the app and how the user should trigger the flow.
     
    from what you described you want the user to upload a document and give some information about it.
    what you can do is to prepare a form and upload document function with a save button to run the approval flow
    so the user can execute all the steps within the app to avoid switching between SharePoint and app
    I hope I gave you an idea on the next steps
     
  • Hritikpatel317 Profile Picture
    50 on at
    Hi scalca,
     
    Thank you so much for quick replies and solutions as you said before i have created a power automation in power app and connect flow with power app but I'm stuck in Onselect function i really don't know what to put in code. I have write my flow name and then .Run() but i don't know what to write in the bracket so that my flow will run properly. Can you please guide me what to write in bracket.
  • scalca Profile Picture
    243 Moderator on at
    there you have to pass arguments the flow is expecting to receive.
    for example it could look like this
     
    first of all your flow should contain the create file to sharepoint action, which expects the site address, folder path, file name and file content
    in case the user is uploading always into the same folder you could specify these arguments directly or environment variables
     
    file name and content depends on the file to upload
    there are different options to upload a file directly from PowerApps
    my preferred choice is to use the attachment control 
    here some links for you to check how it works
     

    now you have to pass it to the flow within the yourFlow.Run(title, owner, description, file: {name: name, contentBytes: Value}) action
     
    in case you have additional metadata for the file, add the Update file properties action, which allows you to update the created file with your data
     
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    hey
     
    this topic is a better fit for here:
     
    its the power automate part
     
     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard