Updated on November 10, 2026
To build an internal WhatsApp panel in Retool, you create a REST API resource that points to the API (with the token stored in the resource, out of the browser), a table that lists sends and their statuses, and a button that triggers a POST query to send an approved template. Resource queries run on Retool’s backend, and a built-in option asks for confirmation before every send.
This guide builds the panel in four parts: the resource, the sends table, the template list and the form with a send button. It closes with permissions and audit logging, which matter more than the UI.
What the panel is for (and what it isn’t)
A Retool panel is great for operations work: resending an order confirmation, notifying one specific customer, checking whether a message was delivered, reviewing today’s failed sends. It isn’t a live chat inbox, and it isn’t a campaign tool for thousands of contacts. Volume sends should come from a queue in your backend.
| Task | Retool panel | Best place |
|---|---|---|
| Send a template to one customer | Yes | Panel |
| Look up delivery status | Yes | Panel |
| Review today’s failures with error codes | Yes | Panel |
| Bulk send to thousands of contacts | No | Backend queue |
| Live conversation with a customer | No | Customer service tool |
Part 1: create the REST API resource
In Retool, you create a REST resource under Resources → Create new → Resource → REST API, with a name, base URL, global headers and an authentication method, as described in Connect to REST API. For the WhatsApp Business API:
- Base URL:
https://graph.facebook.com/v27.0if you call Meta directly, or your provider’s URL. - Authentication:
Bearer token. Retool sendsAuthorization: Bearer {token}on every request. - Token: use a configuration variable marked as secret and reference it with
{{ environment.variables.WA_TOKEN }}.
According to Retool’s configuration variables documentation, secrets can only be used in resource configurations and workflows, and are never exposed on the frontend. Since resource queries run on Retool’s backend, panel users never see the token in their browser.
The resource settings also include Sanitize custom headers, which redacts custom header values from logs and the debug console. Use it if you put any credential in a custom header.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
Part 2: the sends table
You have two possible data sources for the table:
- Your own database, fed by the webhook. Each send is stored with its
wamid, and each status that arrives via webhook updates the row. This is the most complete option, covered in how to save WhatsApp API chat history. - An API that already lists messages, if your provider offers one. Teams using the Cloud API directly usually build this history in their own database from the send response and the webhook.
Create a GET query named listSends. In Retool, GET queries run automatically whenever a parameter changes, per the REST queries guide, so filters bound to components refresh the table on their own. Bind the table to the result:
// Table component data source
{{ listSends.data.data }}
Useful columns: recipient, template, status (sent, delivered, read, failed), date and error code when there is one. Add a status Select and a Date Range as query filters. To understand each status and when it arrives, see WhatsApp API message statuses.
Part 3: the approved template list
Operators shouldn’t type template names. Create a listTemplates query and a Select fed by the result, filtered by status:
// listTemplates query transformer
return data.data
.filter(t => t.status === "APPROVED")
.map(t => ({ label: `${t.name} (${t.language})`, value: t.name, language: t.language }));
With Meta directly, the list comes from your WhatsApp Business Account’s (WABA) templates endpoint. Showing only approved templates prevents the most common panel mistake: sending a pending template or the wrong language.
Part 4: form and send button
Build a form with: phone number (international format, digits only), the template Select and text inputs for the variables. Then create the sendTemplate query, method POST, path /messages (or /<PHONE_NUMBER_ID>/messages with Meta), and a Raw body. Retool accepts an entire body wrapped in double curly braces, built as a JavaScript object:
{{
{
messaging_product: "whatsapp",
to: phoneInput.value.replace(/\D/g, ""),
type: "template",
template: {
name: templateSelect.value,
language: { code: templateSelect.selectedItem.language },
components: [
{
type: "body",
parameters: [var1Input.value, var2Input.value]
.filter(Boolean)
.map(t => ({ type: "text", text: t }))
}
]
}
}
}}
Add the Content-Type: application/json header, since a Raw body doesn’t add it for you. Now the settings that make a difference:
- Manual run.
POSTqueries only run when triggered, by default. Keep it that way. - Confirmation. Enable Show a confirmation before running with a message like “Send template {{ templateSelect.value }} to {{ phoneInput.value }}?”. It’s described in the query run behavior guide.
- Button. On the Button component, add a click event handler with the Trigger query action pointing to
sendTemplate. - Success and failure. In the success handler, trigger
listSendsto refresh the table. Turn on success and failure notifications in the query’s Response tab. - Disable when invalid. Use a condition such as
{{ phoneInput.value.replace(/\D/g, "").length < 11 || !templateSelect.value }}in the button’s disabled field.
The full template component structure (media headers, buttons with dynamic URLs) is in how to send a template message through the API.
Permissions and audit logging
A panel with a send button is a door into your official number. Before rolling it out:
- Restrict the query. Under Access controls in the query’s advanced options, pick the permission groups allowed to run it, per advanced query options. People outside those groups can see the panel but can’t send.
- Log who sent what. On success, store the
wamid, template, recipient and the Retool user who clicked in your database. - Limit usage. A panel isn’t a bulk sender. If someone needs to message a list, the request goes to a backend queue that respects API limits, as in WhatsApp API send queue with Redis and BullMQ.
- Mind cost and the 24-hour window. Every delivered template is billed. Outside the 24-hour customer service window only templates go through; free-form text only works if the customer messaged you in the last 24 hours.
To track template results over time (reads, clicks, cost), see WhatsApp template analytics.
How to do it with Vectalk
With Vectalk, the resource uses the base URL https://apis.vectalk.com.br/api and Bearer authentication with an instance token. Vectalk has ready-made endpoints for all three panel queries:
GET /messageslists message history withstatus,direction,from,to,pageandlimitfilters, and returnsdata,total,pageandlimit, per List Messages. That removes the need for your own database in a simple panel.GET /templateslists the WABA’s templates withstatus,categoryandlanguage, per List Templates.POST /messagessends the template with the same body Meta uses, as in Template.
Template endpoints require an instance token, which also resolves the phone_number_id automatically. Vectalk’s own dashboard has no inbox or bulk sending: in this setup, Retool is your panel. Sign up at apps.vectalk.com.br/register, and read the official WhatsApp API guide if you’re still getting to grips with the model.
If your team lives in Microsoft 365 and wants automation instead of clicks, compare with Power Automate and WhatsApp.
Frequently asked questions
Can panel users see the token?
No, as long as it’s stored in a secret configuration variable used by the resource. Secrets only work in resources and workflows, and resource queries run on Retool’s backend, not in the browser.
Why not call the API from a JavaScript query with fetch?
Because fetch in a JavaScript query runs in the user’s browser, so the token would have to be available there. Always use a resource query.
Can I bulk send from Retool?
Technically you can loop, but it isn’t recommended. Volume sending needs pacing, retries and opt-in. Use the panel to enqueue the request and let the backend send.
How do I show why a send failed?
The status webhook includes the error code when a message fails. Store that code with the wamid and show it in a column. The most common codes are listed in WhatsApp API error codes.
Can agents reply to customers from the panel?
You can send free-form text if the customer wrote in the last 24 hours, but Retool isn’t built for live chat. For multi-agent customer service, use a support tool connected to the API.
Official sources checked on November 10, 2026: Retool: Connect to REST API, Retool: REST API queries, Retool: query run behavior, Retool: advanced query options, Retool: configuration variables, Meta: send messages, Vectalk: List Messages, Vectalk: List Templates, Vectalk: Template.
Put your business on the official WhatsApp
Create your account, connect your number to the official API (you can keep the app with coexistence) and start serving customers and sending messages.
