Button to trigger Azure Logic APp from SharePoint Library

CRR 1 Reputation point
2021-10-20T15:44:01.027+00:00

Hi All,

I need to fire an Azure Logic App workflow from SharePoint Online library using a custom button in the library. I'm looking for ideas on how to create this but I can't find anything related. My workflow is kind of simple, I was looking for "For selected file" in Logic Apps but it's not available as a trigger. My workflow should be like Click the button in the SharePoint library and the workflow should send email notification for approval. The click/HTTPS POST call is a viable way to create the button? I would like some information or examples if possible.

Thanks

Microsoft 365 and Office | SharePoint Server | For business
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2021-10-21T06:39:28.577+00:00

    @CRR Logic app does have Sharepoint connector that can help you with different operations with your Sharepoint site. You can find the list of triggers and actions that are available. We do have different actions when the file is created/properties updated or modified you can refer to the Sharepoint connector document for more details on the action/trigger that are available. We do have a trigger For a selected file but unfortunately, it is only available for power automation.

    I am not an expert in SharePoint development so I can not confirm if it is possible to initiate the REST call from your button click on SharePoint site and I will suggest you to reach out to Sharepoint expert here if it is possible. I have also added office-sharepoint-server-customization tag if someone can confirm it here itself.
    If it is possible to initiate the REST call from the Sharepoint end (using the button) then you need to create an HTTP trigger logic app workflow. The trigger will generate the HTTP Post URL and you can use that URL in your button click in SharePoint library to trigger your logic app workflow.
    You can now outlook connector to send the email as per your needs or based on the POST request body that you are sending from Sharepoint.

    This tutorial talks about how to create the HTTP trigger and send email based on your POST request. The REST request call is initiated from the app service but in your case it will be sharepoint.

    Feel free to get back to me if you need any assistance in creating the workflow.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.