> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Base44 workflows: Legacy automations (mobile apps that predate workflows)

> source commit is in /SOURCE_COMMIT at the repository root. Edits here are overwritten by

> [!WARNING]
>
> This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the [developer documentation](https://docs.base44.com/developers).

# Base44 workflows: Legacy automations (mobile apps that predate workflows)

\<automations\_capability>
You can manage automations to run backend functions automatically - on a schedule, when entity records change, when external services send webhook events, or when app users start in-app agent conversations.
Legacy automations are being retired: new ones can't be created, existing ones can still be edited, paused or deleted. When the user asks for a new automation, schedule or trigger, tell them to migrate the app with "Switch to Workflows" on its Automations page.

\<user\_timezone>
Times the user mentions are local to them — ask for their timezone when it is unknown.

IMPORTANT: When the user mentions times (e.g., "9am", "2pm", "midnight"), they mean times in THEIR timezone.

* All times you provide (one\_time\_date, ends\_on\_date, start\_time) should be in the user's local time - they will be automatically converted to UTC.
* For cron\_expression: Times in cron are in UTC, so you need to calculate the UTC equivalent based on the user's timezone.
  \</user\_timezone>

\<managing\_automations>
Automations are not files: update, toggle and delete the existing ones in the dashboard (Automations); new ones can't be created. A new schedule or trigger means migrating the app with "Switch to Workflows" on its Automations page, after which the `base44-platform-workflows` skill's workflows reference applies. The parameters below are the ones the dashboard accepts, named as the Base44 builder passes them.
\</managing\_automations>

\<automation\_types>
**Scheduled Automations (automation\_type="scheduled"):**
Run a function on a schedule.

Simple schedules (schedule\_type="simple"):

* Every 5 minutes: repeat\_interval=5, repeat\_unit="minutes" (minimum is 5 minutes)
* Hourly: repeat\_interval=1, repeat\_unit="hours"
* Daily at specific time: repeat\_interval=1, repeat\_unit="days", start\_time="09:00"
* Weekly on specific days: repeat\_unit="weeks", repeat\_on\_days=\[1, 5], start\_time="10:00" (0=Sunday, 6=Saturday)
* Monthly on specific day: repeat\_unit="months", repeat\_on\_day\_of\_month=15, start\_time="00:00"

Cron schedules (schedule\_type="cron"):

* Use standard cron: "minute hour day-of-month month day-of-week"
* Example: "\*/5 \* \* \* \*" = every 5 minutes (minimum interval is 5 minutes)
* Example: "0 9 \* \* 1-5" = 9am every weekday

One-time schedules (schedule\_mode="one-time"):

* Run once: one\_time\_date="2024-01-15T10:00:00"

End conditions:

* ends\_type="never": Run indefinitely (default)
* ends\_type="on": Run until a date (ends\_on\_date="2024-12-31T23:59:59")
* ends\_type="after": Run N times (ends\_after\_count=10)

**Entity Automations (automation\_type="entity"):**
Run a function when entity records are created, updated, or deleted.

Required: entity\_name, event\_types (array of: "create", "update", "delete")

The function receives a payload with:

* event: \{ type, entity\_name, entity\_id }
* data: current entity data (null if payload\_too\_large is true)
* old\_data: previous data (only for "update" events, null if payload\_too\_large is true)
* changed\_fields: array of top-level field names that changed between old\_data and data (e.g. \["status", "amount"])
* payload\_too\_large: true if entity data exceeded 200KB and was omitted. Use Base44 SDK to fetch: `await base44.asServiceRole.entities[event.entity_name].get(event.entity_id)`

Optional: trigger\_conditions — pre-filter which entity events actually trigger execution.
Use when the user only wants to act on specific changes (e.g., only when status becomes "completed", or only when a specific field changed).

Entity conditions evaluate against a wrapped object (this wrapping applies ONLY to entity automations, NOT connector automations):
\{
"data": \{ ...current entity fields... },
"old\_data": \{ ...previous entity fields (update events only)... },
"changed\_fields": \["field1", "field2", ...]
}

Field paths MUST use the wrapping key as prefix:

* "data.\<field>" — current entity value (e.g. "data.status")
* "old\_data.\<field>" — previous value before the update (e.g. "old\_data.status")
* "changed\_fields" — the list itself; use "contains" operator to check if a field changed

Example — only fire when status changes to "completed":
trigger\_conditions=\{
"logic": "and",
"conditions": \[
\{"field": "changed\_fields", "operator": "contains", "value": "status"},
\{"field": "data.status", "operator": "equals", "value": "completed"}
]
}

**In-App Agent Automations (automation\_type="in\_app\_agent"):**
Run a function when an app user starts a new conversation with an in-app agent.

Fields: function\_name, agent\_name (exact configured agent name; pass "" to clear a specific agent and watch all), event\_types (array; currently only "conversation\_started")

The function receives a payload with:

* automation: \{ id, type, name }
* event: \{ type, agent\_name, conversation\_id, message\_id, channel }
* message: \{ text, has\_files }
* app\_user: \{ id }
* payload\_too\_large: true if the message text was omitted because it was too large

**Connector Automations (automation\_type="connector"):**
Run a function when a connected external service sends a webhook event (e.g., new calendar event, Google Drive file change).

Fields: integration\_type (e.g., "googlecalendar", "googledrive"), events (array of event names), function\_name

Each provider has a different payload structure and auth model. Always read the provider's own webhook documentation for its payload and auth model (`list_connectors` gives the integration type, scopes and connection state, not a handler guide) BEFORE editing the handler function.

Optional: trigger\_conditions — pre-filter which webhook events actually trigger execution.
Use when the user only wants to act on a subset of events (e.g., a specific Slack channel, a specific Drive folder).

trigger\_conditions format:
\{
"logic": "and",
"conditions": \[
\{"field": "\<dot.path>", "operator": "\<op>", "value": "\<target>"}
]
}

* "field": dot-path into the provider's RAW webhook payload. Do NOT prefix with "data." — unlike entity conditions, connector conditions evaluate directly against the webhook payload as received from the provider.
  For example, for Slack: "event.channel", "event.text", "event.user" (NOT "data.event.channel").
  You MUST know the provider's webhook payload structure — consult the provider's public API docs to determine the correct field paths.
* "operator": equals | not\_equals | gt | gte | lt | lte | contains | not\_contains | starts\_with | ends\_with | in\_list | not\_in\_list | exists | not\_exists | is\_empty | is\_not\_empty
* "value": the concrete value to match. When the user provides a human-readable name but the webhook payload carries an internal ID, resolve the name first: create a temporary backend function that uses the authorized connector to look up the ID, invoke it, then use the returned ID as the condition value. Never guess IDs.
  \</automation\_types>

\<usage\_guidelines>

1. Find existing automations and their IDs in the dashboard (Automations)
2. Pause/resume automations from the dashboard
3. Minimum interval for scheduled automations is 5 minutes
   \</usage\_guidelines>

\</automations\_capability>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.