Link Search Menu Expand Document
Table of contents
  1. Scratch Pad
    1. Description
    2. Flow
    3. Building the Flow

Scratch Pad

Description

This use case is built around the idea of having a single draft that you use as a general scratch pad. While some people use multiple drafts as a scratch pad, other prefer the idea of having a single draft that is updated. This use case looks at putting in place a keyword driven flow that allows a piece of text to be prepended to a particular draft.

This means that the draft will have an ever changing title, but it will keep the latest addition at the top of the draft. We’ll also cover what to do if you wanted to build one that appends to the end of the draft.

Flow

The flow to do this consists of just three sequential blocks.

scratchpad - flow

Building the Flow

The first block is an Inputs > Keyword block, and just sets up the keyword we want to use, in this case drscratch 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 be prepended to the scratch pad draft.

scratchpad - 01

The next block is a Utilities > Args and Vars block. This passes through the {query} untouched to the final block, but we are specifying the UUID variable to be the UUID of the draft we want to use as a scratch pad. You can copy the UUID of a draft in Drafts by right cliicking on the draft in the left selection panel, and selecting Copy > UUID.

scratchpad - 02

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 drprepend trigger ID from Doctor Drafts.

scratchpad - 03

If you take a look at the Flow - drprepend 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.

If you wanted to append instead of prepend content to the scratch pad draft, because drappend is fundamentally so similar, you can simply just replace the trigger ID and it will change the behaviour accordingly.