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