Action Step: Run Workflow

The "Run Workflow" action step provides easy integration with Workflow, a powerful drag and drop automation app for iOS. Workflows can be triggered from Drafts in a number of different ways, including use the "Share" action with Workflow's iOS Share extension, or via custom configured Drafts URL action steps.

The "Share" option is great but requires several taps to fire a workflow–first selecting "Share" to show the iOS system share sheet, then the "Run Workflow" action extension, then the workflow you want to run.

URL action offer more configurability, but can be complicated for the novice user to configure.

Enter the "Run Workflow" action step. Simply create an action with a Run Workflow step, enter the name of the workflow you want to run, and you have a quick shortcut to pass the text of a draft into a workflow with a single tap.

The following values can be configured on a Run Workflow step:

Workflow: The name of a workflow setup in your Workflow app.

Input Template: Defaults to "[[draft]]" to pass the contents of the current draft, but can be configured with additional template text and Drafts' tags to alter the text passed.

Return to Drafts: If ON, Drafts will request Workflow return to Drafts when the workflow is complete by included the x-callback-url "x-success" parameter. Note there are some possible workflows which will override this value. If OFF, after the workflow is complete you will not be returned to Drafts automatically.

Under the hood, the Run Workflow step will build and open the x-callback-url URL needed to pass the text into Workflow and run the desired workflow.

Adding Run Workflow actions

Run Workflow steps can be manually added and configured in the Drafts action editor, but Workflow also provides integration to create Run Workflow actions directly from Workflow. If you have created a workflow you want to add to your action list in Drafts, open the workflow settings in Workflow, and tap the "Add to Drafts" option. This will open Drafts and create an action with a single Run Workflow step preconfigured to run the workflow with the text of the current draft.

If you create the workflow action using the "Add to Drafts" feature, an additional Workflow identifier is also stored with the action, so that even if the workflow is renamed in the Workflow app, the link will be maintained.

Comments

It is available in the specific workflow that you have created/used when you are adding actions etc. you can click on gear icon and add it there. Open the "make Pdf" workflow as that is used in the example above.