Trying to GET CONTACT info from GoHighLevel based on a Custom Field value

RoboReply

Member
I am gathering some information via a chatbot, connecting through Pabbly to GoHighLevel, and attempting to retrieve some information from the GHL CRM to send back to the chatbot.

My challenge comes from attempting to find the contact record in GHL via data that is stored in Custom Fields (not the typical email/phone lookup).

I need to retrieve a specific custom field value from a contact, but I don't know how to identify that contact other than via a value that is held in a custom field.

Is it possible to identify a GHL contact by fields other than email & phone (specifically a custom field)?

Thanks for any insights.
 

Supreme

Well-known member
Staff member
Hey @RoboReply

You can use the LeadConnector(GHL) action step of the "LeadConnector: Search Contact via Phone" action step to search the contact.

2022-10-18_15h10_35.png
 

RoboReply

Member
Perhaps I did not make my scenario clear. I do not have the phone number nor the email address to use the LeadConnector options, so I am pressed to use their direct API call. I have now determined that via the API I can search not only by Phone and email as with the LeadConnector, but also via Name, Tags, and Business Name. This is not ideal, since the contact index would be in a Custom Field and not in any of the 5 fields that are searched/returned via the API query. I will likely need to create some Internal Automation that adds a Tag which duplicates the Custom Field value when the Custom field is set, then I can query the Tags instead of the Custom Fields.

Hopefully my workaround can help others who are looking to do similar queries on Custom Field values. I will be requesting from GHL that they make custom fields searchable via the API in order to locate a specific contact record.
 
Top