How to use the Webhook
Webhooks allow you to receive real-time notifications of events happening within your Extracta.ai extractions. This section will guide you through setting up a Node.js server with Express to listen for and handle webhook events securely.
Prerequisites
Node.js installed on your server
An Express.js application
A secret key obtained from the Extracta.ai dashboard
Step 1: Set Up Your Server
First, ensure you have Express and the necessary packages installed in your project. If not, you can install them using npm:
Step 2: Implement Webhook Endpoint
Create a basic HTTP server with Express to listen for webhook POST requests. Use the following code snippet as a starting point:
Step 3: Test Your Webhook Listener
After setting up your webhook listener, test it by sending a simulated files. Ensure your server validates the signature and processes the event correctly.
By following these steps, you can securely set up your application to receive and process webhook events from Extracta.ai, enabling real-time updates and actions based on the events transmitted to your endpoint.
Last updated