Skip to main content

Creating a Send WhatsApp Action on a Workflow Task

A Send WhatsApp action sends a templated message when a Member enters its configured Workflow task. It can also start a WhatsApp conversation handled by a Workflow.

How it fits together: "Send WhatsApp" is an Action type in Gravity Rail. Attach it to a workflow task as an entry action — when a member enters the task, the WhatsApp message fires automatically. Pair it with a Routine to message a targeted group on a schedule.

Prerequisites​

  • The workspace must be declared free of PHI — WhatsApp is not HIPAA-eligible (see WhatsApp and HIPAA)
  • The whatsapp feature must be enabled on your workspace (ask your org admin if you don't see WhatsApp options)
  • A workflow with at least one task (see Workflows)
  • A phone number with WhatsApp turned on (see WhatsApp Messaging) — this is the number the message is sent from
  • The target member must have WhatsApp enabled (defaults to off; set notifyWhatsapp through the Members API — see Member Opt-In)

Steps​

1. Open your workflow​

Navigate to Workflows and open the workflow you will use. If you don't have one yet, create a new workflow and add at least one task.

2. Navigate to the Actions page​

Go to Actions in your workspace.

3. Create a new action​

Click New Action.

4. Configure the trigger​

Set the trigger to Task Entered and select the task from your workflow. The WhatsApp message fires when a member enters this task.

5. Select "Send WhatsApp" as the action type​

In the action type dropdown, select Send WhatsApp. The WhatsApp configuration form will appear. This option only appears when the whatsapp feature is enabled on your workspace.

6. Select the phone number​

Choose the phone number that will send the message from the Phone Number dropdown. This determines the "from" number that the member sees. The number must have WhatsApp turned on — if no eligible numbers are listed, enable WhatsApp on a phone number first (see WhatsApp Messaging).

7. Enter the message template​

In the Message field, enter your message body. You can use template variables for personalization:

Hi {{member.first_name}}, this is a reminder about your appointment tomorrow. Reply to this message if you need to reschedule.

For available variables, see Prompt Templates.

Outside the 24-hour window, use an approved template. WhatsApp only allows free-form outbound text within 24 hours of the member's last message. After that, the message body must exactly match a template you've had approved with Meta via Twilio, or Twilio will reject the send. See Template Messages and the 24-Hour Window.

8. Optionally start a conversation​

Provide a Workflow if you want the message to begin an AI-powered conversation instead of sending a single message:

  1. Select a Workflow — this workflow will handle the member's replies
  2. Optionally enter an Initial Message — a message sent as the user's first message to kick off the workflow

When a workflow is provided, a new WhatsApp chat is created for the member and the AI agent handles replies. When it is omitted, the message is sent as a one-off with no conversation attached.

9. Save the action​

Click Save. The action is now linked to your workflow task and will fire whenever a member enters that task.