Use webhooks to notify your application about import events
What is a webhook?
A webhook is an automated message sent from a lightweight API that powers one-way data sharing, triggered by events. TableFlow uses webhooks to push real-time notifications to you about your data imports. For example, you can use webhooks on TableFlow to get notified when a user completes a file import:
- Your user imports a CSV or Excel file using the embedded TableFlow importer on your web app
- TableFlow notifies your system, via a webhook, that a data import has been completed
- Your system can use the API to paginate through the imported data, or download the data directly as a CSV file.
How to use webhooks on TableFlow
Step 1: Configure your application to receive webhooks
To get started, create an endpoint where you can receive webhooks. For this example, we’ll use Svix Play to easily set up a test endpoint.
1. Go to play.svix.com and copy the provided URL that will receive webhooks. You can also provide your own endpoint URL instead.
2. Navigate to your workspace settings in TableFlow cloud. Under the “Webhooks” section, there is where we’ll add the endpoint we just created and choose the import.completed event to be notified when users complete a file import:
3. Send a test event to your webhook by navigating to the “Testing” tab, selected the event to send, and pressing “Send Example”:
You’ll be able to see the webhook received on Svix Play, and under the “Logs” tab of the webhooks settings:
After configuring your application to receive webhooks, the next step is to configure an importer to send webhooks:
Step 2: Enable webhooks for an importer
Webhooks are only sent from importers where they have been enabled. To do this, navigate to an importer on TableFlow cloud. Under the “Settings” tab, you’ll see the toggle to enable webhooks:
You can now import a file to your importer to test out your new webhook!