This use case is built around the idea that you might want to insert the content of a specific draft at the current cursor position. This is in effect like Alfred’s snippet expansion feature, or TextExpander’s snippet feature, but where the content master copy is held in Drafts.
For this use case, we are therefore going to use an Alfred snippet trigger to make this insertion as seamless as possible.
The flow to do this consists of three sequential blocks.
The first block is an
Inputs > Snippet block, and sets up the snippet keyword we want to use, in this case
mybio+; an example that you might use to insert a short biographical summary you maintain in Drafts. Once set up, when you type these characters, they will trigger this flow.
The next block is a
Utilities > Args and Vars block. It passes through the UUID of the draft that you want to insert the ccntent of. It also sets the
fetch variable to
true, which is what tells Doctor Drafts that what is being passed on is a UUID to fetch the content of.
The final step is to link 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
drpaste trigger ID from Doctor Drafts.
If you take a look at the Flow - drpaste 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.