Introduction to Actions

Unlock the power of actions in Glide.

A useful way to think about apps is through the way users interact with them. Two very basic levels of interaction are viewing and editing data. But often, apps need to be able to perform actions.

For example, in this app, there is a Button which, when clicked, will take people to a website. This is because the button has the action Open Link.

An app with an Open Link action.

You may not have thought of it this way before, but opening a Form is a type of action. Open Link and Show Form Screen are examples of native Glide Actions. In other words, they trigger things that happen in your app. But you can also integrate third party Integrations like SlackOutlook, or OpenAI into Glide and trigger messages, emails, generated text, and much more.

The Action Editor

As you can see in the images above, it's possible to manually add actions to components. However, Glide also has an Action Editor that lets you save and reuse actions and combine them into more complex workflows.

Complex workflows in the action editor.

Creating Actions

Navigate to the Action Editor by clicking on the icon labeled Actions in the middle of the top bar.

The three different editor views in Glide.

If your app already has actions or you've created actions in the Layout Editor, they will automatically be listed in the left sidebar. Clicking on an action will load it in the Action Editor on the right.

To create a new action, click the plus (+) icon in the top left corner. Glide will prompt you to choose a data source table for your Action.

Creating a new action in the action editor.

Data Source

The data source you choose for an action determines which screens you can use that action on.

For instance, suppose you want to create an action where a user can tap a button on an inventory item and automatically send an email to an admin. The email should indicate that the stock level is low and include the current stock level.

For this particular action to work, it needs to know what stock item it is and the current stock level. So this action must be made with the Inventory table as the source.

This also means that this action cannot be triggered on a screen that has a different table. For example, it would not make sense to trigger this action on a Team Member’s profile.

This means that although actions are reusable, they are only reusable on screens that have the same data source.

Reusing Actions

Once you create an action, you can reuse it across your app so long as any other screen(s) where you use it share the same data source as the original action.

Reusing a saved action.

Sequences

You can have single step actions, or you can have multi-step actions. This means multiple things will happen when your action is triggered.

A sequence of actions.

To add new actions to the flow, hover just underneath an action and click the plus (+) button.

Adding an action to a sequence.

To edit actions, click on the action.

Editing an action in a sequence.

To re-order actions, click and drag the action.

Reordering an action in a sequence.

To delete actions, open the action and click the trash icon.

Deleting an action in a sequence.

Conditions

There may be times when you'll want to create multiple scenarios, where each scenario triggers a unique action depending on conditions you set. Therefore, the second dimension in building custom actions is working with Conditions. To add a condition to one of your sequences, click the plus icon at the top of a sequence.

Adding a condition in the Action Editor.

The conditions you set determine when the following action sequence will run. If the condition is not met, the action sequence won't run.

If you want the action to do something even if the condition is not met, you'll need to create an alternate action to run instead.

To do this, add an Else statement to your condition. With an else statement, if the first condition in the Action Editor is not met, the actions under the Else section will be triggered.

You can add multiple conditions to your action.

Adding multiple conditions in the Action Editor.

Types of Actions

There are two main types of actions: Integration Actions and Glide Actions.

Integration Actions

Some Integrations come with actions that you can trigger in Glide. For example, the Slack integration makes it possible for you to trigger a Slack notification from a Glide Action.

To learn more about Integrations, check out our Integrations Docs.

Glide Actions

Glide Actions are actions that affect only things within your app. Most of them don't communicate with the outside world but are still incredibly useful. Examples include adding a row, opening a link, navigating to a tab, and returning to a previous screen. Mostly, they fall into four categories:

  1. Data

  2. Navigation

  3. Communication

  4. Advanced

Data Actions use or change data. These include things like

Navigation Actions show or move users to different screens. For example:

Communication Actions trigger things like sending emails and text messages, or phone calls.

Action Locations

There are many places where you can add actions in your app.

Component actions

Some Components have actions, and some don't. If a component has the option for an action, you'll see it in the component's configuration.

For some components, like the Collection component, you can add multiple actions.

Configuring actions in a component.

Item Click Actions

The default action for clicking on a collection item is to view that item's Details Screen. This behavior is so common that you may not have thought of it as an action before.

However, you can change this to a number of other actions. For example, you could:

  • Trigger the Dial Phone Number Action when a list of contacts is tapped.

  • Change the number in the inventory when inventory items are tapped.

After Submit Actions

You can add actions that trigger when users add/edit or submit forms.

For example, you could create an action that notifies your Slack channel every time a form is submitted.

Automations

While you can create multi-step actions and set conditions within a single action, this is different from automations.

Automations are a series of interdependent actions that achieve a specific goal without requiring constant user input. For example, you might want to run an action at a specific time every night or trigger an event every time a new row is added, or when data meets a certain criteria.

View Logs

If you are having trouble with your action or want to inspect its activity, you can look at the View Logs screen in the Action Editor. You can find this by clicking on the three dots next to the next to the action title when open in the editor.

Here, you’ll see all the times your action has fired in the last 30 days and information about the run. This is currently an experimental feature, so please let us know if you encounter issues.

Have a question about Introduction to Actions? Ask the Glide community.

Updated more than a week ago
Was this article helpful?