Pull live person and deal data from Pipedrive into a WhatsApp chatbot. Search contacts by phone number, check open deals, and reply with sales context, using Pipedrive's straightforward personal API token, the simplest auth in this CRM series.
Before following this guide, read the External API Request step foundation guide. It covers every field in the step interface so this guide can focus on Pipedrive-specific values.
Unlike HubSpot (Contacts), Zoho (Contacts), or Salesforce (Contacts), Pipedrive calls individual contacts 'Persons'. The search endpoint is /persons/search. Companies are called 'Organizations'. Deals link Persons and Organizations together.
Pipedrive uses a personal API token for authentication. No OAuth setup, no Connected App, no two-step flow. One token does it all.
The personal API token authenticates as you. All API calls made with it appear in Pipedrive's audit logs as your user. If you leave the company or your account is deleted, the token stops working. For team-shared integrations, use a dedicated Pipedrive service account.
Pipedrive API reference: developers.pipedrive.com/docs/api/v1
Pipedrive accepts the API token as a URL query parameter, the simplest auth pattern in this CRM series. In your WA.Expert chatbot flow, store the customer's phone number as {{customer_phone}} and add an External API Request step:
| Field | Value | Notes |
|---|---|---|
| Select Method | GET | Searching existing persons. |
| Request URL | https://api.pipedrive.com/v1/persons/search?term={{{customer_phone}}}&fields=phone&api_token=YOUR_TOKEN | The api_token goes in the URL, not in a header. ?term= is the search value. ?fields=phone tells Pipedrive to search only the phone field. |
| Select Auth Type | No Auth | Authentication is handled by the api_token query parameter in the URL above. |
| Content-Type | application/json | Standard header for Pipedrive API requests. |
| Select Body Type | None | GET requests carry no body. |
| Choose Response Type | JSON | Pipedrive returns structured JSON. |
A successful Pipedrive person search response looks like this:
{
"success": true,
"data": {
"items": [
{
"result_score": 0.5,
"item": {
"id": 1247,
"type": "person",
"name": "Priya Sharma",
"phones": [
{ "value": "9820000001", "primary": true }
],
"emails": [
{ "value": "priya@example.com", "primary": true }
],
"visible_to": 3,
"owner": {
"id": 12,
"name": "Ravi Kumar"
},
"organization": {
"id": 45,
"name": "Sharma Textiles"
},
"open_deals_count": 2,
"closed_deals_count": 1
}
}
]
},
"additional_data": { "pagination": { "start": 0, "limit": 100, "more_items_in_collection": false } }
}Pipedrive wraps person search results under data.items as an array of objects. Each object has a result_score and an item object. Your contact data is at data.items[0].item. If data.items is empty, no person was found with that phone number.
Map these response paths to variables in the External API Request step:
| Variable name | Response path | Example value |
|---|---|---|
| person_id | data.items[0].item.id | 1247 |
| person_name | data.items[0].item.name | Priya Sharma |
| person_email | data.items[0].item.emails[0].value | priya@example.com |
| owner_name | data.items[0].item.owner.name | Ravi Kumar |
| company_name | data.items[0].item.organization.name | Sharma Textiles |
| open_deals | data.items[0].item.open_deals_count | 2 |
open_deals_count and closed_deals_count are included in the search response, useful for a quick deal status reply without a second API call.
If the contact messaged you first within the last 24 hours, your reply is a free service conversation. For proactive outbound follow-up from Pipedrive data, use an approved Utility or Marketing template.
Once you have the person's ID, a second External API Request step can fetch their linked deals:
GET https://api.pipedrive.com/v1/persons/1247/deals?status=open&api_token=YOUR_TOKEN
Response (abbreviated):
{
"success": true,
"data": [
{
"id": 88,
"title": "Sharma Textiles - Annual Contract",
"value": 250000,
"currency": "INR",
"status": "open",
"stage_name": "Proposal Made",
"close_time": "2026-07-30T00:00:00.000Z"
}
]
}
Map: data[0].title, data[0].value, data[0].stage_name, data[0].close_timeCustomer messages your WhatsApp number.
WA.Expert captures their phone as {{customer_phone}} = "9820000001".
External API Request step:
GET https://api.pipedrive.com/v1/persons/search
?term=9820000001&fields=phone&api_token=YOUR_TOKEN
Response mapped:
person_name = "Priya Sharma"
owner_name = "Ravi Kumar"
company_name = "Sharma Textiles"
open_deals = "2"
Conditions: if data.items is empty → "We could not find your record."
Bot replies (if found):
"Hi Priya, great to hear from you.
Your account manager is Ravi Kumar.
Company: Sharma Textiles
Open deals: 2
Reply DEAL to get a status update on your latest proposal,
or reply SUPPORT for assistance."| Symptom | Likely cause | Fix |
|---|---|---|
| 401 Unauthorized | Wrong API token or token not in URL | Check the api_token parameter is appended to the URL exactly as shown. The token is case-sensitive. |
| Empty items array | Phone number format mismatch | Pipedrive searches exact match. Try different formats: 9820000001, +919820000001, 09820000001. Check how numbers are stored in your Pipedrive. |
| success: false with error | API request malformed | Check the URL for typos. Make sure the ?term= and &api_token= parameters are present and correctly separated. |
| data.items[0].item.organization is null | Person has no linked organisation | Add a null check in your conditions step before mapping company_name. A person can exist without an organisation. |
| 429 Too Many Requests | Daily token budget exceeded | Pipedrive uses a token-budget system (30,000 base tokens × plan × seats). For a WhatsApp bot doing single lookups, this limit is very generous. If hit, wait for the daily reset. |
| Token no longer works | User account deleted or token regenerated | Regenerate the token in Settings > Personal Preferences > API and update WA.Expert. Consider using a dedicated service account. |
HubSpot CRM API with Private App Bearer token: contact search by phone.
Read guide →Zoho CRM API v8: Zoho-oauthtoken auth, India data centre, phone search.
Read guide →Master every field in WA.Expert's HTTP action step.
Read foundation guide →Free trial, no credit card required. And if you ever get stuck, we are the only platform in India that answers you live on WhatsApp.