When to Use Webhooks
| Use Case | Example |
|---|---|
| Web forms | Contact form submissions create leads |
| Third-party apps | Stripe payment → create customer record |
| Custom integrations | Your app → Twenty automation |
| No-code tools | Zapier, Make, n8n connections |
Step-by-Step Setup
Step 1: Create the Workflow
- Go to Settings → Workflows
- Click + New Workflow
- Name it (e.g., “Website Form Submission”)
Step 2: Configure the Webhook Trigger
- Click on the trigger block
- Select Webhook
- You’ll receive a unique webhook URL like:
- Copy this URL—you’ll need it for your external service
Step 3: Define Expected Data Structure
For POST requests, define the expected body structure:- Click Define expected body
- Enter a sample JSON that matches what your service will send:
- Click Save—this creates variables you can use in subsequent steps
Step 4: Add Actions
Now add actions that use the webhook data: Example: Create a Person record- Add Create Record action
- Select People object
- Map fields:
| Field | Value |
|---|---|
| First Name | {{trigger.body.firstName}} |
| Last Name | {{trigger.body.lastName}} |
{{trigger.body.email}} | |
| Company | Search or create based on {{trigger.body.company}} |
Step 5: Test the Webhook
Before activating, test your webhook: Using cURL:- Create a POST request to your webhook URL
- Set Content-Type header to
application/json - Add your test JSON body
- Send and check workflow runs
Step 6: Activate
Once tested, click Activate to make the workflow live.Handling Different Data Structures
Nested Data
If your webhook sends nested data:{{trigger.body.contact.email}}
Arrays
If data includes arrays:{{code.items}}
Known/specific fields → Extract to named fields
If the array contains specific fields you want to access individually (e.g., form answers where position 0 is always “first name”, position 1 is always “last name”), add a Code action to extract them:
product.name and product.qty individually in subsequent steps.