# GoHighLevel copy-paste blocks for WbizTool

Ready-to-paste settings for HighLevel workflows. The full guide is at
https://wbiztool.com/docs/guides/gohighlevel/

Replace before use:

- `YOUR_API_KEY`: your WbizTool API key (Settings → API keys).
- `678`: the WhatsApp Client ID of the number you send from (WhatsApp numbers page).

Everything in `{{double braces}}` is a HighLevel merge field. Leave those as they are:
HighLevel fills them in for each contact.

---

## 1. Send a WhatsApp message (Custom Webhook action)

In your workflow: **+** → **Send Data** → **Custom Webhook**.

| Setting | Value |
| --- | --- |
| Event | `CUSTOM` |
| Method | `POST` |
| URL | `https://wbiztool.com/api/v1/send_msg/` |
| Authorization | **Bearer Token**: `YOUR_API_KEY` (or no auth plus the header below) |
| Header (only without Bearer Token) | `Authorization` = `Bearer YOUR_API_KEY` |
| Content-Type | `application/json` |
| Raw Body | one of the blocks below |

Use `{{contact.phone_raw}}` (international, like `+15155552345`), not `{{contact.phone}}`
(formatted for reading, like `(515) 555-2345`, without the country code).

### Text

```json
{
  "whatsapp_client": 678,
  "phone": "{{contact.phone_raw}}",
  "msg": "Hi {{contact.first_name}}, thanks for contacting {{location.name}}. We'll reply here on WhatsApp."
}
```

### Image with a caption

```json
{
  "whatsapp_client": 678,
  "msg_type": 1,
  "phone": "{{contact.phone_raw}}",
  "img_url": "https://example.com/images/welcome-offer.jpg",
  "msg": "Hi {{contact.first_name}}, here is your welcome offer from {{location.name}}."
}
```

### PDF or other file

```json
{
  "whatsapp_client": 678,
  "msg_type": 2,
  "phone": "{{contact.phone_raw}}",
  "file_url": "https://example.com/files/price-list.pdf",
  "file_name": "price-list.pdf",
  "msg": "Hi {{contact.first_name}}, here is our price list."
}
```

### Appointment reminder that expires after an hour

```json
{
  "whatsapp_client": 678,
  "phone": "{{contact.phone_raw}}",
  "msg": "Hi {{contact.first_name}}, a reminder of your appointment with {{location.name}} at {{appointment.start_time}}.",
  "expire_after_seconds": 3600
}
```

### New-lead alert to a WhatsApp group of your team

```json
{
  "whatsapp_client": 678,
  "group_name": "Sales team",
  "msg": "New lead: {{contact.name}}, {{contact.phone_raw}}, {{contact.email}}"
}
```

### Contacts saved without a country code

Add this line to any block above (use your country's calling code, without `+`). It's only
added to numbers written without `+`:

```json
"country_code": "1",
```

Notes:

- A new line inside `msg` is written `\n`. A real line break makes the JSON invalid.
- `msg` can be up to 3,000 characters. `*bold*` and `_italic_` work.
- Image and file links must be public.
- A successful answer is `{"status": 1, "message": "Created", "msg_id": 9817263}`. That means
  queued: the message then goes out from your WhatsApp number.
- Put an **If/Else** step before the action so contacts without a phone number are skipped.

---

## 2. Log incoming WhatsApp messages (Inbound Webhook trigger)

Needs the WbizTool Unibox add-on ($20 a month or $200 a year at US list prices for each
WhatsApp number in the inbox, on a paid or lifetime plan).

1. HighLevel: new workflow → trigger **Inbound Webhook** → copy its URL.
2. WbizTool: **Inbox numbers** → **Add number to inbox** (or the number's **Webhook settings**)
   → paste the URL under **Webhook URL** → tick only **Received messages**.
3. Send your WhatsApp number a message from another phone, then in HighLevel click
   **Test Trigger**, pick the request under **Mapping Reference** and save.
4. Add these steps:

| Step | Setting | Value (from the Inbound Webhook values) |
| --- | --- | --- |
| **If/Else** | continue only when | `event` is `message_received` AND `contact.is_group` is `false` AND `contact.phone` is not empty |
| **Create/Update Contact** | Phone | type `+`, then pick `contact.phone` |
| **Create/Update Contact** | Name (optional) | `contact.name` (the sender's WhatsApp name; may replace a name you edited) |
| **Add to Notes** | Note | `WhatsApp message:` then `message.content`, then `message.timestamp` |
| **Add Contact Tag** (optional) | Tag | `whatsapp` |

Fields WbizTool sends (one request per message, JSON):

| Field | Example | Meaning |
| --- | --- | --- |
| `event` | `message_received` | or `message_sent` if you ticked **Sent messages** |
| `contact.phone` | `12125550120` | the sender's number, digits only, no `+` (empty if WhatsApp hides it) |
| `contact.name` | `Emma Thompson` | the sender's WhatsApp name (can be empty) |
| `contact.is_group` | `false` | `true` for group chats |
| `message.content` | `Can I add a gift note to it?` | the text, or a label such as `📸 Image` |
| `message.type` | `chat` | `image`, `ptt` (voice note), `document`, … |
| `message.timestamp` | `2026-10-15T10:30:04+00:00` | when it was sent on WhatsApp (UTC) |
| `message.media.url` | `https://…` | download link for media; it expires after 3½ to 7 days |
| `whatsapp_phone` | `12125550101` | which of your numbers received it |

Every field: https://wbiztool.com/docs/guides/webhook-listeners/#payload

To reply on WhatsApp in the same workflow, add the Custom Webhook action from part 1.
