Skip to main content
The WebView node opens a web interface for the user to complete an action (for example, a payment or a form). If you enable the flow-blocking option, the flow remains paused until it receives a callback response or the expiration time is reached.

How it works

In the node, enter the URL of your web interface in the corresponding field. The flow sends that link to the user as a button or link in the chat.
The executionId is always added as a parameter in the URL when the WebView is opened. Your page must read it from the URL and send it in the callback.
The URL the user receives has this format (the executionId is added automatically):
If your URL already has other query params, it is added with &: https://your-domain.com?foo=1&executionId=<value>.
The user clicks the button and completes the action in the web interface (payment, form, etc.).
When the user finishes, your web page must send the callback data and the executionId to your server, and your server must call the callback endpoint to unblock the flow.Endpoint (POST method, called from your server):
Request headers (JSON, server-side only):
Use an API key with the Execute Brain Studio workflows permission. Set it up in Settings → API Keys.
The workflow API key must stay on your server. Never include it in browser code (JavaScript, HTML, or public variables).
Request body (JSON):

While waiting

When the flow-blocking option is enabled, if the user writes something in the chat while the WebView is open:
  • They receive the message configured in Waiting message.
  • The flow does not advance until the WebView responds or the expiration time is reached.
The flow is only blocked if you enable the “Block flow until response” option, located in the advanced tab of the node.

Three possible outputs

When flow blocking is enabled, each callback result connects to a different branch through its own edge:
Connect all three edges of the WebView node to the corresponding nodes: one for success, one for error, and one for when the time expires.

Configuration

Closing the WebView

WhatsApp

A trick to return to the chat after an action is to redirect to a WhatsApp link with your channel’s phone number. Replace YOUR_CHANNEL_NUMBER with that number, including the country code and without the + sign:

Facebook and Instagram

You can send the user to Jelou’s closing screen. It shows the Final message, which you configure in the WebView node’s Advanced tab, and, when possible, takes the user back to the chat. Once your server confirms the callback responded successfully (HTTP 2xx), redirect the user with the executionId:
Callback first, redirect second. If you redirect without sending the callback, the flow keeps waiting until the expiration time runs out and takes the expiration output. If you redirect before the callback responds, you run the same risk if the callback doesn’t complete.
For the user to go back to the chat, two things are needed. First, the channel must have the account’s Meta username set; in Jelou you can check it in the Username field, in the channel’s Profile section. Second, the user’s device must allow that interaction, which happens mostly on Android. If either one is missing, the user still sees the final message, which clearly tells them their next step so the experience isn’t cut short.