Pipedrive SMS Integration: Text When a Deal Moves, Log Every Reply
To text from Pipedrive with your own number, run the SMSNET CRM bridge with CRM = "pipedrive" and add one Pipedrive webhook on deal updates. When a deal enters the stage you choose, the person on the deal gets one SMS from your Android phone. When they reply, the answer becomes a note on that person. STOP replies tick an opt-out field, and a retried webhook never sends the same text twice.
The flow your customer sees
Hi Dana, good news: your kitchen installation is booked for Sunday 8:00. Reply here if the time doesn't work.
Can we make it 9?
Pipedrive note on Dana Levi: "SMS from +972501234567: Can we make it 9?"
The deal moved to Booked, the text went out, and the answer is on the person where the salesperson will see it.
Step 1: token and stage
- API token: Personal preferences, API, copy. Store it with
npx wrangler secret put PIPEDRIVE_TOKEN. - Stage id: open the pipeline's stage settings, or call
GET https://api.pipedrive.com/v1/stages?api_token=...and note theidof the stage that should text, for example4for "Booked". SetPIPEDRIVE_TRIGGER_STAGE_ID = "4". Leave it empty to text on every stage change.
Step 2: deploy the bridge
Download the bridge, then set:
CRM = "pipedrive"
DEFAULT_COUNTRY_CODE = "972"
PIPEDRIVE_TRIGGER_STAGE_ID = "4"
MESSAGE_TEMPLATE = "Hi {{first_name}}, good news: {{title}} is booked. Reply here if the time doesn't work."
Add the secrets SMSNET_API_KEY (an sn_test_ key first), CRM_TRIGGER_TOKEN and PIPEDRIVE_TOKEN, deploy, and connect SMSNET's webhook to https://<worker>/smsnet (how).
Step 3: the Pipedrive webhook
Tools and apps → Webhooks → Create new webhook:
| Field | Value |
|---|---|
| Event action | updated (v1) or change (v2) |
| Event object | deal |
| Endpoint URL | https://<worker>/crm/<CRM_TRIGGER_TOKEN> |
Pipedrive sends every deal update. The bridge texts only when stage_id changed into your stage, so editing a deal's value or title sends nothing. It reads both webhook versions:
// pipedrive.js (excerpt)
if (!("stage_id" in prev) || prev.stage_id === cur.stage_id) return null; // not a stage move
if (env.PIPEDRIVE_TRIGGER_STAGE_ID && String(cur.stage_id) !== String(env.PIPEDRIVE_TRIGGER_STAGE_ID)) return null;
const person = (await call("GET", `/v1/persons/${personId}`)).data; // the phone lives on the person
The idempotency key comes from the id and timestamp in the event's meta. When Pipedrive retries the same event, SMSNET returns the first result and sends nothing new (SMSNET keeps a key for 24 hours).
Template variables
| Variable | From |
|---|---|
{{first_name}} | The person's first name |
{{title}} | The deal title |
{{deal.value}}, {{deal.currency}} | Any deal field by its key |
{{person.name}}, {{person.org_name}} | Any person field by its key |
Custom fields use their 40-character key. In a v1 webhook they sit on the deal itself, {{deal.a1b2c3...}}. In v2 they sit under custom_fields, and an option field carries the option's id rather than its label, so prefer text fields in a template.
Step 4 (optional): opt-out field
Company settings, Data fields, Person: add a field "SMS opt out" and copy its API key into PIPEDRIVE_OPTOUT_FIELD. On a text field the bridge writes yes and nothing else is needed. On a single option field Pipedrive expects the option's numeric id, so put it in PIPEDRIVE_OPTOUT_VALUE (find it with GET /v1/personFields). Filter it out of any list you text.
How replies find the person
Pipedrive's search matches a phone exactly as stored, so the bridge tries the common spellings one at a time, starting with the most likely, and stops at the first match: +972501234567, 972501234567, 0501234567, 050-123-4567, 501234567. Each try is one search call, so a reply from an unknown number costs up to five calls.
Troubleshooting
| Symptom | Cause |
|---|---|
| Nothing sent on a stage move | The webhook is on person rather than deal, the deal has no person, or the person has no phone |
| Texts on every edit | PIPEDRIVE_TRIGGER_STAGE_ID is empty and the webhook is on all deal changes. Set the stage |
| Reply arrives, no note | The person's phone has an extension, letters or spaces. Clean the field to one of the five forms above |
answered 401 in the log | The API token was regenerated. Store the new one |
FAQ
Do I need a Pipedrive marketplace app?
No. The bridge uses your personal API token and one webhook. Nothing is installed in Pipedrive.
Can it text when a deal is won or lost?
Yes, with one more step. Pipedrive treats won and lost as a status, not a stage, and the Pipedrive adapter only texts on a stage move. Run a second bridge with CRM = "generic" and have an automation, Zapier or Make POST phone, sms_text and event_id to it, or ask an AI agent to add a status check to the adapter.
Does the salesperson's phone send the text?
The Android phone connected to SMSNET sends it, from its SIM. One phone can serve the whole team, or each salesperson can connect their own line.
What if the person replies days later?
The reply still lands as a note. SMSNET matches it by phone number, not by time.
Related guides
This is a spoke of Connect SMS to your CRM. Same bridge, other CRMs: HubSpot, Salesforce, monday.com. For follow-ups that need judgement, read AI agent CRM follow-up by SMS.
Send your first message today
Free plan, no card: 400 messages a month from your own number, with the API, webhooks and MCP included.
Get the app See pricing