> Documentation index: https://docs.zernio.com/llms.txt. Every page is also Markdown: add .md to its URL.

# Inbox sync

How Zernio matches inbox contacts to HubSpot contacts and logs every inbox message on the contact's HubSpot timeline.

Once a portal is connected, every message the profile's inbox receives or sends is synced once the person is a Zernio contact. Zernio does it within seconds, with nothing to call.

## Match a contact

For each message, Zernio finds the HubSpot contact for the sender's Zernio contact, in this order:

1. A HubSpot contact with the same email address: the Zernio contact's email, else the address of its Gmail, Outlook or IMAP channel.
2. A HubSpot contact with the same phone number, read from the contact's WhatsApp, SMS, RCS or iMessage channel.
3. Otherwise, with `syncContacts` on, a new HubSpot contact with the contact's name, email and phone, plus your `contactDefaults` for properties the portal requires.

The match is remembered, so later messages go to the same HubSpot contact. A matched contact is linked as it is: Zernio never overwrites its name or properties.

## Log a message

With `logMessages` on, each message becomes one timeline entry on the contact:

| Channel | Logged as |
|---------|-----------|
| WhatsApp | Communication (WhatsApp) |
| SMS | Communication (SMS) |
| RCS, iMessage, Instagram, Messenger, Telegram, X, Bluesky, Slack DMs, TikTok, LINE, WeChat, Gmail, Outlook, IMAP | Note |

The entry says the channel and whether the message was received or sent, then the text. Attachments are listed as links. Each message is logged once, even when its sync is retried.

Outgoing WhatsApp, SMS and RCS entries also carry their [delivery status](/platforms/hubspot/delivery-status).

## Push a contact from a workflow

Add a `hubspot_upsert_contact` node to a [workflow](/products/automations/workflows) to write to HubSpot at a chosen step, for example after a qualifying question:

```json
{ "id": "crm", "type": "hubspot_upsert_contact", "config": { "email": "{{answer}}", "properties": { "lifecyclestage": "lead" } } }
```

It finds the contact the same way as inbox sync and writes only the fields the node sets, skipping empty values. A new contact also takes the Zernio contact's name, email and phone.

`properties` takes HubSpot internal property names. The node follows `success`, or `error` when HubSpot is not connected or refuses the write.

## How it behaves

- Messages sync for conversations linked to a Zernio contact; others are skipped.
- A first message to a new phone number makes the recipient a Zernio contact once WhatsApp or the carrier accepts it, so it logs too. That covers [workflow templates](/platforms/hubspot/send-templates) and API sends. A refused message creates no contact.
- A workflow template logs on the enrolled contact, unless the person was already linked to another one.
- With `syncContacts` off and no match, the message is skipped rather than creating a contact.
- If the HubSpot contact was deleted or merged since, Zernio finds or creates the contact again and logs the message there.
- When HubSpot rate limits the portal, the sync waits and retries, so a busy portal can lag by a few minutes.
- Only messages from after the connection sync. Earlier conversations are not backfilled.
- With [zero content retention](/security/zero-content-retention) on for the team or the profile, an entry carries only its heading, with no text or attachments. A contact without a name or email is not created in HubSpot.

## Related

- [Connect](/platforms/hubspot/connect)
- [Update HubSpot settings](/accounts/update-hub-spot-settings)
- [Delivery status](/platforms/hubspot/delivery-status)
- [Deals](/platforms/hubspot/deals)
- [List contacts](/contacts/list-contacts)