Documentation

Your guide to everything Workflow.

Using workflows from the Action Extension

The Workflow Action Extension brings the power of running workflows out of Workflow itself and into other apps, extending automation capabilities to any app that has a share sheet.

With the Action Extension, you can run workflows that act on the content you’re looking at inside another app. For example, you could set up workflows to grab all the images from a page in Safari, convert a text file you’re viewing to a PDF, or make edits and act on images in your Photos library. The possibilities are endless.

Using the share sheet

In many apps, you’ll find a share button (like ) that presents a share sheet when tapped. Inside the share sheet, two rows of activites are offered: Share Extensions with colored app icons, and Action Extensions with grayscale icons.

In the second row, Workflow offers an Action Extension named “Run Workflow”. (By default, the Action Extension won’t be visible as you need to manually turn it on, as explained in the next section.) Tap it and a mini version of Workflow will appear overlaid on top of the current app. From here, you can select or search for any workflow that has been configured with the Action Extension type. Just tap a workflow to run it.

The app you’re using may also pass data into the workflow as input. For example, in Safari, the URL of the web page (or, the text you’ve selected from the page, if there is any) will be passed as input. As discussed later, workflows can be customized to only accept certain types of input.

Enabling the Workflow Action Extension

In order to use the Workflow Action Extension, you first need to enable it in an app that supports extensions.

  • Tap a share button in any app of your choosing (including Workflow itself).
  • Swipe in the second row of icons to the far right side.
  • Tap More (•••).
  • In the list of activities that appears, find “Run Workflow” and turn on the corresponding switch to enable it.

After the Workflow Action Extension has been enabled once, it will appear in the bottom row of the share sheet in all of your apps.

Setting a workflow as an Action Extension

In order to have your workflows show up in the Action Extension, they’ll need to have the Action Extension type enabled.

You can change a workflow’s type by opening it from My Workflows, tapping on the settings button in the upper right corner, and navigating to the section entitled “What type of workflow is this?”. Tap “Action Extension” to enable that type on the workflow. A new field named “Accepts” will appear underneath where you can choose the input type.

Note

Workflows can be set to multiple types, so one workflow can work in both the Action Extension and the Today Widget.

When creating a new workflow, you can quickly set the type of workflow you want to build. Select ”Action Extension”, and you’ll see a small bar appear above that says “This workflow accepts (Anything)”, which you can tap to set the workflow‘s input types.

Pro Tip

Workflows can be set to multiple types. A single workflow can be an Action Extension, Today Widget, and Apple Watch workflow if you so choose.

Choosing input types for an Action Extension workflow

In order to have an organized Action Extension, it’s helpful to specify which type of content you want an individual workflow to accept. Once you’ve set a specific type, that workflow will only be visible in the Action Extension if the app that is sharing the content provides that type of input. For example, a workflow set up to only accept contacts won’t show up when opening the extension from Maps.

The default setting is Anything, allowing a workflow to accept any type of input. However, setting a workflow to Anything may mean that the workflow is available to use even with content that won’t actually function properly in the workflow. This can lead to errors and a cluttered up Action Extension screen, making it harder to quickly find and launch the workflows you want to use. Therefore, it’s helpful to change the type of input a workflow accepts to be specific to the functionality of that workflow.

It takes some testing to determine the type of input an app will offer. Some apps share multiple types of input, like Photos, which shares both images and media. And for other apps, the shared content is less obvious. For example, if you’re in Twitter and you share a tweet that contains a photo, Twitter only sends the URL of the tweet, not the tweet text or photo.

You can preview the Action Extension input by placing a View Content Graph action at the beginning of your workflow.

See the full list of input types and their definitions in Understanding Action Extension input types, so you can be aware of the specifics when building Action Extension workflows.

Note

Similar to the Today Widget, the Action Extension has a limited amount of memory (RAM) to work with. This means that some workflows that work with large volumes of data may overload, and unfortunately crash, the Action Extension. If this happens, you can workaround it by placing a Continue in App action in your workflow, which will switch to the Workflow app and finish running your workflow there where more memory is available.


Now let’s move on to Using workflows from Apple Watch. Or, jump back to Using workflows from the Today Widget.