(Deprecated) Budibase Docs
  • đź‘‹Introduction
  • Quickstart tutorials
    • Build a CRUD app
      • Importing the Vehicles table from a CSV
      • Creating the Service log table from scratch
      • Listing recent Service Logs on the home screen
      • Creating a new Service Log with a modal
    • Build a CRUD app- SQL
      • Connecting to your SQL tables
      • Creating Screens from your SQL tables
      • Using relationships between SQL tables
      • Creating a List screen from scratch, using a SQL table
      • Creating a new log, with a modal
    • Build a CRUD app - REST
      • Adding a REST datasource
      • Creating a query that Lists Issues
      • Using your request to display items in your app
      • Add a “Create Item” request
      • Create a new todo Item, inline
      • Mark todo items as “Done”
      • Finishing Touches
  • Building apps
    • Data
      • Users table
      • Data sources
        • Internal/CSV
        • PostgreSQL and MySQL
        • REST
          • REST Queries
          • REST Bindings Example
          • REST Query Import
          • REST Authentication
          • REST Variables
        • Other sources
      • Data Types
        • Text
        • Number
        • True/False (Boolean)
        • Date/time
        • Options
        • Attachments
          • Example
        • Relationships
          • Example
        • Formula
        • JSON
      • Views
        • Filters
        • Calculations
        • Groups
      • Transformers
    • Design
      • Screens
      • Layouts
      • Components
        • Section
        • Container
        • Data Provider
        • Repeater
        • Table
        • Chart
        • Card
        • Text
        • Button
        • Link
        • Icon
        • Image
        • Embed
      • Forms
        • Form Component
        • Field Groups
        • Fields
      • Bindings
      • Actions
      • App State
      • Conditions
      • App theming (coming soon)
      • Handling Data
        • Search/Filter Data
    • Automate
      • Automation steps
        • Triggers
        • Logic
        • Actions
      • Activating and testing
      • Contextual bindings
    • Admin and management
      • User Management
      • Authentication and SSO
        • OpenID Connect
        • SSO with Auth0
        • SSO with Azure AD
        • SSO with Okta
        • SSO with OneLogin
        • SSO with Google
        • SSO with Keycloak
      • Email
      • Portal
      • User Settings
  • Guides
    • Display user-related data
    • Add search
    • Add filtering
    • Create public & private screens
    • Writing a custom SQL query
    • Create a child record from the parent
    • Items assigned to me
    • Master-detail
  • Self-hosting
    • Get started
      • Budibase CLI Setup
    • Hosting methods
      • Overview
      • DigitalOcean
      • Kubernetes (K8S)
      • Docker compose
    • Hosting settings
      • Advanced options
        • Reverse proxy
    • Accessing CouchDB
    • Accessing MinIO
  • References
    • Budibase architecture
    • Deployment information
    • Troubleshooting
    • Contributing to Budibase
      • Writing Your Own External Data Connectors
Powered by GitBook
On this page
Export as PDF
  1. Building apps
  2. Automate

Contextual bindings

Using previous step outputs in later steps

PreviousActivating and testingNextAdmin and management

Last updated 4 years ago

The real power in Budibase automations is the ability to make use of the outputs from previous steps later on. This can be as simple as using information about a newly saved row which the automation has triggered on or it could be the result of an external API call.

Throughout the system we have used the same when we allow an input to be based on current state and we have built a binding editor into the builder which will help build valid syntax.

Using bindings

The state of an automation will build up the further you move through it, this is made obvious by our binding editor as it adds all of the previous steps outputs onto the list of options that can be used. The values cannot and will not change throughout execution, once they have been set they are fixed, however if you wish to combine multiple steps outputs into a single output you can do something like:

{{ trigger.record.salesPerson }} just made a sale to {{ trigger.record.customer }}!

Our binding editor will keep track of all of the outputs from previous steps but it will not have an understanding of the properties that exist as part of them. In the binding editor you will notice that some properties such as Record will be listed as type object. These particular properties will require you to add the name of a property you wish to make use of - an example of this might be:

  • You have a which holds a list of sales people, with a column for their email address called EmailAddress

  • An automation is created which triggers on the creation of a new sales person

  • You wish to send an email to the sales person to welcome them to the system, in which case you would bind to the {{ trigger.record }} in your send email action and add the EmailAddress property yourself, so it appears as {{ trigger.record.EmailAddress }}

Below is a short video showing how the contextual bindings can be used in a basic automation.

mustache syntax
table