Skip to content
English
  • There are no suggestions because the search field is empty.

πŸ“² AiSensy + HubSpot WhatsApp Integration β€” Marketing Team Guide

This guide explains how to send personalised WhatsApp messages from HubSpot using AiSensy. Set up a workflow with 2–4 actions: set the campaign name, optionally set media URL and filename, then map contact properties directly to the `aiSensy Hubspot` Google Sheet. The script automatically sends messages every 5 minutes.

πŸ“² AiSensy + HubSpot WhatsApp Integration β€” Marketing Team Guide

What this tool does: Lets you trigger personalised WhatsApp messages to contacts automatically from a HubSpot workflow β€” no coding required on your end. You set up the workflow, map the fields, and the system handles the rest.


πŸ—ΊοΈ How It All Works (Big Picture)

HubSpot Workflow (you set this up)
↓
Edit record: Set AiSensy Campaign Name ← always required
Edit record: Set AiSensy Campaign Media URL ← only if template uses media
Edit record: Set AiSensy Campaign filename ← only if template uses media
↓
Google Sheets: Map contact properties directly to sheet columns
↓
Google Apps Script (runs automatically every 5 min)
↓
AiSensy API β†’ WhatsApp Business API β†’ Contact's Phone
↓
Delivery status written back to HubSpot as a Contact Note

You only need 2–4 actions in your workflow depending on whether you are sending media. Everything else is automated.


πŸ“‹ Before You Begin β€” What You Need to Know

Find Your AiSensy Template Details

Before building the workflow, note down from your AiSensy dashboard:

  • Campaign name β€” the exact name (e.g. test_message). Copy it carefully β€” even one wrong character will cause a failure.
  • Template variables β€” how many 1, 2, 3 etc. your template uses, and what each one represents.

Example template:

"Hi 1, Welcome to Myforexeye. Your 2 is very good."

For this template:

  • Campaign name β†’ test_message
  • 1 β†’ First Name
  • 2 β†’ Company Name

Understand the Google Sheet Column Layout

The sheet aiSensy Hubspot is the queue that feeds the WhatsApp sender. Each column maps to a specific piece of data:

Column Header Name What it holds Required?
A ContactID HubSpot Record ID βœ… Always
B Parameter_1 Template 1 β€” always First Name βœ… Always
C rawPhone Contact's WhatsApp phone number βœ… Always
D CampaignName AiSensy campaign name βœ… Always
E Status Auto-filled by script β€” do not map β€”
F Response Auto-filled by script β€” do not map β€”
G Parameter_2 Template 2 β€” any HubSpot property Only if using 2
H Parameter_3 Template 3 β€” any HubSpot property Only if using 3
I Parameter_4 Template 4 β€” any HubSpot property Only if using 4
J media Public URL of the media file Only if template has media
K filename Filename label for the media Only if template has media

⚠️ Never map Status (Col E) or Response (Col F). These are written automatically by the script β€” mapping them will overwrite status tracking.


πŸ› οΈ Step-by-Step: Setting Up the HubSpot Workflow

Step 1 β€” Create or Open Your Workflow

  1. Go to Automation β†’ Workflows in HubSpot
  2. Create a new workflow or open an existing one
  3. Set your enrolment trigger (e.g. form submission, deal stage change, list membership)

Step 2 β€” Set the AiSensy Campaign Name (always required)

This tells the system which WhatsApp template to send.

  1. Click + β†’ "Edit record"
  2. Configure as follows:
Field Value
Record type Contact (Current object)
Property to edit AiSensy Campaign name
Change type Replace
Choose a value Your campaign name exactly as in AiSensy (e.g. test_message)
  1. Click Save

Step 3 β€” Set Media URL and Filename (only if your template includes media)

Skip this step entirely if your template is text-only.

Action A β€” Set the Media URL

  1. Click + β†’ "Edit record"
  2. Configure:
Field Value
Record type Contact (Current object)
Property to edit AiSensy Campaign Media
Change type Replace
Choose a value Full public URL of your file (e.g. https://your-cdn.com/offer.jpg)
  1. Click Save

Action B β€” Set the Filename

  1. Click + β†’ "Edit record"
  2. Configure:
Field Value
Record type Contact (Current object)
Property to edit AiSensy Campaign filename
Change type Replace
Choose a value A simple label β€” no extension needed (e.g. morning_offer)
  1. Click Save

πŸ’‘ The media URL must be publicly accessible. Paste it into an incognito browser to confirm it opens without any login.

Supported media formats:

Type Formats
Image JPG, PNG, GIF, WebP
Video MP4, 3GP
Document PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX

Step 4 β€” Connect Google Sheets (always required)

This pushes the contact's data into the sending queue. You map HubSpot contact properties directly to sheet columns β€” no intermediate custom parameter properties are needed.

  1. Click + β†’ Integrations β†’ Google Sheets
  2. Select spreadsheet: aiSensy Hubspot
  3. Select sheet tab: Sheet1
  4. Map each column header to the corresponding HubSpot property as shown below

πŸ“Š Mapping Table β€” Text-Only Templates

Sheet Column Header Map to HubSpot Property
A ContactID Record ID
B Parameter_1 First Name
C rawPhone Phone / Mobile Phone / WhatsApp Number (see note below)
D CampaignName AiSensy Campaign name
G Parameter_2 The HubSpot property for 2 (e.g. Company name)
H Parameter_3 The HubSpot property for 3 (if used)
I Parameter_4 The HubSpot property for 4 (if used)

Leave E, F unmapped always. Leave G, H, I unmapped if your template doesn't use those variables.


πŸ“Š Mapping Table β€” Templates With Media

Map everything above, and additionally:

Sheet Column Header Map to HubSpot Property
J media AiSensy Campaign Media
K filename AiSensy Campaign filename

πŸ“ž Which Phone Property to Use?

HubSpot has three phone fields. Map rawPhone to whichever one holds your contacts' WhatsApp-registered number:

HubSpot Property Use when...
Phone Number Main phone is also the WhatsApp number
Mobile Phone Number WhatsApp numbers are stored in the mobile field
WhatsApp Number You have a dedicated WhatsApp field set up

The script handles all number formatting automatically β€” it strips spaces, dashes, brackets, and adds +91 country code for 10-digit numbers. No pre-formatting needed.


🧩 Worked Example 1 β€” Text-Only, 2 Variables

Template: "Hi 1, Welcome to Myforexeye. Your 2 is very good." Campaign name in AiSensy: test_message 1 = First Name  |  2 = Company Name  |  No media

Workflow Actions:

Action 1 β€” Edit record

Property Value
AiSensy Campaign name test_message

Action 2 β€” Google Sheets β†’ aiSensy Hubspot

Sheet Column Maps to HubSpot Property
ContactID Record ID
Parameter_1 First Name
rawPhone Mobile Phone Number
CampaignName AiSensy Campaign name
Parameter_2 Company name

Columns H, I, J, K β†’ leave unmapped.


🧩 Worked Example 2 β€” Media Template, 1 Variable

Template: "Hi 1, check out our morning offer!" Campaign name: morning_offer_campaign 1 = First Name  |  Media = promotional image

Workflow Actions:

Action 1 β€” Edit record

Property Value
AiSensy Campaign name morning_offer_campaign

Action 2 β€” Edit record

Property Value
AiSensy Campaign Media https://47646351.fs1.hubspotusercontent-na2.net/hubfs/47646351/morning/offer.jpg

Action 3 β€” Edit record

Property Value
AiSensy Campaign filename morning_offer

Action 4 β€” Google Sheets β†’ aiSensy Hubspot

Sheet Column Maps to HubSpot Property
ContactID Record ID
Parameter_1 First Name
rawPhone Mobile Phone Number
CampaignName AiSensy Campaign name
media AiSensy Campaign Media
filename AiSensy Campaign filename

Columns G, H, I β†’ leave unmapped (template only has 1).


🧩 Worked Example 3 β€” Media Template, 3 Variables

Template: "Hi 1, your 2 account has a balance of 3. View your report." Campaign name: account_update 1 = First Name  |  2 = Account Type  |  3 = Balance  |  Media = PDF report

Workflow Actions:

Action 1 β€” Edit record

Property Value
AiSensy Campaign name account_update

Action 2 β€” Edit record

Property Value
AiSensy Campaign Media (URL of the PDF report)

Action 3 β€” Edit record

Property Value
AiSensy Campaign filename account_report

Action 4 β€” Google Sheets β†’ aiSensy Hubspot

Sheet Column Maps to HubSpot Property
ContactID Record ID
Parameter_1 First Name
rawPhone Mobile Phone Number
CampaignName AiSensy Campaign name
Parameter_2 Account Type (custom property)
Parameter_3 Balance (custom property)
media AiSensy Campaign Media
filename AiSensy Campaign filename

βœ… Pre-Launch Checklist

Workflow setup

  • [ ] Campaign name copied exactly from AiSensy dashboard (no typos, correct case)
  • [ ] AiSensy Campaign Media and AiSensy Campaign filename set (only if using media)
  • [ ] Google Sheets step connected to aiSensy Hubspot β†’ Sheet1
  • [ ] ContactID β†’ Record ID mapped
  • [ ] rawPhone β†’ correct phone property mapped
  • [ ] CampaignName β†’ AiSensy Campaign name mapped
  • [ ] Parameter_1 β†’ First Name mapped
  • [ ] Additional parameters (G, H, I) mapped only for variables the template actually uses
  • [ ] Status (Col E) and Response (Col F) are not mapped

Test before going live

  • [ ] Enrol one test contact using your own phone number
  • [ ] Open aiSensy Hubspot sheet β€” confirm a new row appeared with correct values
  • [ ] Wait up to 5 minutes for the script to run
  • [ ] Column E shows βœ… Sent
  • [ ] Column F shows a success response
  • [ ] WhatsApp message received with correct text and variable values filled in
  • [ ] HubSpot contact record shows a delivery note in the Activity feed

❌ Common Mistakes & How to Avoid Them

Mistake What Happens Fix
Campaign name has a typo or wrong case 400 error β€” campaign not found Copy-paste the name directly from AiSensy
Wrong number of parameters mapped 400: Template params does not match Count in your template and map exactly that many
Status or Response columns mapped Script status gets overwritten Leave Columns E and F unmapped
Phone number field is empty for a contact Row shows ❌ Error: Missing Data Ensure all enrolled contacts have a phone number
Media URL requires a login to open Message fails or sends without media Test URL in an incognito window β€” must open freely
Parameter column mapped but contact property is blank Empty value sent for that variable Check data quality; fill the property before enrolment
Wrong sheet selected in Google Sheets step Data goes to wrong place Always select aiSensy Hubspot β†’ Sheet1

πŸ“Š Monitoring Your Campaigns

In Google Sheets (aiSensy Hubspot)

Column What to look for
E (Status) βœ… Sent = success  Β·  ❌ Failed = error  Β·  Processing... = in progress
F (Response) Full API response β€” copy this when reporting an issue to the tech team

In HubSpot (Contact Record)

Navigate to the contact β†’ Activity tab. A note is created automatically after each send:

AiSensy WhatsApp Status: βœ… Sent

Campaign: test_message
Timestamp: 27/02/2026, 10:30:00
Details: { "success": true ... }

πŸ†˜ Troubleshooting

Symptom Likely Cause Action
Row added to sheet but no status after 10 min Apps Script trigger not running Contact your technical team
400: Template params does not match Wrong number of parameters mapped Count template variables, fix mapping
401 in Response column API key expired Contact technical team
404 in Response column Campaign name not found in AiSensy Check exact spelling in AiSensy dashboard
No row added to sheet at all Google Sheets workflow step failed Check workflow history on the contact record in HubSpot
Message sent but variable shows wrong value Wrong HubSpot property mapped Re-check your Google Sheets column mapping
Message sent but variable shows blank Mapped property is empty for that contact Fill the contact property and re-enrol

πŸ“ž Support

Issue Who to Contact
Workflow setup questions Your HubSpot admin
Campaign name or template issues AiSensy dashboard β†’ Campaigns
AiSensy API errors support@aisensy.com
Script not running / technical errors Your development team

Last updated: February 2026 Β· Internal use β€” Myforexeye Marketing Team