Skip to main content
Roberty Studio
RPARobot settings

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:

  1. 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.
  2. 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​

  1. Open the robot's Designer.

  2. Click the gear icon (⚙️) to open the settings.

  3. Find the WhatsApp command field.

  4. Type the command's keyword (without the / — the system adds it).

    For example: type run and the command that starts the robot is /run.

  5. Click the save icon and confirm.

Command restrictions
  • 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:

DataHow to reach it (custom code)
Everything after the commandargs.whatsApp.content
The number that sent the commandargs.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.

Careful in groups

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​