Re: Node API for Webhooks

I’ve read the documentation here for adding webhooks: https://github.com/gristlabs/grist-core/issues/76#issuecomment-1025802544 - However, in looking at the Node API which we use, there is no method to create a webhook. Am I correct that this doesn’t exist on the Node api client? So we need to create our own Axios call for the webhook? Is it possible for you to just add the webhook call to the API? Woud make it alot easier. thanks.

I’m curious about your use case, as this is usually a process that you only need to do a few times and still has to involve several other manual steps. Are you automating adding a large number of webhooks? Are you implementing an integrator?

Yes, of course, we can just use plain old Axios to create them, but it would be nice for the Node API to actually do this, so we don’t have to switch back and forth between the Node API and just regular Axios in the code. It’s really the same issue of why have a Node API package in the 1st place, if you can just do everything with Axios/cUrl to the API endpoints? Obviously, for most people it is just easier to use an Node API package instead of doing everything yourself via Axios.

Another example: I don’t think the Node API has any attachment method, so you are forced to create all your own code for attachments API. Again, not difficult, but a pain. The Node API should encompass all the API endpoints.

1 Like

One other point about webhooks: There doesn’t seem to be anyway to send a key or authorization in the webhook from Grist to the webhook endpoint. So once the webhook is fired Grist just sends the information to the webhook for the record, but there is no way to know that this request is coming from Grist itself. Grist needs to send some “key” or something so the webhook endpoint can verify that the request is coming from Grist.

1 Like