Bubble Docs
  • Introduction
  • New? Start Here
  • What is Bubble?
  • The Glossary
  • User manual
    • Getting started
      • What is Bubble?
      • Building for...
        • Web
        • Native iOS and Android
          • Mobile app quick start guide
          • What is a native mobile app?
          • Native mobile vs. web development
          • Differences in native and web elements
          • Native mobile app terminology
      • Building your first app
        • Planning features
        • Database structure
        • Design and UX
        • eCommerce and payments
          • Shopping cart
          • Checkout page
          • One-time payments
          • Subscriptions
          • Marketplace
      • Creating and managing apps
      • The Bubble editor
        • Tabs and sections
          • Design tab
            • The element tree
            • The property editor
          • Workflow tab
          • Data tab
          • Styles tab
          • Plugins tab
          • Settings tab
            • Application settings
              • Custom headers/body
              • Visual settings
              • Social media sharing
              • Translating your app
              • Email settings
              • Collaboration
            • Custom domain and DNS
          • Logs tab
        • Tools
          • Key features
          • The search tool
          • The Issue Checker
          • The element tree
          • The element property editor
          • The debugger
          • Notes
        • Previewing your app
      • Transitioning to Bubble from...
        • JavaScript
        • HTML and CSS
        • SQL
    • Design
      • Elements
        • Web app
          • The page
          • Containers
            • Groups
            • Repeating groups
            • Table elements
            • Popups
            • Floating groups
            • Group focus
          • Visual elements
          • Input forms
            • Text and numbers
            • Dates and time
            • File uploads
            • Selection controls
        • iOS and Android app
          • The view
          • Containers
          • Visual elements
          • Input forms
          • Mobile reusable elements
        • The element hierarchy
          • The element tree
        • Reusable Elements
      • Styling
        • Color variables
        • Font variables
        • Styles
        • Custom Fonts
      • Responsive design
        • Building responsive pages
        • Legacy articles
          • The Basics (Legacy)
          • Building Responsive Pages (Legacy)
          • Migrating Legacy Pages
          • Tips When Designing (Legacy)
      • Templates
      • The Component Library
      • Importing from Figma
    • Data
      • The database
        • Data types and fields
        • Creating, saving and deleting data
        • Finding data
        • Displaying data
        • Protecting data with privacy rules
        • The database editor
        • Export/import data
          • Exporting data
          • Importing data (CSV)
        • Working with location data
        • Using Algolia
        • Database structure by app type
          • Marketplace Apps
          • Directory & Listings Apps
          • Social Network Apps
          • SaaS Apps
          • Project Management Apps
          • CRM Apps
          • Professional Services Apps
          • On-demand Apps
          • Documentation/ CMS Apps
          • Applicant Tracking System (ATS) Apps
          • Portfolio Apps
          • Gallery Apps
          • Online Store / Ecommerce Apps
          • Blog Apps
          • Messaging App
          • Dashboards
          • Building Block Apps
          • Bubble as a backend
      • Files
      • Images
      • Static data
        • App texts (translations)
        • Option sets
      • Temporary data
        • Custom states
        • URL parameters
      • User accounts
        • Authentication plugins
          • Facebook plugin
          • Fitbit plugin
          • Google plugin
          • Instagram plugin
          • LinkedIn plugin
          • Pinterest plugin
          • Slack plugin
          • Wistia plugin
          • YouTube plugin
        • Cookies set by Bubble
      • Time, dates and time zones
    • Logic
      • The frontend and backend
      • Workflows
        • Events
          • Frontend events
            • Recurring workflows
            • Custom events
          • Backend events
            • Database trigger events
        • Actions
        • API Workflows
      • Dynamic expressions
      • Conditions
      • Navigation
        • Single-page applications (SPA)
        • Multi-page applications
        • Page slugs
      • Device resources
        • Location services
        • Camera/photo library
    • Workload
      • Understanding workload
        • Activity types
        • The workload calculation
        • Client-side and server-side processing
      • Tracking workload
        • Measuring
          • Using App Metrics
        • Monitoring
          • Workload notifications
          • Infinite recursion protection
      • Optimizing workload
        • Optimization framework
        • Optimization checklist
          • Page load
          • Searches
          • Workflows and actions
          • Backend workflows
        • Agency showcases
          • Minimum Studio
          • Neam
          • Support Dept
    • Security
      • Bubble's security features
      • Planning app security
      • Client-side and server-side
      • Bubble account security
      • App security
      • Page security
      • Database security
      • API security
        • API Connector security
        • Data API security
        • Workflow API security
      • Flusk
        • Overview
        • Flusk plan features
        • Getting started with Flusk
        • Flusk security tools
          • The Issues Explorer
          • Issue details
          • Tools and settings
            • Pages rating
            • Database rating
        • Flusk FAQ
      • Cookies
      • Security checklist
    • Previewing your app
      • Previewing a web app
      • Previewing a mobile app
    • Publishing your app
      • Web app
      • Native mobile app
        • Global native mobile settings
        • iOS App Store
        • Google Play Store
        • Publishing FAQ
    • AI
      • Generate apps with AI
        • About AI app generation
      • AI page designer
      • Connect to AI agents
    • Maintenance
      • Collaborators
      • Version control
        • Best practices: Version control
        • Transitioning from the legacy version control
        • Terminology: Version control
        • Version Control (legacy)
      • Commenting
      • Database maintenance
        • Copying the database
        • Restoring database backups
        • Bulk operations
          • Bulk operation methods compared
        • Wiping change history
      • Performance
        • Hard limits
        • Capacity Usage (legacy)
        • Notes on queries
      • SEO
        • Introduction to SEO
        • SEO: App
        • SEO: Page
      • Testing and debugging
        • Introduction to testing and debugging
        • The debugger
        • The server logs
        • Supported browsers
      • API workflow scheduler
    • Integrations
      • API
        • Introduction to APIs
          • What is a RESTful API?
        • The Bubble API
          • Bubble API terminology
          • Authentication
            • How to authenticate
            • No authentication
            • As a User
            • As an admin
          • The Data API
            • Data API Privacy Rules
            • Data API endpoints
            • Data API requests
          • The Workflow API
            • Workflow API privacy rules
            • Workflow API endpoints
            • API workflows
              • Creating API workflows
              • Scheduling API workflows
              • Recursive API workflows
              • API Workflow Scheduler
              • Case: Stripe notifications
        • The API Connector
          • Authentication
          • API Connector security
          • API guides
            • OpenAI
              • Authentication
              • Calls
                • ChatGPT
                  • Chat
            • Google Translate
              • How to setup Google API keys
          • Streaming API
        • API security
        • Plugins that connect to APIs
        • API Glossary
      • Plugins
        • What Plugins Can Do
        • Installing and using Plugins
        • Authentication plugins
        • Special Plugins
      • SQL Database Connector
      • Bubble App Connector
      • WorkOS
        • WorkOS SSO
        • WorkOS API
    • Infrastructure
      • Sub-apps
      • Bubble release tiers
      • Hosting and scaling
        • How Bubble hosting works
        • Scaling with Bubble
        • CDN (Cloudflare)
        • Bubble app names
        • Domain and DNS
      • Compliance
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks and standards
    • Bubble for Enterprise
      • Hosting and infrastructure
        • Dedicated instance
          • The Dedicated editor experience
          • Technical specs
          • Main cluster dependencies
          • Customizable options
          • Migration process
            • Pre-migration
            • During migration
            • Post-migration
      • Security and compliance
        • Single sign-on (SSO)
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks
        • Bubble's security features
      • Admin and collaboration
      • Priority support
      • Billing and Payment Guideline for Dedicated Instances
  • Core Reference
    • Using the core reference
    • Bubble's Interface
      • Design tab
      • Design tab (Legacy)
      • Workflow tab
      • Data tab
      • Styles tab
      • Styles tab (Legacy)
      • Plugins tab
      • Settings tab
      • Logs tab
      • Template tab
      • Toolbar
      • Top and context menu options
      • Deployment and version control
        • Deployment & Version Control Dropdown (legacy)
      • Notes
    • Elements
      • Native mobile elements
        • View element
        • List component
      • General properties
      • General properties (Legacy)
      • Styling properties
      • Styling Properties (Legacy)
      • Responsive Properties
      • Responsive Properties (Legacy)
      • Conditional formatting
      • States
      • Page Element
        • Page Element (Legacy)
      • Visual Elements
      • Containers
      • Container Layout Types
      • Containers (Legacy)
      • Input Forms
      • Reusable Elements
      • Element Templates (legacy)
    • Workflows
    • Events
      • General events
      • Element events
      • Custom events
      • Recurring event
      • Database trigger event
    • Actions
      • Account
      • Navigation
      • Data (things)
      • Email
      • Element
      • Custom
    • On-device resources
    • Data
      • Data Sources
      • Operators and comparisons
      • Search
      • Privacy
    • Styles
    • API
      • The Bubble API
        • The Data API
          • Authentication
          • Data API endpoints
          • Data API requests
        • The Workflow API
      • The API Connector
        • Authentication
        • Adding calls
    • Bubble-made Plugins
      • AddtoAny Share Buttons
      • Airtable
      • API Connector
      • Blockspring
      • Box
      • Braintree
      • Bubble App Connector
      • Chart.js
      • Circle Music Player
      • Draggable Elements
      • Dropzone
      • Facebook
      • Fitbit
      • Full Calendar
      • Google
      • Google Analytics
      • Google Optimize
      • Google Places
      • Ionic Elements
      • iTunes
      • Slidebar Menu
      • LinkedIn
      • Localize Translation
      • Mixpanel
      • Mouse & Keyboard Interactions
      • Multiselect Dropdown
      • Progress Bar
      • Rich Text Editor
      • Rich Text Editor (Legacy)
      • Screenshotlayer
      • SelectPDF
      • Slack
      • Segment
      • Slick Slideshow
      • SQL Database Connector
      • Star Rating
      • Stripe
      • Tinder-like Element
      • Twitter
      • YouTube
      • Zapier
    • Application Settings
      • App plan
      • General
      • Domain / email
      • Languages
      • SEO / metatags
      • API
      • Collaboration
      • Sub-apps
      • Versions
  • Account & Marketplace
    • Account and billing
      • Pricing and plans
        • Plans and billing
        • Billing cycle
        • FAQ: Pricing and Workload
      • Account Management
      • Building Apps for Others
      • Selling on the Marketplace
      • Plans & Billing (legacy)
    • Official Bubble Certification
      • Hiring certified developers
    • Building Plugins
      • The Plugin Editor
      • General Settings
      • Updating to Plugin API v4
      • Adding API Connections
      • Building Elements
      • Building Actions
      • Loading Data
      • Publishing and versioning
      • Github Integration
    • Building Templates
    • Application and data ownership
    • Marketplace policies
    • Bug reports
  • Vulnerability Disclosure Policy
  • Beta features
    • About the Beta features section
    • Native mobile apps
Powered by GitBook
On this page
  • Trigger a custom event
  • Custom event
  • Workflow parameters
  • Trigger a custom event when data changes
  • Custom event
  • Parameter
  • Field
  • Schedule a custom event
  • Custom event
  • Workflow parameters
  • Delay
  • Trigger a custom event from a reusable element
  • Reusable element
  • Custom event
  • Workflow parameters
  • Return data
  • Return value
  • Schedule API Workflow
  • API Workflow
  • Scheduled date
  • Ignore privacy rules when running the workflow
  • Workflow parameters
  • Schedule API Workflow on a list
  • Type of things
  • List to run on
  • API Workflow
  • Scheduled date
  • Interval (seconds)
  • Ignore privacy rules when running the workflow
  • Workflow parameters
  • Cancel a scheduled API Workflow
  • Scheduled API ID
  • Cancel a list of scheduled API Workflows
  • List of scheduled API IDs
  • Set/cancel a recurring event
  • Recurring event
  • Workflow thing
  • Frequency
  • Start date

Was this helpful?

  1. Core Reference
  2. Actions

Custom

Actions that trigger, schedule and cancel custom events and API workflows.

Last updated 11 months ago

Was this helpful?

This core reference entry is suited for intermediate-level builders.

To learn about this topic more in-depth, we recommend reading the suggested articles below:

Custom events

  • Article:


API Workflows

The below article series covers the more advanced API workflow capabilities that Bubble offers. These can be used to schedule server-side operations that run regardless of whether the user still has the page open. They can also be set up to be triggered from the outside, such as from another app.

  • Article series:


Workflows

  • Article series:

    • Article:

    • Article:


Logic

Workflows is a part of the Logic series in the user manual.

  • Article series:

    • Article:

    • Article: Dynamic expressions are used both to set up conditions, and are highly useful in different actions that you may want to add to your workflows.

    • Article: Conditions are used to determine whether a workflow or action should run or not, by checking whether something is true.

    • Article series: Using workflows to let the user navigate between pages and page sections.


Debugging

All apps have the occasional bug, and our debugging tools help you squish them efficiently. The debugger helps you go through workflows step by step to see how they perform and the values they return.

This core reference entry covers how you trigger, schedule and cancel custom events. For more information on how to create custom events, see the entry below.

Reference: |

Trigger a custom event

This action triggers a custom event, which should be defined on the page already. These events are a way to share workflows/actions between the different workflows of the page.

Custom event

Select the custom event to trigger.

Workflow parameters

These are the parameters defined at the Custom Event level.

Trigger a custom event when data changes

This action:

  1. Looks for a change in a specific field of a given data type

  2. Triggers a custom event once when that change occurs

The action relies on the parameter set in the Custom Event that is triggered when something changes to define the data type. For instance, if the Custom Event has a parameter set to the User type, this action can be employed to execute when a particular user's data is updated.

Keep in mind that:

  • The event will only trigger for as long as the page remains open and must be called again if it's closed

  • The event will only trigger once for each call of the action

Custom event

Select the custom event to trigger when the thing changes.

Parameter

This is the thing to watch for changes. It must be the same type as the parameter of the custom event that will be triggered, and the thing will be sent to the custom workflow. In other words, if the custom event expects a user, this field must be a user, and the custom workflow runs with that user when it changes.

Field

This is the field we are watching for changes. For example, if the workflow thing is the 'Current user,' and the field is the 'Name,' then if someone changes the 'Current user's name' from Bob to Barbara, the custom event is triggered.

Schedule a custom event

This action runs the selected custom workflow at a set time in the future. If the user changes the page before the workflow is scheduled to run, it will not happen. Unlike 'Trigger a custom event,' workflows run by this action run independently from and possibly in parallel with the workflow that initiated it.

Custom event

This is the event that is triggered.

Workflow parameters

These are the parameters defined at the Custom Event level.

Delay

Enter the time in seconds to wait before running the custom workflow. Fractional times are accepted.

Trigger a custom event from a reusable element

This action triggers a custom event that belongs to a reusable element. These events are a way to share workflows/actions between the different pages and reusable elements of the app. Defining them in a reusable element is a way to build a library of workflows.

Reusable element

Choose the reusable element to use in the custom workflow.

Custom event

Choose the custom event to trigger. Only custom events from the selected reusable element will appear.

Workflow parameters

These are the parameters defined at the Custom Event level.

Return data

This action allows you to use return values within a custom event workflow and pass them back to the workflow that triggered the custom event.

  • If the custom event’s return value is not optional, at least one return data action without a condition is required.

  • When Bubble encounters a valid return data action, the workflow stops and returns the value immediately.

Return value

This is what you will return for any return values set for the custom event. It must be the same type as what you set as the return value’s type. This value will then be accessible in other workflows as the result of the custom event when triggered.

Schedule API Workflow

This action allows you to schedule an API workflow at any point in the future, by selecting the workflow and assigning a time. If you want to run the workflow immediately, you can use the :current date/time operator.

API Workflow

Select the API workflow to run. These are the workflows defined in the Backend workflows page found in the Application Menu above the Palette. If the workflow takes parameters, they are displayed in the Property Editor.

Scheduled date

Define the date for the workflow execution. Use the expression Composer to define a dynamic date.

Ignore privacy rules when running the workflow

A scheduled workflow runs in the context of the current user when it is scheduled. All privacy rules apply to that user. To bypass these rules and run as an admin user who has all rights to the data, check this box.

Warning: Because these are security and privacy options, use this feature with caution.

Workflow parameters

These are the parameters defined at the API Workflow level.

Schedule API Workflow on a list

This action allows you to schedule the run of an API workflow at a later time, on a list of things. This is useful to iterate on a list of things. Each workflow runs on a single item in the list and each counts as one workflow run.

Type of things

Select the type of things to iterate on.

List to run on

Define the list to iterate on. It can be the result of a search, an API call, etc. Note: the list is defined and evaluated at scheduling time. In other words, if a thing matches the search constraints when the scheduling happens and subsequently gets modified in a way that it doesn't anymore, the API workflow will still run on it.

API Workflow

Select the API workflow to run. These are the workflows defined in the Backend workflows page found in the Application Menu above the Palette. If the workflow takes parameters, they are displayed in the Property Editor.

Scheduled date

Define the date for the workflow execution. Use the expression Composer to define a dynamic date.

Interval (seconds)

The interval instructs Bubble to schedule the workflows with a defined gap.

  • Empty interval: the default empty state (not zero, but empty) interval for Schedule API Workflow on a list will schedule the workflows with a slight gap in order to balance the need to complete jobs as quickly as possible with allowing other workflows in your app to run simultaneously. The entire batch does not need to finish before other scheduled API workflows can run, but for large lists it may take some time to finish.

  • 0 seconds: setting the interval to 0 is technically possible, but it has the drawback of blocking other scheduled workflows until the entire batch is completed. To avoid this bottleneck and allow for smoother processing of scheduled tasks, it's often more effective to leave the interval at its default setting. This approach helps in managing the execution flow more efficiently, ensuring that all scheduled workflows are processed without significant delay.

  • Third-party rate limits: please note that while an interval is no longer needed to protect the performance of your Bubble app, there are some cases where it may be useful. For example, if your workflows are interacting with external APIs with restrictive rate limits, you may use the scheduling interval to slow down execution and avoid HTTP 429 Error responses.

  • Workflows still run in parallel: Keep in mind that adding an interval does not guarantee that the workflows will not overlap – if you need to force API workflows to run sequentially, you can consider using .

Ignore privacy rules when running the workflow

A scheduled workflow runs in the context of the current user when it is scheduled. All privacy rules apply to that user. To bypass these rules and run as an admin user who has all rights to the data, check this box.

Warning: Because these are security and privacy options, use this feature with caution.

Workflow parameters

These are the parameters defined at the API Workflow level.

Cancel a scheduled API Workflow

This action cancels a scheduled workflow. The workflow is identified by the number returned by the scheduling action.

Scheduled API ID

Enter the ID, which will most likely be an expression, that contains the ID of the scheduled workflow to cancel.

Cancel a list of scheduled API Workflows

This action cancels a list of scheduled workflows. The workflows are identified by the number returned by the scheduling action.

List of scheduled API IDs

Define the expression that will return the dynamic list of IDs, which should be a list of texts.

Set/cancel a recurring event

This action schedules or cancels a recurring workflow on a thing. This is useful if you want to run something daily, monthly, etc. Only one recurring event can be used per database thing. A frequency of None cancels a recurring event.

Recurring event

Select the event to run periodically or cancel. These events should be defined in the API Workflow page found in the Application Menu above the Palette.

Workflow thing

Each recurring workflow should have a thing attached to it. This thing should be of the same type as the recurring event.

Frequency

Select the frequency to apply to the recurring workflow. Choose from None, Weekly, Monthly, Quarterly, and Yearly. A frequency of None cancels a recurring event.

Start date

Select the date to start the recurring event. When running this action on a thing that has already been scheduled, the start date has to be after the original next run date. If not, it will be pushed back by another period.

Article series:

Bubble Academy: Bubble Academy: Getting started with Bubble:

This action supports lists up to roughly 100,000 records. See our for more details.

Hard limits: keep in mind the hard limits on the lengths of lists that can be scheduled. You can read more about this in the article.

The frequency at which you can trigger recurring workflows may differ based which plan your app is on. Please see the for up-do-date information.

Debugging your application
The Workflow Tab: Bubble Introduction Series [4/10]
Understanding Workflow Execution Rules
Workflows and logic: Getting started with Bubble
Custom events
The Workflow API
Workflows
Events
Actions
Logic
The frontend and backend
Dynamic expressions
Conditions
Navigation
Events
Custom events
hard limits article
hard limits
Pricing page