Hold Unable to fetch Contact id using API

DEH1

Member
Grant Account Access for Support
  1. I authorize the Pabbly Support Team to access my account for troubleshooting purposes.
WhatsApp Number
+919106763729
Email Address
[email protected]
I am unable to fetch Contact ID using API Call for a specific mobile number,

It's giving output for only 1st 25 contacts out of complete contact list .

Using phone number or Attribute email, I want to extract Contact ID of a particular contact.

CONTACT ID is required to Updated a contact using Pabbly Chatflow Action Step,
Upsert contact tag doesn't triggers Flow automations, Only Update tags is triggering that, So I need the Contact ID of a particular contact to UPDATE contact on next step using Pabbly Connect

Currently I am trying with this -
https://chatflow.pabbly.com/api/v1/contacts/ & getting this output !
1776663035676.png
 

Preeti Paryani

Well-known member
Staff member
Hello DEH1,

Thank you for sharing the details.

It appears that the response already contains the Contact ID (_id). However, the endpoint you are using (/contacts) is meant for listing contacts, which is why it is returning a paginated list (e.g., 25 contacts) instead of a specific contact.

To assist you further, could you please clarify your exact use case—what should happen and on happening of what?

Also, kindly share the workflow URL so we can review your setup and guide you accordingly.
 

DEH1

Member
WORKFLOW - https://connect.pabbly.com/workflow/mapping/IjU3NjcwNTZmMDYzMjA0MzA1MjZjNTUzNTUxMzMi_pc

Kindly Check Step 5, 6 & 7

So here I'm trying to retrieve all the contact ids In step 5 In step six I'm adding a philtre to fetch out. Only the user With a particular email id or a phone number as a matching parameter, Which is then being used in step 7 to update a contact.


So instead of having two steps of step 5 and step 6 Can we have a single step to extract a contact id of a particular contact using email attribute of phone number ?
 

DEH1

Member
Hello DEH1,

Thank you for sharing the details.

It appears that the response already contains the Contact ID (_id). However, the endpoint you are using (/contacts) is meant for listing contacts, which is why it is returning a paginated list (e.g., 25 contacts) instead of a specific contact.

To assist you further, could you please clarify your exact use case—what should happen and on happening of what?

Also, kindly share the workflow URL so we can review your setup and guide you accordingly.
Currently, the response contains contact id for the initial 25 contacts. But what if the contact I want to search using the filter is my last contact in the list As a contact number 501.
 

Preeti Paryani

Well-known member
Staff member
Hello @DEH1,

Thank you for sharing the details.

You can continue using the same endpoint and pass the mobile number as a query parameter (as you are currently doing). This will ensure that only the contact matching the provided phone number is returned in the response, along with its Contact ID (_id).

1776664844236.png
 

DEH1

Member
Instead of mobile, I actually want to search it using the email attribute

We created a custom Field to capture emails as well

(Data Contacts 0 Attributes 3 Value) is email field
 

Preeti Paryani

Well-known member
Staff member
Hello @DEH1,

Thank you for getting back.

Unfortunately, it is not possible to fetch a contact using a custom field (like email attribute) via the API at the moment. The endpoint currently supports only standard fields such as mobile number for direct retrieval.

Hence, you will need to continue with the existing approach (list → filter → use Contact ID), or use the mobile number to fetch the contact in a single step.
 

DEH1

Member
Problem with existing approach (list → filter → use Contact ID) Is that it is giving output only for the first 25 contacts How to get the output of all the contacts I have in my contact list In the api output, so that I can run the filter in the next step.
 

Preeti Paryani

Well-known member
Staff member
Hello @DEH1,

Please allow us some time to check this behavior with our team regarding fetching all contacts beyond the initial 25 records via the API. We will get back to you shortly with an update.

Appreciate your patience.
 
Top