WhatsApp Business setup

SENDING GUIDE

Send a WhatsApp message from an Attio workflow.

Everything else in WhatSync is about messages coming in. This is the other direction: a deal moves, an invoice falls due, a booking is confirmed, and the customer hears from you on WhatsApp without anyone tapping send. It runs on the official WhatsApp Business API, so it needs your number connected through Meta and wording Meta approved in advance.

What you need first

Sending is the one part of WhatSync with prerequisites. Read this list before you start, because there is no point writing the workflow until the connection underneath it exists.

Check this first

Only one of the two connections can send

Most teams connect WhatsApp by scanning a QR code with their phone. That one copies conversations into Attio, and it cannot send on its own. This guide needs the other one: your number connected through Meta, on the WhatsApp Business Platform.

The workflow itself can live anywhere that sends an HTTP request. Attio automations, Zapier, Make, n8n, a form, your own backend. All of them do the same thing: send a template Meta already approved.

Before you start

  • A Meta Business portfolio you are an admin on.
  • Your own number connected through Meta, not by scanning a QR code.
  • Attio connected, so replies land on the right person.
  • Your connection ID and service API key, both on your settings page.
  • At least one message template Meta has approved.
  • Somewhere to send an HTTP request from: Attio workflows, Zapier, Make, n8n or your own backend.

Connect your number

This happens on the WhatsApp Business page in WhatSync. It is also where your API keys show up afterwards, so it is the page you will keep coming back to.

  1. 1Open the WhatsApp Business page and sign in with Meta.
  2. 2Pick your number from your Meta Business portfolio. You need admin access to the portfolio it sits in.
  3. 3Connect Attio on the same page, so replies land on the right record.
  4. 4Wait until the WhatsApp Business card says Connected. Your API keys stay locked until it does.
Open the WhatsApp Business page

What you are agreeing to

You keep your own number. Meta does not hand you one. What changes is that every message you start a conversation with has to be a template Meta approved first, and Meta charges you per message at your country's rate.

The official connection supports Meta-approved templates and higher-volume business messaging. The QR connection is designed for conversation sync and person-to-person replies, not automated campaigns.

Meta reviews your business before any of this turns on, so give it more than an afternoon.

Watch the connection walkthrough

Copy your two keys

Every send needs two values from your account: a connection ID that says which WhatsApp to send from, and a service API key that proves the request is yours. You cannot guess either from the examples below.

  1. 1Open your WhatsApp Business settings.
  2. 2Scroll to Workflow API Credentials.
  3. 3Copy the connection ID. It goes in the connectionId query parameter.
  4. 4Copy the service API key. It goes in the x-service-api-key header.
  5. 5If a key ever leaks, rotate it in the same place and update every workflow still using the old one.
Open Workflow API Credentials

Get a template approved

A template is the message with blanks in it. You write it once, Meta reviews it, and after that your workflow can fill in the blanks and send it as often as you like. Nothing sends until one is approved.

Writing one

  1. 1Open WhatsApp Manager or Meta Business Suite.
  2. 2Go to the WhatsApp account you connected to WhatSync.
  3. 3Open Message templates and create a new one.
  4. 4Choose a category: marketing, utility or authentication.
  5. 5Name it in lowercase, something like appointment_reminder.
  6. 6Pick the language, such as en.
  7. 7Write the message and put a variable where a value changes.
  8. 8Add a sample value for every variable. Meta reads them during review.
  9. 9Submit it and wait for approval.
Meta's full template guide

What one looks like

Name

appointment_reminder

Message

Hi {{1}}, this is a reminder that your appointment with {{2}} is scheduled for {{3}}. Reply here if you need to make a change.

{{1}}

Customer name

{{2}}

Team member

{{3}}

Date and time

What gets templates approved

  • Templates are only needed to start a conversation. Once someone replies, you have a 24 hour window to answer freely.
  • Write the message the way the customer should read it. Avoid a vague shell like 'Hi {{1}}, your thing is ready.'
  • Use variables only for what changes: a name, a time, an invoice number, a link.
  • Add sample values when you submit. Meta rejects templates it cannot picture.
  • Say why the customer is hearing from you. Meta reviews for that, and so do customers.
  • One template per purpose. Reusing a generic one for everything gets messy fast.

Build the workflow

The workflow decides when someone should hear from you, then calls WhatSync. Six things it has to get right.

01

Pick the trigger

Start from something your team already tracks: a new lead, a booking confirmed, an invoice due, a renewal coming up.

02

Choose the template

The template name and language in your request have to match the approved template in Meta exactly.

03

Map the phone number

Use the international format with the country code. No spaces, no brackets, no local-only numbers.

04

Fill the variables

They go in order. In this app, {{1}} is param_0, {{2}} is param_1, {{3}} is param_2, and so on.

05

Send the request

Your workflow posts to WhatSync. We check the connection, build the payload and hand it to Meta.

06

Let the webhooks land

Meta reports back what happened to the message. We store it and write it into Attio when sync is on.

The request you send

This is the whole integration. One POST to WhatSync with the template name, the number and the values. We check the connection, build what Meta expects and send it.

POST https://your-whatsync-domain.com/api/send-template?connectionId=YOUR_CONNECTION_ID

Method

POST

Content type

application/json

Auth

Service API key

Send the key from Workflow API Credentials in an x-service-api-key header, or as Authorization: Bearer if that is easier in your tool.

A plain send

curl -X POST "https://your-whatsync-domain.com/api/send-template?connectionId=YOUR_CONNECTION_ID" \
  -H "Content-Type: application/json" \
  -H "x-service-api-key: YOUR_SERVICE_API_KEY" \
  -d '{
    "phoneNumber": "14155550123",
    "templateName": "appointment_reminder",
    "language": "en",
    "parameters": {
      "param_0": "Ava",
      "param_1": "Maya from Sales",
      "param_2": "Tuesday at 2:00 PM"
    }
  }'

param_0 fills {{1}}, param_1 fills {{2}}, param_2 fills {{3}}.

A send with a file

{
  "phoneNumber": "14155550123",
  "templateName": "invoice_ready",
  "language": "en",
  "header": {
    "type": "document",
    "link": "https://example.com/invoice-1042.pdf",
    "filename": "invoice-1042.pdf"
  },
  "parameters": {
    "param_0": "Ava",
    "param_1": "INV-1042",
    "param_2": "$240.00"
  }
}

If the approved template has a header, whether that is a document, an image, a video or a line of text, your request has to include a matching one. Documents sent by link need a filename.

What comes back

{
  "success": true,
  "data": {
    "messaging_product": "whatsapp",
    "contacts": [
      {
        "input": "14155550123",
        "wa_id": "14155550123"
      }
    ],
    "messages": [
      {
        "id": "wamid.HBg..."
      }
    ]
  }
}

This means Meta accepted the message, not that anyone read it. Delivery is confirmed later, by webhook.

After the message goes out

We never guess whether a message arrived. Meta tells us, in four stages, and we write what it says into Attio.

Stage 1

Accepted

Meta took the request

Stage 2

Sent

It left Meta

Stage 3

Delivered

It reached the phone

Stage 4

Read

They opened it

When a message fails instead, Meta sends a reason with it. We store the failure and the reason, so you can see whether the number was unreachable or the template broke a rule.

Fixing common problems

Sends fail for a short list of reasons. Almost always the template, the parameter order, a missing header or the wrong connection.

It says the connection is not ready

Your number is not fully connected. Open the WhatsApp Business page and check the card says Connected. If you connected by QR code instead, this API will not work at all.

Check your connection

Meta rejects the send

Nearly always the template. Check it is approved, the name matches character for character, the language code is right, and the number is in international format.

Template rules

It complains about the header

Your approved template has a header with text, an image, a video or a document. Your request has to include a matching header object.

See a header example

The customer never got it

Check the status in WhatSync or Attio. Meta sends a failed event when someone is unreachable or the template breaks policy, and we store the reason it gives.

How statuses work

The wrong value shows up in the message

Parameter order. param_0 fills {{1}}, param_1 fills {{2}}, param_2 fills {{3}}. Off by one and the name lands where the date should be.

Check the order

Nothing about this looks like my setup

You are probably on the QR code connection, which is what most teams use. It syncs conversations into Attio but cannot send on its own.

Compare the two

Still stuck? Message us on WhatsApp or email hello@appstronauts.shop. Send the template name and the error you got back, and we can tell you which of the six it is.

Meta's own documentation

For anything about templates, policy or pricing, Meta is the source. These are the pages worth having open.

How WhatsApp Business pricing actually works

Ready to set it up?

Connecting your number, checking the connection and copying your keys all happen on one page.