Creating an UbiFunction

Step-by-step guide to creating a UbiFunction

You can create and develop UbiFunctions in two ways:

  1. Web UI — Create and edit functions directly in your Ubidots account.

  2. CLI — Create, test, and deploy functions locally with full runtime replication. Local development unlocks 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 Devices and select Functions.

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

  1. Give your function a name.

circle-exclamation

Enter the name in the corresponding field:

  1. Scroll down to the Runtime section and select the runtime you need.

  1. Scroll down to the HTTP Method section and select the HTTP method this function will allow.

  1. Configure any additional options:

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

  • Environment variables: Select one or more variables from your account's Global Propertiesarrow-up-right to use in the function code.

  • Max. execution time: Set the maximum time your function can take to execute.

  • Time-based trigger: Create a cron UbiFunction based on a time interval or a crontab expression.

  • Raw function: Pass HTTP headers and URL paths to the function. Use content types other than application/json. Return custom response codes from the function.

  • CORS Policy: Enable calls to this function from browser URLs other than parse.ubidots.com.

  1. Scroll to the bottom of the page and click SAVE to save these settings.

Last updated

Was this helpful?