Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

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

(1) ShareShare
ReportReport
Posted on by 32
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 :-
 
  • mmbr1606 Profile Picture
    12,108 Super User 2025 Season 1 on at
    Want to connect SharePoint "submit for approval" button with power app
    hey
     
    this topic is a better fit for here:
     
    its the power automate part
     
     
  • scalca Profile Picture
    243 Super User 2025 Season 1 on at
    Want to connect SharePoint "submit for approval" button with power app
    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
     
  • Hritikpatel317 Profile Picture
    32 on at
    Want to connect SharePoint "submit for approval" button with power app
    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 Super User 2025 Season 1 on at
    Want to connect SharePoint "submit for approval" button with power app
    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
     
  • Suggested answer
    Nandit Profile Picture
    1,563 Super User 2025 Season 1 on at
    Want to connect SharePoint "submit for approval" button with power app
    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!
     
     
  • Hritikpatel317 Profile Picture
    32 on at
    Want to connect SharePoint "submit for approval" button with power app
    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.
  • scalca Profile Picture
    243 Super User 2025 Season 1 on at
    Want to connect SharePoint "submit for approval" button with power app
    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard