Creating an UbiFunction

Step-by-step guide on how to create an UbiFunction

You can create and develop UbiFunctions in two ways:

  1. Web UI — Create and edit functions directly in your Ubidots account, as described below.

  2. CLI — Create, test, and deploy functions locally with full runtime replication. Developing locally unlocks the power of your preferred IDE and AI-powered tools like Claude Code.

ubidots functions new --name my-function --runtime python3.11:base
ubidots functions start --methods POST
circle-info

See the full CLI reference for UbiFunctions for local development workflows including push, pull, and live testing.

Using the Web UI

  1. In your Ubidots account, go to the "Devices" tab and select "Functions".

  1. Click the "+" icon to create your first UbiFunction:

  2. Give the function a name.

circle-exclamation

Type the name for this ubifunction in the corresponding field:

  1. Scroll down to the Runtime option and select the runtime that you require:

  1. scroll down to the HTTP Method section and select the HTTP method that this function will allow:

  1. Other configuration options:

  • Token: select a token from your account to use in your function code.

  • Environmental variables: select one or more environmental variables from the Global Propertiesarrow-up-right of your account to use in the function code.

  • Max. execution time: the maximum time your function takes to execute all the code.

  • Time-based trigger: create a cron UbiFunction based on a time interval or a Crontab expression.

  • Raw function: HTTP headers and URL paths will be passed to the function. "Content-Type" can be different than "application/json". Custom response codes can be returned from the function.

  • CORS Policy: Enables calling this function from web browser's URLs different than parse.ubidots.com.

  1. Scroll down to the bottom of the page and hit the SAVE button to save these settings.

Last updated

Was this helpful?