HTTP Webhook
  • 2 Minutes to read
  • Dark
    Light

HTTP Webhook

  • Dark
    Light

Article Summary

Webhooks are HTTP callbacks that allow one system to automatically notify another system about specific events, facilitating real-time communication and automation between web services. They are commonly used for event notification, data synchronization, and third-party integrations in web development.

DATADDO TIP

The Dataddo HTTP webhooks connector doesn't extract data. Instead, you send data to Dataddo through an HTTP call.

How to Create a Webhook Data Source

  1. On the Sources page, click on the Create Source button and select HTTP Webhook.
  2. Select the Reaction Strategy.
    1. Write immediately inserts data into your data destination.
    2. Store keeps data in the data source which is used mainly when the data destination is a dashboarding tool.
  3. Insert your Example JSON webhook payload, aka define the expected table schema. E.g.
    {
        "order_number": "1234",
        "name": "Name Surname",
        "amount": 100
    }
    
  4. [Optional] Write your transformation pipeline. Add empty brackets if you wish to keep it blank.
  5. Name your data source.
  6. Click on the Test Data button in the top right corner to see the example table schema (not the actual data itself).
  7. Click on Save.
  8. A window with authorization details will pop up. Copy and keep the Authorization Token safe, you can display it only once.
  9. Connect your newly created webhook source in a data flow.
Make sure you connect your source to a destination, otherwise your data won't be sent anywhere.

Authorize Connection to Dataddo in Your Service

To authorize the connection to Dataddo, include the Authorization Token in your HTTP calls. Here is an example POST request.

curl --location -X POST https://webhook.dataddo.com
--header 'Authorization: Bearer MY_TOKEN'
--header 'Content-Type: application/json'
--data '{
    "order_number": "1234",
    "name": "Name Surname",
    "amount": 100
    }'

In this example, this JavaScript is using the Fetch API to make an HTTP POST request. The script would be embedded in an HTML <script> element:

var headers = new Headers();
headers.append('Content-Type', 'application/json');
headers.append('Authorization', 'Bearer token_value');
var body = {
    "order_number": "1234",
    "name": "Name Surname",
    "amount": 100
};
var options = {
    method: "POST",
    headers: headers,
    mode: "cors",
    body: JSON.stringify(body)
};
response = fetch("https://webhook.dataddo.com", options);
console.log("Response: ", response);

Troubleshooting

ERROR MESSAGE
No flow found for the source action

This issue is caused by your data not being sent anywhere. Connect your source to a destination in a data flow.

Related Articles

Now that you have successfully created a data source, see how you can connect your data to a dashboarding app or a data storage.

Sending Data to Dashboarding Apps

Sending Data to Data Storages

Other Resources


Was this article helpful?

What's Next