Inbound Webhook

I need to populate a Grist table with data scraped from DNS once per day. It looks like a webhook is the way to go. I have scoured the documentation and this forum. All I can find is information about triggering a webhook from within Grist and sending data outbound. That is the opposite of what I want.

I’m using Hexomatic to scrape. They have a webhook function which I can use to send data from there to someplace else. They need a URL. How do I find that? Is there anything else I need to do on the Grist side to prepare it to catch incoming data?

Hi @Mojosam.

You can populate data in Grist using the REST API. The POST /records endpoint lets you add new records to a table.

I’m not familiar with Hexomatic, but it’ll need to support making POST requests, and specifying an access token (which you’ll need to generate in Grist before you can use the REST API), for the above to work.

George

So you’re saying that the webhook functionality is exclusively outbound. It doesn’t have a catch feature?

That’s right, incoming webhooks aren’t currently supported.

George

If Hexomatic can send the data as a POST request in the particular format expected by the REST API URL (see https://support.getgrist.com/api/#tag/records/operation/addRecords), then that may be all you need. There are even a couple of ways to avoid the need for authentication (using a link-shared doc, with possibly some access rules restrictions, e.g. using link keys).

I was looking at that. I was hoping that Hexomatic had a REST API function, but it does not.

Sounds like you might need to use a program in the middle to translate the Hexomatic webhook data into the proper Grist format, then send an API request to Grist with the properly formatted data. You could use something like Zapier, n8n, IFTTT, simple Python/Flask server, etc. in the middle.

I was originally trying to use KonnectzIT, but their integration doesn’t work.

I actually have a Python server that I was about to shut down for lack of need. This will give me an excuse to learn Flask. I’ll pursue that. Thanks.