Link Search Menu Expand Document
Table of contents
  1. Flow - drtitlematch
    1. Description
    2. Variables
      1. Used
      2. Created
    3. Termination
    4. Flow
    5. Scripting
      1. Sample Code (AppleScript)
      2. URL
    6. Notes

Flow - drtitlematch

Description

Searches draft titles for the text passed in via query, and returns the first match (based on recency of change).

The title search is not a contains search, but rather a begins with search, so you must match from the start of the title.

When the draft is identified, the flow passes on the UUID of the matched draft to another flow, to open it in Drafts.

Variables

Used

The following variables can be passed in and will be processed by the flow.

Variable Description
query The text to match against the start of a title.

Created

The following variables are set-up by the flow.

Variable Description
NotificationTitle The title to be shown in any completion notification.
NotificationMessage The message to be shown in any completion notification.

Termination

Flow

drtitlematch

Scripting

Sample Code (AppleScript)

tell application id "com.runningwithcrayons.Alfred" to run trigger "drtitlematch" in workflow "com.thoughtasylum.doctordrafts" with argument "Some Title"

URL

alfred://runtrigger/com.thoughtasylum.doctordrafts/drtitlematch/?argument=Some%20Title

Notes

  • The title search is case insensitive.
  • The search results are returned in last updated order, such that if you have search for “# Foo” and have two draft titles that begin with this, then the one that was most recently updated will be the one that is opened.
  • If no match is found, an error will be displayed in Drafts:
    • URL Error, Draft not found for UUID or title.