Why the first WhatsApp contact needs to be automatic
Form leads go cold fast. If the sales rep only sees the sign-up late in the afternoon, the person has already talked to two other companies. A Zap handles the mechanical part: the form fires, Zapier builds the message and the WhatsApp API delivers it from the company number. The rep joins a conversation that is already open, with the history on their phone or in the support tool.
Zapier has no D-API app. The bridge is Webhooks by Zapier, Zapier’s own app for talking to any API. It has triggers like Catch Hook, to receive data, and actions like POST and Custom Request, to send. According to Zapier’s help center, this app is not on the free plan.
The Zap in three steps
- Trigger: your form app (Google Forms, Typeform, HubSpot, whatever you already use) with the new response event. If the form lives on your own site, the trigger can be a Catch Hook that receives the site’s POST.
- Phone cleanup: a Formatter by Zapier step that leaves the number with digits only and the country code.
- Action: Webhooks by Zapier, POST event, calling the D-API text send.
Step 1: the form trigger
Pick the form app and the new response event, connect the account and pull a test record. Check that the name, phone and consent fields show up in the sample. Without a real sample, mapping the next steps is guesswork.
The consent field is not a detail. A checkbox like "I agree to be contacted on WhatsApp" separates an expected message from one that gets reported. A number that gets many reports is a number that stops working, with any kind of API. Add a Filter by Zapier step that only continues when consent was checked. The other practices are in how to avoid bans.
Step 2: get the phone number into the right format
D-API expects the international number with digits only: 14155550123. Forms bring all sorts of things: "(415) 555-0123", "415 555 0123", "+1 415...". Use Formatter by Zapier to strip everything that is not a digit and, if the form does not ask for the country code, prepend it. Test with those three formats before turning the Zap on.
Step 3: the Webhooks by Zapier POST action
Add the Webhooks by Zapier action, choose the POST event and fill in:
| Zapier field | What to enter |
|---|---|
| URL | https://api.d-api.cloud/api/v1/messages/send/text |
| Payload Type | json |
| Data | sessionId, to and text, one per line |
| Wrap Request In Array | No |
| Headers | Authorization with your API key, without Bearer |
In to, map the Formatter output. In text, mix fixed text with the lead’s name. Zapier builds the body from those pairs, and this is what reaches D-API:
POST https://api.d-api.cloud/api/v1/messages/send/text
Authorization: YOUR_API_KEY
Content-Type: application/json
{
"sessionId": "sales",
"to": "14155550123",
"text": "Hi Mary! This is Peter from Acme. I saw your sign-up on our site about the annual plan. Can I send you the details here?"
}A first-contact message works best when it mentions what the person asked for and ends with a simple question. Avoid a link in the very first message to a number that has never talked to you.
Need more than text? Swap the URL for the image or document route and adjust the fields in Data. For nested bodies, like a list with sections, use the Custom Request event, where you write the whole JSON by hand.
The other direction: when the lead replies
The Zap above only sends. To react to the reply, create a second Zap with the Catch Hook trigger from Webhooks by Zapier. Copy the generated URL and register it as the webhook for the connection’s messages.received event:
curl -X POST https://api.d-api.cloud/api/v1/sessions/sales/webhook-config \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "enabled": true, "type": "single",
"events": { "messages.received": { "enabled": true, "webhookUrl": "https://hooks.zapier.com/hooks/catch/YOUR_URL" } } }'In the Zap, filter data fromMe equal to false and use data message and data from jid to, for example, mark the lead as "replied" in the CRM and notify the rep. Catch Hook splits the JSON fields for you to map, so there is nothing to parse. The other events you can receive are in the WhatsApp webhooks guide.
Cost and limits on each side
On Zapier, every step that runs counts as a task on your plan, and lead volume drives the bill. D-API charges per connection, not per message, so sending more messages from the same number does not change the invoice. Details are on pricing.
If the flow grows to many steps per lead, compare with n8n, which has a native D-API node for send actions. And if the goal is to message an entire list, not lead by lead, that is a different conversation: see WhatsApp API for marketing. The same form-to-WhatsApp design can also be built on Make.
