API Node
The API Node lets your chatbot talk to an external system — your own backend, a CRM, a payment gateway, or any third-party service — while a conversation is in progress. The chatbot sends a request, waits for the response, and then decides what to do next based on that response.
Use it whenever a step in your chatbot flow needs live, external data instead of a fixed message — for example, checking an order status, verifying a coupon code, looking up a customer record, or triggering an action in another system.
Setting Up the Request
Open the API Node and fill in the request details:
- Method — Choose
GETorPOST. - API URL — The endpoint the chatbot should call.
- Params — Query parameters sent with the request.
- Headers — Request headers (for example, an
Authorizationkey). - Body — JSON payload sent with the request (used with
POST).
Using contact details in a request
For any Param, Header, or Body value, you can pick a saved contact attribute (like name, email, or phone number) from the dropdown next to the field instead of typing it manually. This inserts it as a placeholder, for example {{email}}, and the chatbot automatically fills in that contact’s actual value when the API is called — the same way an Input Node value can be reused later in the flow. You can also type a placeholder for any value collected earlier in the chatbot (such as something entered in a preceding Input Node) using the same {{variable_name}} format, including directly inside the API URL.
Testing the API
Before connecting the rest of the flow, click Send to test the request. WappCloud calls the API with your current configuration and shows the response. This lets you confirm the request is set up correctly and lets you pick the exact response fields you want to use in the next steps, without waiting until the chatbot goes live.
Deciding What Happens Next
Once a test response is available, choose how the chatbot should continue: Normal or Conditional.
Normal
Pick a field from the API response and give it a variable name. That value is saved and can be reused later in the chatbot flow (in messages, other nodes, or later API calls) using {{variable_name}}, and the chatbot continues to whichever node you connect this response to.
Conditional
Add one or more conditions to route the conversation down different paths depending on the response:
- Field — Select a field from the API response (shown after testing).
- Operator —
Equals,Not Equals,Exists,Not Exists,Less than, orGreater than. - Value — The value to compare the field against.
Each condition gets its own connection point, so you can send the chatbot to a different node depending on which condition matches. Conditions are checked in order, top to bottom, and the chatbot follows the path of the first one that matches.
Handling Failures
Every API Node has a dedicated Failure connection. Connect it to whichever node should run if:
- the API call fails or times out,
- the API returns an error response, or
- none of the conditions match the response.
This connection is required — an API Node without a Failure path connected won’t work correctly, so always wire it to a fallback message or node before publishing the chatbot.
Summary
- Configure the Method, API URL, Params, Headers, and Body.
- Use
{{variable_name}}to pass in contact details or values collected earlier in the flow. - Click Send to test the API and preview the response.
- Choose Normal to save a single response field as a variable, or Conditional to branch the flow based on the response.
- Always connect the Failure output so the chatbot has a fallback when the API call doesn’t succeed.