question

CRR-9242 avatar image
0 Votes"
CRR-9242 asked MayankBargali-MSFT commented

Button to trigger Azure Logic APp from SharePoint Library

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

azure-logic-appsoffice-sharepoint-server-customization
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT commented

@CRR-9242 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.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your suggestion, I will check the tutorial. We had everything done and working in Power Automate, but we have to change to Logic Apps due to an issue with another environment. That's why I'm looking for a similar trigger "for a selected file" in Logic Apps.

0 Votes 0 ·

@CRR-9242 Thanks for your response. Feel free to get back to me if you need any assistance with your logic app workflow. Feel free 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·