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

Flow - drtitle

Description

Searches draft titles for the text passed in via query, and allows the user to select a matching draft.

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

drtitle

Scripting

Sample Code (AppleScript)

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

URL

alfred://runtrigger/com.thoughtasylum.doctordrafts/drtitle/?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.
  • Holding down ^ while pressing return (or clicking on the matching draft in the list) will copy the URL for the draft instead of opening it in Drafts. This is effectively another way to trigger the Copy Draft URL action.
  • Holding down ⇧^ while pressing return (or clicking on the matching draft in the list) will copy the redirect web URL for the draft instead of opening it in Drafts. This is effectively another way to trigger the Copy Draft Redirect URL action.
  • Holding down while pressing return (or clicking on the matching draft in the list) will copy the content for the draft instead of opening it in Drafts. This is effectively another way to trigger the Copy Draft Content action.