# UI Bakery Automations

**UI Bakery Automations** enable you to build and run *complex server-side workflows* based on one or multiple data sources such as SQL databases, HTTP APIs, and others. You can run these workflows through *webhooks* or on a scheduled basis, like *cron jobs*. \
UI Bakery Automations run on the server in the **Node.js** environment.

{% hint style="info" %}
If you need to use a *Node.js npm* library on the **client side** (in the app’s browser environment), see [External JS libraries](/how-tos/data/connect-external-js-library.md#external-third-party-js-libraries).
{% endhint %}

## Use cases

You can create multi-step workflows based on your data sources for a variety of purposes. These may include simple ETL operations, alerting, data source synchronization, and others.

By using data from different sources (SQL databases, HTTP APIs, Google Spreadsheets, CRMs, and other integrations) in a single workflow, you can apply conditional logic, loops, and asynchronous operations to implement more complex scenarios.

## Triggering Automations

UI Bakery Automations allow you to run workflows:

* **at specific times** (like cron jobs)
* **by triggering webhooks**

Automations can also be integrated with third-party systems using secured token-based webhooks allowing you to further extend their functionalities.

### How to call automations from a project

In most cases, you don’t need to call automations directly from a project, instead, use [server actions](/concepts/actions/server-actions.md).

However, if in your specific scenario you need to do that, use an **HTTP API** action step. \
First, you need to copy the **webhook** link of your automation.

{% hint style="info" %}
Make sure to select the *specific environment* you need - dev, staging, or prod.
{% endhint %}

<figure><img src="/files/PPKqVHVzqQbnfK0Iific" alt=""><figcaption></figcaption></figure>

Then, in the HTTP Action step, you need to click the *Import as CURL* button and paste the copied link.

<figure><img src="/files/D1t9tY310PV2t3KKQjBf" alt=""><figcaption></figcaption></figure>

## Error Notifications

In the Automations interface, you have the option to configure *email error notifications*. Upon an error, the system sends automated emails to the Admin email addresses configured within your UI Bakery account.

### Notifications frequency

In the event of continuous errors, the system is designed to send follow-up emails at specified intervals. The default interval is sending new emails *every hour* after each failure. This interval helps to avoid cluttering your inbox while still keeping you informed if the issue persists.

## Troubleshooting Automations (self-hosted version)

If you have any automations that are not running via cron/webhook but can be executed manually, we recommend extending the following *environment variables*:

* `UI_BAKERY_AUTOMATION_TIMEOUT=90000`- the default timeout for the automation execution;
* `UI_BAKERY_AUTOMATION_CODE_EXECUTION_TIMEOUT=30000` - the default timeout for JS execution in an automation;
* `UI_BAKERY_DATASOURCE_TIMEOUT=90000` - the default timeout for a data source request.

If this doesn't help, please get in touch with the [UI Bakery support team](mailto:support@uibakery.io).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uibakery.io/extras/automations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
