Building Custom Functions in Xano
Custom Functions are a way to build reusable logic that you can utilize in other workflows. They allow you to build a set of steps once, use them in multiple places, and maintain them in one place. Custom Functions in Xano are built in three parts:-
Inputs
— Inputs are the data that the Custom Function will accept. For example,
nameandemail. - Logic — The logic is the logic that will be executed when the Custom Function is called. For example, retrieving a record from your database or calculating a user’s age.
-
Response
— The response is the data that the Custom Function will return. For our
user_listCustom Function, it might return a list of users, or a single user.
Custom Function Folders
You can organize your Custom Functions into folders for better organization by adding a folder name to the Custom Function name — for example,utilities/user_list instead of just user_list.
You can select Move functions to move your Custom Functions into a folder, and Add Folder to add a new folder.
Creating a new Custom Function
From the sidebar, click Functions or hover over it and click to create a new function immediately.

You can build Custom Functions in Xano in three different ways. Choose the one that best fits your needs. You can switch between them at any time.
- Canvas View
- Function Stack
- XanoScript
The Canvas View
1
Add Inputs to define what your custom function accepts

Learn how to work with Inputs
Inputs define the data your custom function expects. Learn how to add and configure them.
2
Build your logic in the Function Logic or Canvas View
Learn how to work with Functions
Functions define the behavior of your custom function. Add and arrange functions to process inputs and fetch data.
3
Define what your custom function returns with the Response
Learn how to configure Responses
Control exactly what data your custom function sends back.

Here's an example of a basic custom function in the canvas view

