# Actions

An *action* is a block of one or more logical operations. Actions are the primary mechanism for building logic in Appfarm Create — they are used in [apps](/reference/apps.md), [flows](/reference/flows.md), and [services](/reference/services.md) to manipulate data, call external systems, and control application behavior.

An action is composed of [action nodes](/library/action-nodes.md), which are pre-built logic blocks that you configure and arrange in sequence. As the action runs, its nodes execute from top to bottom. The library of action nodes includes [if statements](/library/action-nodes/if.md), [foreach loops](/library/action-nodes/foreach.md), [data operations](/library/action-nodes/create-object.md), and advanced functionality such as [generating PDFs](/library/action-nodes/generate-document.md) and [sending SMS](/library/action-nodes/send-sms.md).

{% content-ref url="/spaces/-MiLU-xcHu0eLZiTxcmZ/pages/U2ra9tx2d1waucT4UslR" %}
[Action nodes](/library/action-nodes.md)
{% endcontent-ref %}

## Triggers

How an action is triggered depends on the context it belongs to.

**In apps,** actions are typically triggered by user behavior via an [event handler](/reference/platform-concepts/event-handlers.md), such as **On Click**. Actions can also be triggered on app load using the [On App Load](/reference/apps/app-settings.md#event-handlers) event handler, or automatically on a schedule using [timers](/reference/apps/app-settings.md#timers).

**In flows,** an action can be run from an app or another flow using the [Run flow](/library/action-nodes/run-flow.md) action node.

**In services,** an action is triggered by specifying it as the process action on an [endpoint](/reference/services/service-endpoints.md). Endpoints can be called by external systems, by a [schedule](/reference/operations/schedules.md), or from within the solution using [Run Service](/library/action-nodes/run-service.md).

In all three contexts, an action can call another action using [Run action](/library/action-nodes/run-action.md).

### Action data

An action can define its own data — inputs it accepts, outputs it produces, variables it uses during execution, and data sources it operates on. These are scoped to the action and discarded when it completes.

{% content-ref url="/spaces/-MiLU-xcHu0eLZiTxcmZ/pages/sqqM91DpBrM6WAWlgmMv" %}
[Action Data Sources](/reference/actions/action-data-sources.md)
{% endcontent-ref %}

{% content-ref url="/spaces/-MiLU-xcHu0eLZiTxcmZ/pages/y6tchXYcuia7VpcQhCKU" %}
[Action Variables](/reference/actions/action-variables.md)
{% endcontent-ref %}

{% content-ref url="/spaces/-MiLU-xcHu0eLZiTxcmZ/pages/mMnK8EqNHjP5j8ZnguoA" %}
[Action Params](/reference/actions/action-params.md)
{% endcontent-ref %}

## Debugging

Actions in apps are listed in [Developer tools for Apps](/reference/appfarm-client/developer-tools-for-apps.md#actions), which provides an overview of action execution and supports breakpoints for step-by-step debugging. Actions in services can be inspected using [Developer tools for Services](/reference/appfarm-client/developer-tools-for-services.md).

The [Log to Console](/library/action-nodes/log-to-console.md) action node can be used to print data to the logs, and `console.log` statements in [functions](/reference/platform-concepts/functions.md) are also output. Action nodes that lack values for required properties are highlighted with a red indicator in the action editor, and [App Health](/reference/apps/app-health.md) surfaces these as warnings.

## Properties

{% hint style="success" %}
**Best practice**

Use a verb when naming an action, for example `Save event`. This provides a quick description of what the action does. By including the object class *event*, it's easy to filter on actions which affect a specific object class.

Another alternative is to use the object class as a prefix, for example `Event: Save`. Since the list of actions is sorted alphabetically, this has the benefit of listing all *Event*-related actions together.
{% endhint %}

<table><thead><tr><th width="225">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>A descriptive name.</td></tr><tr><td><strong>Description</strong></td><td>A longer description of the action. For your own reference.</td></tr><tr><td><strong>Pause Render</strong></td><td><p><em>Apps only.</em> Pause UI updates while the action is running.</p><p>By default, when an action is triggered from the UI, for example by clicking a button, any UI changes triggered by the action will run as they occur. This can result in a poor user experience, or degraded performance. By enabling pause render, any UI changes will not occur until the action has finished running.</p></td></tr><tr><td><strong>Skip Render</strong></td><td><p><em>Apps only.</em> Do not update the UI after the action is finished. See <strong>Pause Render</strong>.</p><p>As an example, say you have enabled skip render and are displaying an App Variable with the value <code>1</code>. If the action updates the value to <code>100</code>, the UI will continue to display <code>1</code> even after the action has finished running.</p></td></tr><tr><td><strong>Parallel Execution</strong></td><td><em>Apps only.</em> Allow the action to fire multiple times in parallel. By default, an action will not run if the same action is already running for that user, which prevents accidental double execution. Only enable parallel execution on simple actions without heavy data processing — a common case is using <strong>On Hover Start</strong> and <strong>On Hover End</strong> to set a runtime boolean.</td></tr><tr><td><strong>Private</strong></td><td><em>Flows only.</em> Set the action to only be available from other actions in the same flow.</td></tr><tr><td><strong>Override Permissions</strong></td><td><em>Flows only.</em> Set permissions for which Roles should be allowed to execute this Action, overriding the permissions inherited from the flow.</td></tr><tr><td><strong>Action Params</strong></td><td>Add <a href="/spaces/-MiLU-xcHu0eLZiTxcmZ/pages/mMnK8EqNHjP5j8ZnguoA">action params</a>.</td></tr></tbody></table>


---

# 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.appfarm.io/reference/actions.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.
