Solved

How Do I Create a Webhook?

  • 31 October 2022
  • 5 replies
  • 118 views

Userlevel 3
Badge +4

I'm familiar a bit with API, but I never worked with webhooks, can any share instructions on how to create one?

Here is what I want to do, we have a database (Google sheet & Airtable) with all our clients, and it's intergraded with Poser BI, where we have multiple dashboards in Power BI. Currently, I need to update the database manually, and I'm looking to automate this through a webhook.

Thank you

icon

Best answer by max 1 November 2022, 17:14

View original

5 replies

Userlevel 7
Badge +19

I’m doing that with a SQL database in Azure right now. I can show you how I got it working if you like.

The short version to get you started:

  • Setup a webhook receiver (Zapier, Azure Logic App, serverless web function… whatever you know that can listen for a web request)
    • Your handler will give you a listening URL
    • Copy the URL and:
  • Create your webhook using Karbon API documents
    • Make the POST call with your handler’s URL in the body as described in the documentation (this is a one-time step and I do it right in Postman)
    • If you are only keeping contact information updated, you only need that webhook, but there are others.
    • You’ll immediately start receiving hits to your handler
  • The handler will receive a message… the key of the contact and what happened (created, updated, etc.)
    • Your handler will need to make a GET request using the supplied key to get the actual details of the contact
    • Parse the JSON
    • Add to database

Does that help at all?

Userlevel 3
Badge +4

Thanks @max .

I’m getting back a 400 error. Am I doing something wrong? I’m using Make (Integromat).

 

Userlevel 7
Badge +19

TargetUrl and WebhookType go in the body as JSON elements.

Userlevel 3
Badge +4

Thank you so much @max, it’s working now.

Userlevel 7
Badge +19

Nice!

Reply