Starting a robot over WhatsApp
Starting a robot over WhatsApp
Roberty can start a robot when a WhatsApp message arrives at a number connected to your workspace. It is a practical way to kick off automation from a phone, or to wire a robot into a flow that already runs on WhatsApp.
How it works
You configure a command on the robot — a keyword or phrase. When that command is sent (prefixed with /) to the WhatsApp number linked to the device, the robot starts automatically.
Prerequisites
Before setting this up, you need:
- A WhatsApp bot on the device — open Devices in the Studio, pick the device, and set the bot up on its WhatsApp tab. See WhatsApp.
- That device linked to the robot — the same device hosting the WhatsApp bot must be linked to the robot.
To link a device to the robot, see Linking a device.
Configuring the WhatsApp command
-
Open the robot's Designer.
-
Click the gear icon (⚙️) to open the settings.
-
Find the WhatsApp command field.
-
Type the command's keyword (without the
/— the system adds it).For example: type
runand the command that starts the robot is/run. -
Click the save icon and confirm.
- A command of a single letter is not allowed.
- To remove an existing command, save the field blank.
Starting the robot
With the command configured, send a message to the bot's WhatsApp number in this shape:
/run
The robot starts immediately on the linked device.
Passing arguments over WhatsApp
You can send extra data along with the command, separated by spaces:
/run argument1 argument2
Those arguments are available to the robot while it runs:
| Data | How to reach it (custom code) |
|---|---|
| Everything after the command | args.whatsApp.content |
| The number that sent the command | args.whatsApp.from |
In practice: the command /process 05.541.242/0001-06 sends a CNPJ as an argument, which the robot picks up through args.whatsApp.content.
Replying over WhatsApp
For the robot to answer whoever sent the command, use the WhatsApp message action with args.whatsApp.from as the recipient.
If the bot's number is in a group, any member of that group can start the robot with the command. A reply sent to args.whatsApp.from from a group goes to the whole group, not to the individual.
Next
- Webhook — start the robot with an API call
- Robot parameters — work with reusable variables in the flow