# Actions

An **action** is an operation with an effect — tagging an order, sending an email, uploading a file to FTP, or calling an external API. Tasks produce actions by rendering action definitions in Liquid, which means a single task can dynamically generate any number of actions based on the data it processes.

Actions run after the task code completes. Each action has a **type** (specifying the operation) and **options** (providing specifics). Action definitions can be constructed using the [**action tag**](https://learn.mechanic.dev/platform/liquid/tags/action) or as raw [**action objects**](https://learn.mechanic.dev/core/tasks/code/action-objects) in JSON.

{% hint style="info" %}
In Mechanic, actions are performed after their originating task run concludes. Actions are not performed inline during the task's Liquid rendering.

To inspect and respond to the results of an HTTP action, add a task subscription to mechanic/actions/perform, allowing the action to re-invoke the task with the action result data.

If you don't need the follow-up event for a particular action, add `__perform_event: false` to that action to skip emitting mechanic/actions/perform while still performing the action.

To attach meta while using any of the action tag syntaxes, add `__meta` and Mechanic will move that value into the action's meta field.

Learn more: [Responding to action results](https://learn.mechanic.dev/techniques/responding-to-action-results)
{% endhint %}

## Action types

An **action type** determines the class of operation to be performed. While actions may vary greatly, there are only a few action types. Shopify is treated as a first-class action because it's the primary API Mechanic automates against.

| Action                                                     | Purpose                                                                                              |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [Cache](https://learn.mechanic.dev/core/actions/cache)     | Performing operations on the store's Mechanic cache                                                  |
| [Echo](https://learn.mechanic.dev/core/actions/echo)       | Debugging; displays the options that it is provided, with no side-effects                            |
| [Email](https://learn.mechanic.dev/core/actions/email)     | Sending transactional email                                                                          |
| [Event](https://learn.mechanic.dev/core/actions/event)     | Generating custom events in the [User event domain](https://learn.mechanic.dev/events/topics-1#user) |
| [Files](https://learn.mechanic.dev/core/actions/files)     | Generating files of various types, storing them at a temporary Mechanic-provided URL                 |
| [FTP](https://learn.mechanic.dev/core/actions/ftp)         | Performing FTP file uploads and downloads                                                            |
| [HTTP](https://learn.mechanic.dev/core/actions/http)       | Performing HTTP requests                                                                             |
| [Shopify](https://learn.mechanic.dev/core/actions/shopify) | Sending requests to the Shopify Admin API                                                            |

### Integrations

Mechanic also maintains a set of integration actions for third-party services beyond Shopify.

| Action                                                                                | Integrated service               | Purpose                                                                        |
| ------------------------------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------ |
| [Airtable](https://learn.mechanic.dev/core/actions/integrations/airtable)             | Airtable                         | Create and edit tables and records in Airtable                                 |
| [Flow](https://learn.mechanic.dev/core/actions/integrations/flow)                     | Shopify Flow                     | Sending customer, order, product, and general triggers to Shopify Flow         |
| [Google](https://learn.mechanic.dev/core/actions/integrations/google)                 | Google (Drive and Google Sheets) | Advanced integration with the Google Drive and Sheets APIs                     |
| [Google Drive](https://learn.mechanic.dev/core/actions/integrations/google-drive)     | Google Drive                     | Upload files to Google Drive                                                   |
| [Google Sheets](https://learn.mechanic.dev/core/actions/integrations/google-sheets)   | Google Sheets                    | Create, Update, Export Google Sheets                                           |
| [Report Toaster](https://learn.mechanic.dev/core/actions/integrations/report-toaster) | Report Toaster                   | Requesting reports from Report Toaster, or updating data within Report Toaster |
| [Slack](https://learn.mechanic.dev/core/actions/integrations/slack)                   | Slack                            | Posting messages to Slack                                                      |
