Perry Kankam is a Software Engineer for ThreeWill. Perry started out programming in C# and XML. Over the years, he has continuously added a variety of skills to his skillset including recent mobile application development technologies like Angular, React and Ionic.
Introduction
I recently was involved in a project which required a heavy-load of azure functions, webhooks, and runbooks. This was a new territory that I enjoyed intensely.
A big task list needed to be carried out after we initiated some changes to a library in SharePoint. To do this, we decided to utilize Azure functions and not Microsoft flows or Power App for this project. This is because we needed these tasks to be carried out at a broader level; a Microsoft Flow or Power App will only be tied to one list, in a specific site. We wanted these tasks to be carried out no matter which site in the tenant was used.
Steps to Manually Connect Azure Webhooks to a SharePoint List
Webhooks are user-defined HTTP endpoints that are usually triggered by an event. Today, we will focus on a specific division of this entire process that threw me for a loop in the initial stages of the project. This was manually connecting Azure Webhooks to SharePoint list via Chrome Extension. I used Chrome to test and make sure my webhook was actually being triggered by the list or library.
Step 1: Install the Chrome Extension
The Chrome extension required for this activity is “SP Editor.” Find it here.
Step 2: Access Extension in your DevTools
Once the extension has been installed, you can access it in your DevTools
Step 3: Register the Webhooks to Your SharePoint Site
Navigate to the list or library you want to register the Webhook to. Under the Webhooks tab on the left pane, you will see a list of all the current webhooks you have registered to your Sharepoint site. It should look like below:
It spells out exactly which list each webhook is tied to, the client state, expiration date, and time and ID.
Step 4: Add a New Webhook
To add a new webhook, you need to select the list/library you want to use from the dropdown (this contains all lists and libraries in your SharePoint site), specify the full URL of the webhook endpoint (I used my Azure Function URL from my Azure portal for this) and click the add button.
Step 5: Remove a Webhook
To remove/unregister a webhook from a list/library, scroll through the list provided by the extension and click the “x” next to it.
Conclusion
There are other ways to reach this same goal, but, this seemed to be the most convenient way to connect your webhook to your library or list and test in a real SharePoint environment. To continue the conversation, read another post that I wrote about Connecting Nintex Workflows to SharePoint List Surveys.
0 Comments