Trigger your Spell with a Webhook
Retrieve the webhook URL for development
When you create a new Spell using our assistant, you'll see a popup with an option to set up the webhook
Now, retrieve your webhook URL and configure it inside your service.
You can click on the Test trigger button to verify if your Spell has received the webhook payload.
The payload will be automatically set up and all data are accessible using the params
variable.
This is your development URL! Once on production, you'll have to update it to your production URL.
Where to find all development and production URL?
If you need to retrieve both your development and production URL, you can access them inside the Versioning tab on your Spell's detail page
Using webhook with form data
Some services send webhooks using a multipart/form-data
encoding, rather than JSON. The platform will process it and transform them as a JSON under the params
variable.
If some files has been sent using the multipart/form-data
format, the Buffer
version of these files will be accessible under params._files
automatically.