Link Search Menu Expand Document
Table of contents
  1. New Draft With Any Tags
    1. Description
    2. Flow
    3. Building the Flow

New Draft With Any Tags

Description

This use case is based on a scenario where you might want to have a way to quickly create a new draft, while also having an option to add any tags that you may wish. This differs from the New Tagged Draft use case in that you must specify any tags to add rather than having a set of predefined tags.

When you enter the keyword drnewtagged in the Alfred launcher window, followed by the text to be the content of the new draft and then press return, the window continues to be displayed (though cleared), and allows you to enter a comma separated list of tags. Upon pressing enter the second time, the flow will create a new draft from the specified content and tags.

Flow

The flow to do this consists of five sequential blocks.

new-draft-with-any-tags - flow

Building the Flow

The first block is an Inputs > Keyword block, and sets up the keyword we want to use, in this case drnewtagged to trigger the flow. It is set to require an argument. This argument will be the text that we type after the keyword and is what will form the content of the new draft.

new-draft-with-any-tags - 01

The second block is a Utilities > Args and Vars block. It captures the argument (draft content) from the previous block and stores it in a variable called content.

new-draft-with-any-tags - 02

The third block is another Inputs > Keyword block, but it has no keyword and is only accessible stepping through this flow. It is this window through which you can capture a comma separated list of tags.

new-draft-with-any-tags - 03

The fourth block is a Utilities > Args and Vars block. It captures the argument (draft tags) from the previous block and stores it in a variable called tags. It also takes the previously captured content (variable content), and passes this on to the final block.

new-draft-with-any-tags - 04

The fifth block is an Outputs > Call External Trigger block. If you select the Workflow Triggers… button, this will allow you to select from the list of available triggers and will populate the Workflow ID and Trigger ID fields, with no risk of typos. Here we are selecting the drnew trigger ID from Doctor Drafts.

new-draft-with-any-tags - 05

If you take a look at the Flow - drnew page in the Documentation section, it explains how it works, and what variables it expects to be set. Note in the above screenshot that the Pass input as argument and Pass variables options are set. These are critical to this working correctly as that is how the tags are passed through.