Forest Admin Cloud
Ask or search…
K

Actions

Forest Admin's Action feature empowers users to trigger HTTP API calls, encapsulating custom business logic or initiating workflows on third-party tools such as Make, n8n, Zapier, and others via Webhook URLs. Actions play a pivotal role in the admin panel, allowing users to implement specific business workflows.
Actions are typically represented by buttons and are associated with a specific collection in the admin panel. This association ensures that actions are contextually relevant to the data being managed within that collection.
Most actions can be created directly from the UI, offering a straightforward and quick approach without requiring access to your project's code or advanced development skills.
However, for more advanced actions that leverage additional options, refer to the Code Customization section to discover the full range of possibilities.

Creating an Action

To create an action, enable the Layout Editor mode, access the collection settings and then the Actions tab. There, you'll be able to create your first action on a collection.

Scope

A scope refers to the targeted range of records when triggering an action. There are 3 types of scopes:
  1. 1.
    Single: Enables you to execute an action on a single, specifically chosen record.
  2. 2.
    Bulk: Empowers you to trigger the action on multiple selected records simultaneously.
  3. 3.
    Global: Allows you to initiate the action at the collection level without the need to select individual records.
Choose the appropriate scope based on your operational needs, whether focusing on a single record, managing multiple records in bulk, or applying actions universally at the collection level.

Update record

The simplest yet frequently encountered use case involves creating an action that straightforwardly updates specific fields. For instance, in the following example, the action is configured to effortlessly to ban a user by setting the field is blocked to true.

API call

For more advanced and flexible actions, users can opt for triggering an HTTP call that connects to their API backend. Alternatively, they can leverage the versatility of third-party tools like Zapier, Make, n8n, or others by utilizing Webhook URLs. This approach broadens the scope of actions, enabling seamless integration with external systems and offering a sophisticated solution for diverse business logic and workflow requirements.

Types

After having created the action, Forest Admin allows users to categorize actions into different types, each associated with a distinct button color. The available types include default, info, success, warning, danger, and neutral. By selecting a specific type during the action creation process, users can customize the appearance of the action button to match the desired color scheme. This feature enhances the visual representation of actions, providing an intuitive way for users to identify and differentiate actions based on their purpose or significance.

Permissions

In the Roles & Permissions module, administrators can fine-tune access controls for actions. This allows precise control over which users or roles possess the authority to execute specific actions. For more detailed information on setting up permissions, please refer to the Roles & Permissions module.

Conditions

Actions can be configured to be available only under certain conditions. This flexibility enables the customization of action availability based on data context, contributing to a more controlled and secure environment.
Specifically, to implement conditions, you need to create a segment containing relevant filters. After creating your action, make this action available only on this segment by selecting the segment in the field Only usable in the following segments. This approach allows for a tailored and contextualized deployment of actions, ensuring they are accessible only where and when needed.

Approval Workflows

Users can trigger actions, but execution requires validation from another authorized user. This two-step process ensures that critical actions are reviewed before implementation. For a more comprehensive understanding of the approval workflow setup and management, please consult the Approval Workflows module.
In summary, Forest Admin's Action feature is a powerful tool for executing custom business logic and triggering workflows. By associating actions with collections, setting permissions and conditions, and implementing the Approval Workflow, users can efficiently manage and secure their admin panel operations.
Last modified 5d ago