Use this file to discover all available pages before exploring further.
You’re viewing developer documentation
This documentation is for developers working with the Base44 developer platform. For information about automations in the app editor, see Creating automations for your app.
Automations allow backend functions to run automatically on a schedule, in response to database events, or when a connected integration sends a webhook event. Use automations to process data at regular intervals, handle entity changes, react to external service events, or execute one-time tasks at specific times.Each backend function can have multiple automations attached, configured in the function’s function.jsonc file. If you only have an entry.ts or entry.js file, you’ll need to add this configuration file to use automations. Automations are deployed atomically with the function code when you run deploy or functions deploy.
Both cron and simple scheduled automations share these additional fields:
Field
Type
Required
Description
schedule_mode
string
Yes
Whether the schedule repeats. Possible values: "recurring" or "one-time".
schedule_type
string
Yes
Scheduling method to use. Possible values: "cron" or "simple".
ends_type
string
No
When the recurring schedule should stop. Possible values: "never", "on", or "after". Defaults to "never".
ends_on_date
string
Conditional
Date when the recurring schedule ends, inclusive, in UTC. Required when ends_type is "on". Format: YYYY-MM-DDTHH:MM:SSZ. For example, "2026-12-31T23:59:59Z".
ends_after_count
number
Conditional
Number of executions after which the recurring schedule stops. Required when ends_type is "after".
Configure automations in your function.jsonc file using one of the following approaches. All automations use the common fields for all automations listed above, plus the fields specific to each type.
Use common fields for all automations and common fields for scheduled automations along with the cron-specific fields listed here.Set type to "scheduled" and schedule_type to "cron" to use cron expressions for precise scheduling control.Cron automations use standard 5-field syntax: minute hour day-of-month month day-of-week. See crontab.guru for an interactive cron expression editor and syntax reference.
Use common fields for all automations and common fields for scheduled automations along with the simple schedule fields listed here.Set type to "scheduled" and schedule_type to "simple" for straightforward scheduling needs.Configure recurring tasks by interval such as minutes, hours, days, weeks, or months without writing cron expressions.
Field
Type
Required
Description
one_time_date
string
Conditional
Date and time when the automation runs once, in UTC. Required when schedule_mode is "one-time". Format: YYYY-MM-DDTHH:MM:SSZ. For example, "2026-02-15T10:00:00Z".
repeat_unit
string
Conditional
Time unit for recurring automations. Required when schedule_mode is "recurring". Possible values: "minutes", "hours", "days", "weeks", or "months".
repeat_interval
number
Conditional
Interval between executions. Required when repeat_unit is "minutes", "hours", or "days".
start_time
string
Conditional
Time of day when the automation runs, in UTC. Required when repeat_unit is "days", "weeks", or "months". Format: HH:MM.
repeat_on_days
number[]
Conditional
Days of the week when the automation runs. Required when repeat_unit is "weeks". Array of weekday numbers, where 0 is Sunday and 6 is Saturday.
repeat_on_day_of_month
number
Conditional
Day of the month when the automation runs. Required when repeat_unit is "months". Valid values: 1-31.
Use common fields for all automations along with the entity event fields listed here.Set type to "entity" to trigger functions automatically when database records are created, updated, or deleted.Entity automations can listen to 1 or more event types on a specific entity.
Field
Type
Required
Description
entity_name
string
Yes
Name of the entity to monitor.
event_types
string[]
Yes
Database events to listen for. Possible values: "create", "update", "delete". At least 1 required.
Use common fields for all automations along with the connector-specific fields listed here.Set type to "connector" to trigger functions when a connected integration sends a webhook event. Use these to react to external service activity in real time. For example, you can parse a new email, sync a calendar change, or respond to a file update in Google Drive.You can optionally add trigger conditions to filter events so your function only runs when the payload matches rules you define.When a connector automation fires, your function receives a structured webhook payload containing the event type, integration details, and the raw data from the external service.
The connector must be configured in your project and authorized before deployment. See Shared connectors for setup instructions.
Field
Type
Required
Description
integration_type
string
Yes
The connector type identifier to listen on. See supported integrations for accepted values.
events
string[]
Yes
One or more webhook event names to subscribe to. See supported integrations for available events per connector.
resource_id
string
Conditional
Scopes the automation to a specific resource. The expected format depends on the connector. See Resource ID formats below. Required for Google Drive file-scoped events. Optional for other connectors.
trigger_conditions
object
No
Rules that must match the incoming event before your function runs. If the event does not match, the run is skipped. See Trigger conditions for the full reference.
Any mailbox change, including new messages, label updates, and read status changes.
Google Calendar
googlecalendar
events
Any calendar event change, including created, updated, and deleted.
Google Drive
googledrive
changes
Any change in the drive, including files added, modified, or deleted.
Google Drive
googledrive
file
Any change to a specific file (requires resource_id).
Google Drive
googledrive
file.update
File content or properties changed (requires resource_id).
Google Drive
googledrive
file.trash
File moved to trash (requires resource_id).
Google Drive
googledrive
file.untrash
File restored from trash (requires resource_id).
Google Drive
googledrive
file.delete
File permanently deleted (requires resource_id).
Microsoft OneDrive
one_drive
updated
Any file or folder change, including created, modified, and deleted.
Microsoft Outlook
outlook
created
A new email, calendar event, or contact is created.
Microsoft Outlook
outlook
updated
An email, calendar event, or contact is updated.
Microsoft Outlook
outlook
deleted
An email, calendar event, or contact is deleted.
Microsoft SharePoint
share_point
updated
When a list item or document is created, modified, or deleted.
Microsoft Teams
microsoft_teams
created
When a new chat message is posted.
Microsoft Teams
microsoft_teams
updated
When a chat message is updated.
Microsoft Teams
microsoft_teams
deleted
When a chat message is deleted.
Slack
slack
message
When a message is posted to a channel.
Slack
slack
message.im
When a direct message is posted.
Slack
slack
message.groups
When a message is posted to a private channel.
Slack
slack
message.channels
When a message is posted to a public channel.
Slack
slack
message.mpim
When a message is posted to a multi-party IM.
Slack
slack
reaction_added
When a reaction is added to a message.
Slack
slack
reaction_removed
When a reaction is removed from a message.
Slack
slack
member_joined_channel
When a user joins a channel.
Slack
slack
member_left_channel
When a user leaves a channel.
Slack
slack
file_shared
When a file is shared.
Gmail’s mailbox event fires for any mailbox change, not just new messages. To run your function only when new emails arrive, add a trigger condition: { "field": "has_new_messages", "operator": "equals", "value": true }.
Slack connector automations require trigger conditions. Deployment will fail if no conditions are set for Slack connector automations.
Use trigger_conditions to filter webhook events so your function only runs when the payload matches rules you define. If no conditions are set, the function runs for every incoming event. See Connector automation examples for complete configurations.
When a connector automation triggers your function, the request body contains a payload object with the following structure. See Connector automation examples for a function that reads the payload.
Field
Type
Description
payload.automation.id
string
ID of the automation that triggered this run.
payload.automation.name
string
Name of the automation.
payload.automation.type
string
Always "connector".
payload.event.type
string
The webhook event name. For example, "mailbox", "events", or "changes".
payload.event.integration_type
string
The connector type. For example, "gmail" or "googlecalendar".
payload.event.provider_identifier
string
The provider account identifier used for routing.
payload.data
object
The raw webhook payload from the external service. Set to null when payload_too_large is true.
payload.payload_too_large
boolean
Is true when the webhook payload exceeded ~200 KB and data is null.
// Triggers the function whenever a new email arrives in Gmail.{ "name": "processInboundEmails", "entry": "entry.ts", "automations": [ { "type": "connector", "name": "on_new_gmail", "description": "Runs when a new email arrives in Gmail.", "is_active": true, "integration_type": "gmail", "events": ["mailbox"] } ]}
Pass data to your function when it’s triggered by including the function_args field in your automation configuration. This is useful when one function handles multiple automations with different behaviors, such as a sync function that runs incrementally every 15 minutes but does a full sync daily.Access these arguments in your function code through the request body.
Deploy backend functions with their automations using the CLI functions deploy command or the unified deploy command. You can deploy specific functions by name with functions deploy <names...>.The deployment is atomic per function. A function is only considered deployed if both the Deno deployment and all its automations succeed. If any automation fails to deploy, the entire function deployment is rolled back.After deploying, the CLI shows per-function status: deployed, unchanged, or error.
Any changes made in the dashboard will be overwritten the next time you run functions deploy. There is no two-way sync between the dashboard and your local files. Automations defined in your local function.jsonc files are the source of truth.If you want to make changes to your automations, update your local function.jsonc files and redeploy. Use the dashboard for monitoring execution logs and manually triggering automations when needed.
View and manage your automations in the Base44 dashboard under the Automations tab. From the dashboard, you can: