Appearance
Call Xano from workflows
The API Request action calls one of your Xano endpoints from a workflow. Use it whenever a table isn't enough: to create, update, or delete records, to run your own logic in Xano, or to sign a user in.
It works in Interface workflows (it runs in the browser) and in backend workflows such as API Endpoints (it runs on your WeWeb server).
Add the action
- In a workflow, click
+ Add action. - Select
Xano→API Request. - Select the
API Group, then theEndpoint. Each endpoint shows its method and path, for examplePOST /job. - Fill in the inputs WeWeb shows for that endpoint:
URL Params: The parts of the path in curly braces, such as{job_id}.Query Parameters: The inputs of aGETendpoint.Body: The inputs of aPOST,PUT,PATCH, orDELETEendpoint.
- (Optional) Open
Advancedto addCustom Headers, or to turn onStream Response.
Bind each input to the data you want to send, for example the value of a form input.
In a backend workflow, select the Xano connection in the action. Without it, the action fails with Xano connection is required.
EDIT ENDPOINTS REPLACE THE WHOLE RECORD
Xano's default edit endpoints replace the record with what you send. If you only send the field you changed, the other fields can go back to their default value. Send every field of the record when you update it.
Use the response
The action returns more than the data of your endpoint:
json
{
"body": { "id": 12, "title": "Product designer" },
"status": 200,
"headers": { "content-type": "application/json; charset=utf-8" }
}What your endpoint returned is in body. In the next actions, bind to the body of the action's result, for example body.id, not to the result itself.
Send the signed-in user
When Xano is your Authentication System and a user is signed in, WeWeb adds their session to the request. You don't need to add an Authorization header:
- In
Interfaceworkflows, the session is always sent. A header you add yourself would be replaced by it. - In backend workflows, the session of the user who called the API Endpoint is sent.
The session only goes to the Xano connection used for sign in. If your project has a second Xano connection, its requests don't carry the session.
Upload files
If your Xano endpoint expects a file (a file resource input), bind that input to a file:
- In an
Interfaceworkflow, bind it to the value of aFile uploadelement on your page. A single-file upload goes to a single-file input, a multiple-file upload goes to a list input. - In a backend workflow, add a parameter of type
fileto your API Endpoint, and bind the input to that parameter.
WeWeb then sends the request in the format Xano expects for files. A file URL or a storage path doesn't work: Xano needs the file itself.
Stream a response
Some answers take time, like the reply of an AI model. With Stream Response, your app shows the answer piece by piece while Xano produces it, instead of waiting for the end.
- In Xano, set up your endpoint to stream its response.
- In an
Interfaceworkflow, openAdvancedin theAPI Requestaction and turn onStream Response. - The action becomes a loop that runs until
Until Stream Ends. Add the actions that handle each piece inside it, for example aChange variable valuethat adds the new piece to a text variable displayed on your page. - Add the actions that should run once the full answer has arrived after the loop.
Stream Response is available for GET, POST, PUT, and PATCH endpoints, in Interface workflows only. In backend workflows, the action waits for the full response.
Your Xano endpoint must stream on its own: WeWeb can't turn a normal response into a stream.
See a full streaming example →
Handle errors
When Xano answers with an error, the action fails and the workflow goes to its error branch. The error tells you what went wrong:
- The HTTP status, for example
404. - The Xano error code, for example
ERROR_CODE_NOT_FOUNDorERROR_CODE_UNAUTHORIZED.
Build your error handling on the status or the code: the error message can be empty.
See the most common errors and their fixes →
CONTINUE LEARNING
Calling Xano from workflows is also how you sign users in. Next, set Xano up as your Authentication System.

