# Send templates from HubSpot

Use the Send WhatsApp template (Zernio) workflow action to send approved WhatsApp templates to enrolled HubSpot contacts.

## Before you start

- HubSpot connected to a Zernio profile, with workflow access approved. Portals connected before the action existed reconnect once to approve it.
- A WhatsApp number connected to that same profile, and a template Meta has approved ([WhatsApp templates](/platforms/whatsapp/templates)).
- A HubSpot plan with workflows.

## Add the action to a workflow

1. In HubSpot, open a contact-based workflow and add an action.
2. Under **Zernio**, choose **Send WhatsApp template (Zernio)**.
3. Pick the **WhatsApp number** to send from, then the **Template**. The list shows that number's approved templates.
4. Fill **Variable 1** to **Variable 10** in the template's order: header, then body, then URL button. Pick a contact property or type text.
5. Leave **Recipient phone** empty to use the contact's WhatsApp phone number, mobile phone, then phone. Numbers need their country code.

Typed text can include `{{contact.firstname}}`-style tokens for `firstname`, `lastname`, `email`, `company`, `phone` and `mobilephone`.

## Branch on the result

Branch on the action's **Send status** output, `sent` or `failed`. Its outputs can be used by later steps:

| Output | Value |
|--------|-------|
| Send status | `sent` or `failed` |
| WhatsApp message ID | The message id, when sent |
| Zernio conversation ID | The conversation in the Zernio inbox |
| Error code | Why it failed, for example `RECIPIENT_PHONE_MISSING` |
| Error message | The reason in words |

## How it behaves

- The message appears in the Zernio inbox, replies come back there, and it is logged on the contact like any other message, with its [delivery status](/platforms/hubspot/delivery-status).
- The action only offers WhatsApp numbers on Zernio profiles connected to this portal.
- Large enrollments are sent at your Zernio plan's API rate: HubSpot waits and retries, so they are paced rather than failed.
- A step HubSpot retries is sent once, never twice.
- Each message counts toward your Zernio messaging usage, and Meta bills the template to your WhatsApp Business Account.

## If it fails

| Error code | Cause | Fix |
|------------|-------|-----|
| `SENDER_NOT_AVAILABLE` | The number is not on a profile connected to this portal, or needs reconnecting | Connect the number on the same profile as HubSpot, or reconnect it. |
| `TEMPLATE_REQUIRED` | No approved template was chosen | Pick an approved template in the step. |
| `RECIPIENT_PHONE_MISSING` | The contact has no phone number with a country code | Fill the contact's phone, or set **Recipient phone**. |
| `ACCOUNT_PAUSED` | The Zernio account is paused | Fix billing in Zernio to send again. |
| `INVALID_TEMPLATE_PARAMS` | The variables do not fit the template | Fill one variable per placeholder, in the template's order. |
| `SEND_FAILED` | WhatsApp did not accept the message | Read **Error message**; check the number in Zernio. |
| `SEND_OUTCOME_UNKNOWN` | An earlier attempt stopped mid-send, so it was not sent again | Check the Zernio inbox before re-enrolling the contact. |

Other codes come from Zernio's send API, such as plan or usage limits.

## Related

- [WhatsApp templates](/platforms/whatsapp/templates)
- [Delivery status](/platforms/hubspot/delivery-status)
- [Connect](/platforms/hubspot/connect)