WhatSnapHelp

Send Messages with Webhooks

Use GHL webhook actions to send messages through WhatSnap while keeping LeadConnector as your telephony provider.

If you're keeping LeadConnector as your default telephony provider but want specific workflows to send through WhatSnap, use GHL's Webhook action. In this side-by-side setup your LC Phone numbers keep sending and receiving as before; native Send SMS actions keep going through LeadConnector, and only the webhook steps go out through your WhatSnap Lines. See Set Up Your Telephony Provider for the full comparison.

Before you start

When to Use Webhooks

ScenarioRecommended Approach
WhatSnap is your only providerUse native Send SMS actions with line switching
LeadConnector is default, WhatSnap for specific workflowsUse webhooks (this guide)
You need iMessage effects or voice messagesUse webhooks with iMessage features

Webhook Endpoint

Use this URL in GHL's Webhook action:

https://webhook.p2p-messenger.com/webhook/workflow/send-message/{{contact.id}}

The {{contact.id}} merge field is automatically populated by GoHighLevel with each contact's unique ID at send time.

The fastest way to set this up: copy the pre-configured webhook action from your WhatSnap settings and paste it into your GHL workflow — the URL and required defaults come along automatically.

Advanced: replace {{contact.id}} with a hardcoded contact ID to always send through the same contact — useful for system notifications, admin alerts, or any flow where the recipient is fixed.

Setting Up a Webhook Action

Add a Webhook action

In your workflow, click Add Action and search for Webhook. You'll find it under the Send Data category. Select Webhook to add it to your workflow.

Selecting the Webhook action from GHL workflow actions panel

Configure the request

In the webhook configuration panel, set:

  • Action Name: Give it a descriptive name (e.g., "WhatSnap Message")
  • Method: Select POST
  • URL: Paste the webhook endpoint above

Add the message parameter

In the Custom Data section, add a key/value pair with message as the key and your message text as the value. This field accepts GHL custom values like {{contact.first_name}}, so you can personalize every message.

Webhook configured with message custom data and GHL merge fields

Test with a single contact

Click Save Action, then run the workflow on a test contact to verify delivery before going live.

Available Parameters

Add these keys in the Custom Data section of the webhook body:

KeyRequiredDescriptionExample Value
messageOne of three*The message text (supports GHL custom values)Hi {{contact.first_name}}!
voiceMessageUrlOne of three*URL to an audio filehttps://storage.googleapis.com/.../greeting.mp3
attachmentsOne of three*One or more image/media URLs (comma-separated for multiple)https://your-cdn.com/photo.jpg
accountNoRoute through a specific line — use the line tag valuep2p-account-sales
effectNoiMessage visual effect — see iMessage Media & Effectsconfetti

*At least one of message, voiceMessageUrl, or attachments is required.

Selecting a Specific Line

Add the account parameter to route the message through a specific connected device. Set the value to the tag name of the line you want to use (e.g., p2p-account-sales).

This is how you control which phone or device sends the message — useful when you have multiple lines for different team members or purposes.

How account interacts with tag-based routing:

  • No account: WhatSnap reads the contact's p2p-account-* tag, and falls back to your default Line if there is none.
  • account set: it overrides the contact's tag for this message, and after sending, the contact's account tag is updated to this Line. It behaves like #switch, not like #switch_unique.
  • Unknown tag in account: the message goes out through your default Line.

#switch and #switch_unique commands are not read in webhook messages. If you put one in the message field, the recipient will see it as text. Use account to pick the Line.

Webhook configured with account routing and confetti iMessage effect in GHL Custom Data

In the screenshot above, three custom data fields work together:

KeyValuePurpose
messageThe message textWhat gets sent
accountp2p-account-salesSends from the "sales" line
effectconfettiAdds a confetti animation (iMessage only)

Find your line tags in WhatSnap Manager → Lines tab. Each connected device has a unique tag like p2p-account-[name]. Learn more in Understanding Line Switching.

Adding iMessage Effects

The effect parameter adds visual animations to your message — confetti, balloons, fireworks, lasers, love, celebration, spotlight, echo, slam, loud, gentle, and invisibleInk. This only works when the sending line is iMessage; on other channels, the effect is ignored and the message sends normally.

See iMessage Media & Effects for the full breakdown of bubble vs. screen effects and best practices for combining them with images and voice messages.

Sending Images and Media

Use the attachments parameter to send images, GIFs, or other media files. Pass either a single URL or multiple URLs separated by commas:

On iMessage, attachments deliver as native media. On SMS, they convert to MMS where supported by the carrier. For dynamic per-contact images (certificates, QR codes), see iMessage Media & Effects.

You can combine attachments with message to send text and media together, or with account to route through a specific line.

Sending Voice Messages

Replace message with voiceMessageUrl to send an audio file instead of text. The recipient receives a native voice message with a playable waveform — it looks exactly like a voice note recorded on the phone.

Webhook configured with voiceMessageUrl for sending audio messages

When using voiceMessageUrl, you don't need the message key — the audio replaces the text entirely. You can still combine it with account to choose which line sends it.

Upload your audio files to GHL's Media Library (or any public storage) and copy the URL. You can also use a GHL custom value here for advanced use cases — for example, dynamically selecting different audio greetings per contact.

Common Questions

Can I use webhooks and native actions in the same workflow?

Yes. You can mix LeadConnector's native actions with WhatSnap webhooks. Use webhooks for messages you want sent through your physical devices.

Do webhook messages appear in GHL conversations?

Yes. Messages sent via webhook sync back to the GHL conversation, and replies are captured automatically.

What if my line is disconnected when the webhook fires?

WhatSnap queues messages for up to 24 hours. If the line reconnects within that window, messages deliver. After 24 hours, they're marked as failed.

Can I send to WhatsApp via webhook?

Yes. WhatSnap automatically detects the recipient's capability and routes through the appropriate channel (iMessage, SMS, or WhatsApp).

Related

Was this page helpful?

Last updated on October 15, 2026

On this page