Overview
Integrate ChatAds with Zapier using the Webhooks by Zapier action. This lets you add affiliate links to any Zap that processes user messages—chatbots, email automations, form submissions, and more.Zapier uses a webhook-based approach rather than a native app. You’ll configure a POST request to the ChatAds API directly.
Setup Guide
Step 1: Create Your Zap
- Create a new Zap in Zapier
- Add a Trigger step of your choosing that contains the message you want to analyze
- Add a Webhooks by Zapier action and choose POST
Step 2: Configure the POST Action
Configure the webhook with the following settings:| Field | Value |
|---|---|
| URL | https://api.getchatads.com/v1/chatads/messages |
| Payload Type | json |
| Data | message: Map to your trigger’s message field |
| Wrap Request in Array | No |
| Unflatten | Yes |
| Headers | x-api-key: Your API key from app.getchatads.com/api/keys |
Step 3: Test
- Click Test step in Zapier
- You should receive the same JSON response you’d see in the API Explorer
- Use the response data in your next Zap action
Request Parameters
Required
The user message to analyze. Must be 1-5000 characters.
Optional
IPv4/IPv6 address for country detection (max 45 characters).
Country code (e.g., ‘US’). If provided, skips IP-based country detection.
Resolution quality level. Options:
fast (~150ms), standard (~1.4s), best (~2.5s).Response
The webhook returns the standard ChatAds API response:Parsing the Response
To extract the affiliate link in a subsequent Zapier step, you can use a Code by Zapier action with Python:link_text and url from the first offer, which you can then use in subsequent Zap steps.
Example Use Cases
AI Chatbot Responses
Email Product Mentions
Form Submissions
Error Handling
Check theerror field in the response to handle failures:
- 401 - Invalid or missing API key
- 429 - Rate limit exceeded
- 500 - Server error (retry with backoff)
Best Practices
Test in API Explorer first
Verify your request works in the API Explorer before configuring Zapier.
Handle empty responses
Always check
data.returned > 0 before using affiliate data.Use Filters
Add Filter steps to route Zaps based on whether affiliates were found.
Monitor usage
Check
meta.usage in responses to track quota consumption.