Okay, has anyone else been manually checking the WellSaid dashboard every ten minutes to see if a long audio file is done? 🙃 I was doing that for a client project last week and finally decided to automate it with their webhook setup. It's a game-changer for batch processing.
The setup is actually pretty straightforward in the WellSait Labs API. You need to create a webhook endpoint first (I used a simple Flask app for testing, but you'd use a secure endpoint in production). The key is to add the webhook URL when you initiate your render via the API. If you're doing it in a script, you'll include the `webhook` parameter in your request payload. Don't forget to handle the verification requestβWellSaid will send a GET to your endpoint first to confirm it's valid.
Once it's live, you'll get a POST to your endpoint with the render `id`, `status` (like `completed` or `failed`), and the `url` for the audio file. I have mine set up to then trigger a Slack notification in our project channel, so the whole team knows the asset is ready. No more dashboard refreshing! Just make sure your endpoint is HTTPS and can respond quickly.
The docs are good, but the main pitfall I hit was not having my endpoint correctly parse the JSON payload. Also, remember that the webhook fires for *every* status change, so your logic should check for the final state you care about. Happy automating!