How to Set Up Kapso with Gravity Notifications

• No comments

Gravity Notifications can send WhatsApp messages when someone submits a Gravity Form. The easiest way to connect WhatsApp is Kapso: you get a WhatsApp number and an API key in a few minutes, without setting up a Meta developer app yourself.

This guide covers five things:

  1. Creating a Kapso project and getting your Phone Number ID
  2. Creating a Kapso API key
  3. Creating a WhatsApp message template and getting it approved
  4. Connecting Kapso to Gravity Notifications
  5. Adding a Phone field to your form and a WhatsApp feed that uses your template

What you need:

  • A WordPress site with Gravity Forms and Gravity Notifications installed
  • A free Kapso account (app.kapso.ai)
  • A phone with WhatsApp, if you want to test with the sandbox number

Step 1: Start a Kapso project

Sign in to Kapso. During onboarding, Kapso asks how you plan to use WhatsApp. Choose Send and receive messages from my code (1). That’s the option that gives an external app like Gravity Notifications access through the API.

Kapso onboarding: choose

Step 2: Add a test recipient (sandbox only)

Kapso starts you on a shared Sandbox WhatsApp number, so you can try things out before connecting your own number. The sandbox can only message numbers you’ve added as test recipients. Enter your personal WhatsApp number here (2) and follow the prompt to verify it.

Add your WhatsApp number as a sandbox test recipient

Note: A personal number can only be linked to one Kapso sandbox at a time. If yours is already linked to another sandbox, skip this step. It only matters for test messages from the sandbox.

Step 3: Copy your Phone Number ID

Open Phone numbers in your Kapso project. Next to the WhatsApp number, copy the Phone Number ID (3) and keep it somewhere handy. You’ll paste it into WordPress in Step 7.

Copy the Phone Number ID from Kapso

Step 4: Create an API key

Go to Integrations → API keys and click Create API key (4).

Create a new API key in Kapso

Give the key a name you’ll recognise later, such as Gravity Notifications (5), then click Create key (6).

Name the API key and create it

Step 5: Copy the API key

Kapso shows the new key once. Click the copy button (7) and store the key safely, for example in a password manager.

Copy the new API key

Keep this key private. Anyone with it can send WhatsApp messages from your account. If it leaks, delete it in Kapso and create a new one.

Step 6: Create a WhatsApp message template

WhatsApp doesn’t let a business send free-form messages to someone who hasn’t messaged it first. Business-initiated messages, such as a form notification, must use a message template that Meta has reviewed and approved. Gravity Notifications sends every WhatsApp message through one of these templates, so you need at least one approved template before you can add a feed.

In Kapso, open WhatsApp Templates. The list shows every template on your WhatsApp Business Account and its Status (9). Click Create (8) to add a new one.

The WhatsApp Templates list in Kapso

Fill in the basic information:

  • Template Name (10): use lowercase letters, numbers and underscores only, for example new_enquiry_alert. You’ll pick the template by this name in WordPress.
  • Language: the language the message is written in, for example English (US).
  • Category (11): choose UTILITY for transactional messages like enquiry alerts, order confirmations or booking updates. Use MARKETING only for promotional content. Meta checks the category during review and may change it if the content doesn’t match.
  • Leave Use named parameters turned off. This guide uses numbered variables ({{1}}, {{2}}), which map to the Variable 1, Variable 2 fields in Gravity Notifications.
Template name, language and category

Next, write the Message Content (12) in the Body section. Wherever the message should include information from the form entry, type a numbered variable, starting at {{1}} and counting up:

Hi {{1}}, thanks for contacting us. We received your enquiry about {{2}} and will reply within one business day.

Under Parameter Examples (13), enter a realistic sample value for each variable, for example John for {{1}} and website redesign for {{2}}. Meta uses these examples to understand the message during review. Templates with missing or vague examples are more likely to be rejected. The Preview panel on the right shows how the message will look.

The Footer and Buttons sections are optional. Click Create & Submit (14) to send the template to Meta for review.

Write the message body with variables and example values

When is the template approved?

After you submit it, the template shows as pending in the templates list. Meta usually reviews utility templates within a few minutes, but it can take up to 24 hours. When the Status column (9) says Approved, the template is ready to use. If it says Rejected, see Troubleshooting.

You can continue with the next step while you wait.

Step 7: Connect Kapso in Gravity Notifications

In your WordPress admin, open the Gravity Notifications settings page and fill in the WhatsApp section:

  • WhatsApp provider (15): choose Kapso.
  • Kapso API Key (16): paste the key from Step 5.
  • Kapso Phone Number ID (17): paste the ID from Step 3.
Choose Kapso and enter the API key and Phone Number ID

Scroll down and click Save Changes (18).

Save the settings

Check your templates

When the settings are saved, Gravity Notifications loads the templates from your Kapso account and lists them in the Templates section (19), with each template’s name, language, category and status. The line above the table summarises how many are approved, for example “2 of 2 templates approved.”

Approved templates listed in the Gravity Notifications settings

The list isn updated from Kapso every hour. If you’ve just created a template, or one has just been approved, click Refresh (20) to load the latest list now. Only templates with the status APPROVED can be used in a feed.

Step 8: Add a Phone field to your form

The WhatsApp message is sent to the phone number someone enters on the form, so the form needs a Phone field. WhatsApp needs the full international number, including the country code.

  1. Go to Forms and open the form in the form editor.
  2. Under Add Fields, add a Phone field (21).
  3. Click the field to open Field Settings, and set Phone Format to International (formatted) (22). This adds a country selector to the field, so every number is saved with its country code.
  4. Optionally, set Default Country to the country most of your visitors are in, and tick Show country dial code.
  5. Click Save Form.
Add a Phone field and set Phone Format to International (formatted)

Why International (formatted)? With the US Standard format, visitors enter a number without a country code, and WhatsApp can’t deliver to it.

Step 9: Add a WhatsApp feed to a form

Now tell Gravity Notifications which form should send a WhatsApp message.

  1. Go to Forms, open the form, then go to Settings.
  2. Click the WhatsApp | Twilio tab (23).
  3. Click Add New (24).
Open the WhatsApp | Twilio tab and add a new feed

Fill in the feed:

  • Feed name (25): an internal label, for example New enquiry – WhatsApp.
  • Notification Type (26): choose WhatsApp.
  • Recipient (27): choose the Phone field you added in Step 8. Each message goes to the number entered on the form. To always send to a fixed number instead, such as your own, pick Add Custom Recipient.
  • Message (28): leave it for now. It fills in when you choose a template.
The new feed form

When you choose WhatsApp, a WhatsApp Template field appears. Choose your approved template from the list (30). Each template is listed with its language, for example order_confirmation (en_US).

  • If a template you just approved is missing, click the reload icon (↻) under the list.
  • The Create a new Template link opens Meta’s WhatsApp Manager. With Kapso, it’s simpler to create templates in Kapso, as in Step 6.

After you choose a template, the form updates:

  • Message (31) shows the template’s text. It’s read-only because WhatsApp only sends the approved wording. To change the wording, edit the template in Kapso and get it approved again.
  • A Variable field (32) appears for each variable in the template: Variable 1 for {{1}}, Variable 2 for {{2}}, and so on. All of them are required. See the next section for how to fill them in.
Choose a template and fill in its variables

Click Save Settings (29).

Submit the form once to test it. The message should arrive on WhatsApp within a few seconds.

How template variables work

Each {{N}} in the template is a placeholder. When the form is submitted, Gravity Notifications replaces it with whatever you entered in the matching Variable N field. The variable fields support merge tags, so the value can come from the submitted entry:

  1. Click the merge-tag button ({..}) next to the variable field.
  2. Choose the form field to insert, for example Name (First). This adds a tag such as {Name (First):3.3}.

You can also type plain text, or mix text and merge tags. Other merge tags such as {entry_id} and {form_title} are available too.

For example, the new_enquiry_alert template from Step 6 could be filled in like this:

Template variableFeed fieldValue entered
{{1}}Variable 1{Name (First):3.3}
{{2}}Variable 2the merge tag of the form’s “Service” field

If someone named Sarah submits the form and selects “SEO audit”, WhatsApp delivers:

Hi Sarah, thanks for contacting us. We received your enquiry about SEO audit and will reply within one business day.

A few tips:

  • Match the meaning, not just the number. Variable 1 always replaces {{1}}. Check the Message preview to see where each variable appears.
  • Avoid empty values. If a variable’s form field is optional and left blank, the sentence will read oddly, and WhatsApp may reject the message. Map variables to required fields, or use fixed text.
  • The field numbers in merge tags depend on your form. {Name (First):3.3} is the First Name of field 3 in this example. Always insert tags with the {..} button instead of copying them from another form.

Troubleshooting

“WhatsApp” is greyed out in Notification Type

Gravity Notifications only enables WhatsApp when both of these are true:

  • the Kapso API key and Phone Number ID are valid, and
  • the number has at least one approved WhatsApp template.

Create a template in Kapso (Step 6) and wait for it to be approved. Then return to the Gravity Notifications settings page and click Refresh under Templates.

My template doesn’t appear in the WhatsApp Template list

  1. Check its status in Kapso. Only Approved templates can be used.
  2. Click Refresh under Templates on the settings page, or click the reload icon (↻) under the template list in the feed.
  3. Make sure the template belongs to the same WhatsApp Business Account as the Phone Number ID in the settings.

A template was rejected

Meta rejects templates whose content breaks its policies or whose category doesn’t match the content. Common fixes:

  • Give clear, realistic Parameter Examples for every variable.
  • Don’t start or end the message with a variable, and don’t put two variables next to each other.
  • Don’t use UTILITY for promotional wording such as discounts or offers.

Edit the template in Kapso, or create a new one with a different name, and submit it again.

“Could not load templates: Error validating access token: Session has expired…”

This error comes from Meta, not from WordPress. It usually means you’re still on Kapso’s shared sandbox number, and the sandbox’s Meta session has expired. Your Kapso API key itself is fine.

The fix is to connect your own WhatsApp number:

  1. In Kapso, go to Phone numbers → Set up number and follow the steps to connect your WhatsApp Business number.
  2. Copy the new Phone Number ID into Gravity Notifications (Step 7) and save.
  3. Create a message template and wait for it to be approved (Step 6).
  4. Click Refresh under Templates.

The sandbox is fine for a quick look. For real form notifications, use your own number.

Messages aren’t arriving while testing with the sandbox

The sandbox only delivers to numbers added as test recipients (Step 2). Add the recipient there, or connect your own number.


Wrapping up

That’s it: Kapso supplies the WhatsApp number, the API and your approved message templates, and Gravity Notifications fills in each template with entry data whenever a form is submitted. You can add more feeds per form, for example one alert to your team and one confirmation to the customer, each with its own recipient, template and variables.

Leave a Reply

Your email address will not be published. Required fields are marked *