# Contact Sync Logic

### Contact Sync Logic

When syncing Popl leads to your HubSpot account, the integration will first perform a read operation to see if the contact already exists. This search (query) uses the contact's **"email"** as a primary key to match any existing contact already in your HubSpot. Based on the search, two flows can be taken:

**Create New Contact if No Contact Found:**

If no contact is found from this initial email search, then the integration will proceed to create a new contact. Contact ownership and any custom mappings will be applied based on the configuration settings described above.&#x20;

**Update Existing Contact If an Existing Contact is Found:**

If a contact is found with the Popl lead's specific email, then the integration will proceed to update that Contact accordingly instead of creating a new, duplicate Contact. Contact ownership and any custom mappings will be applied based on the configuration settings described above.

***

***

#### Need Help?

Contact Popl Support – our team is available to assist at <teams@popl.co>.

\
With 🤍 from Popl.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.popl.co/introduction/integrations/hubspot-integration/contact-sync-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
