Skip to main content

AI Channels: Talk to Your Industrial AI Agents through WhatsApp Using Whapi

Connect your own WhatsApp number through Whapi so your app's end users talk to your Industrial AI agents on it, with the access rules you choose.

Written by Sergio M

With a Whapi channel, your Industrial AI agents answer on your own WhatsApp number instead of Ubidots' managed one. Your end users write to your number, log in with their app user, and talk to the agents their access rules allow. Ubidots connects to the number through Whapi, a third-party WhatsApp API service where you link it.

To get started without a number of your own, use the managed channel instead: see Talk to Your Industrial AI Agents through WhatsApp.

Important: Whapi is an unofficial WhatsApp API, and WhatsApp can block a number used this way. Use a number only for Ubidots: every chat to it gets replies from your agents. See Whapi's guide How to not get banned.

Managed number or your own number?

WhatsApp - Managed

Whapi

Number

Ubidots' number, shared by many channels

Your own number, for this channel only

Finding your channel

Users send the channel's identifier

Any message to your number

What you need

Nothing beyond your Ubidots plan

A Whapi account and a phone with WhatsApp on that number

Requirements

1. Connect your number in Whapi

  1. Sign up or log in at the Whapi dashboard and open your channel.

  2. On the phone, open WhatsApp and go to Settings → Linked devices → Link a device. Scan the QR code shown on your Whapi channel.

  3. When the channel is authorized, copy its API token.

Whapi's own tips: if the number is newly registered in WhatsApp, wait at least a day before connecting it, and open WhatsApp on the phone at least once every 14 days to keep the link active. See Whapi: Getting started.

2. Create the channel in Ubidots

Go to AI Center → Channels, click Add channel and choose Whapi.

Add a channel dialog with WhatsApp - Managed, Whapi and Web console

  1. In the Setup tab, check the App whose users will log in, enter a Channel name (your users see it in the assistant's messages) and, optionally, a Description.

  2. Paste the token into Whapi channel token.

  3. Click Next. In the Access tab, click Add rule, choose who it covers and pick its agents. Rules work the same way as in the web console: see Web Console for End Users.

  4. In the Instructions tab, click Use suggested instructions for WhatsApp-friendly formatting, or write your own. Short answers work best on WhatsApp.

  5. Click Create channel.

Setup tab of a new Whapi channel: App, Channel name, Description and Whapi channel token

When you create the channel, Ubidots checks the token and connects your Whapi channel to Ubidots for you: there's nothing to configure in Whapi. Your other webhooks in Whapi are kept. If the check fails, you'll see one of these messages:

  • "Whapi didn't accept this token, or couldn't be reached." Copy the token again from your Whapi channel and retry.

  • "This token's Whapi channel has no phone number connected." Link the number by scanning the QR code in Whapi first.

Note: Use each Whapi channel in only one Ubidots channel. The token can't be changed later: to switch numbers, delete the channel and create a new one with the new token.

3. Share the channel with your end users

After you create the channel, the Share your channel dialog shows a link that opens a WhatsApp chat with your number, and the number itself. Send either one to your end users. To see them again later, open the channel and click Share.

4. What your end users do

  1. They write any message to your number. The assistant replies with a Log in button.

  2. The button opens your app's login page, where they sign in with their usual app user.

  3. Back in WhatsApp, they send their question.

  • Agents read text only: voice notes, images and files get no answer. Group chats aren't answered.

  • Sending menu opens Options: Change assistant, Log out and Help. Users can also send /agents, /login, /logout and /help.

  • Each login link works once and expires. Users send /login to get a new one.

  • If no access rule includes the user, they see: "Your account has no assistant here yet. Ask your provider for access."

5. Pause or delete the channel

  • Pause or resume: use Pause or Resume in the channel's ⋮ menu. While the channel is paused, messages to your number get no reply.

  • Delete: use Delete in the ⋮ menu and confirm. This can't be undone. If you keep using the number with Whapi, also delete Ubidots' webhook from your Whapi channel's settings.

FAQ

Can I keep using WhatsApp on that phone?
The number stays active on the phone, but every chat to it gets replies from your agents. That's why it should be a number used only for Ubidots.

Who pays for Whapi?
You do, directly to Whapi, under your Whapi plan. Agent answers use AI credits from your Ubidots account, as on any channel. See AI Center: Overview, Plans and AI Credits.

What language does the assistant use?
The fixed messages (login, menus and help) are in English. The agent itself can answer in your users' language: say so in the agent's system prompt or in the channel's instructions.

Related articles

Did this answer your question?