Welcome to this technology talk series hosted in Netwoven, where we will learn about some key advantages and disadvantages of webhooks in SharePoint Online,
if you have come here from our earlier talks {Part 1 and Part 2 here}
about webhooks then Welcome back!!! For sake of housekeeping, if you like this read, please leave a reply about who you are, what role do you play in your organization, how you use SharePoint every day and what you like and dislike about SharePoint (trust us, we would really like to know you). And if you dislike this read, then please let us know why and how we can improve it.
This is the third part of the webhook technology talk series. And today we discuss our thoughts about using webhooks.
So, our agenda today will be
- Discuss advantages and disadvantages of webhooks in SharePoint Online
- Best practices when using webhooks in SharePoint Online
Let’s briefly review what we learned from the previous parts in this series. We know that webhooks is a pattern/practice that has been around for a while now that allows us to develop event-driven applications. So, the way we apply it to SharePoint Online is through our client application/endpoint that will act as our medium to communicating with SharePoint Online and receive event notifications.
We subscribe our client application to a SharePoint Online List/Library using a POST message and then SharePoint Online validates our application’s channel by sending a token which we must accept and send back within a short time for a successful connection. Now, every time our SharePoint List/Library undergoes a change, it will send our application a POST message letting us know something has changed. It is then up to us to go back and find out what the change is…
Although, webhooks have many obvious advantages over other event notification practices that we have talked about in our first part of the series but from the current state of webhooks implementation in SharePoint Online we can understand how it may not seem like the best strategy just yet. Here is a list of what we see the pros and cons of webhooks in SharePoint Online to be
Advantages | Disadvantages |
Simple subscription and notification | 6-month max expiration |
Retry Ability (SharePoint online will retry up to 5 min to alert your application of the notification) | Bare minimum information from SPO |
Support delete events | Only Lists and Libraries are supported in SPO preview |
Industry standard approach to notifications | Acknowledgement must be received quickly |
In Line with modern development stack of SPFx | May take up to 5 min to receive the notification |
No Synchronous events in SPO | |
Subscriptions and notifications go over the same URL |
It is also worth mentioning some of the best practices we have found while using webhooks. Here are a few of them
With this we conclude this part of our series on Webhook and we hope it has been as interesting for you to read as it has been for us to write. Please, feel free to go back and review the previous parts of this series ( Read Part 1 and Part 2)