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

Flow - drlog

Description

Takes in a search string for a draft title and the content to add to the draft. If the draft cannot be found, the flow will create it. When a matching draft is found, the flow will hand off to the drappend flow with the details it will use.

Variables

Used

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

Variable Description
query * The base content to append to the draft.
title * The title of the draft to be updated.
UUID The (optional) unique identifier of the draft to be appended to.
prefix The text to prepend to each content line.
action The name of an action to execute on the new draft once it has been created if the draft is to be opened.
tags A comma separated list of tags to add to the new draft.

* These are mandatory for triggering this flow.

Created

The following variables are set-up by the flow.

Variable Description
content The (modified) content to populate the new draft with.
appPath Set with the path to the app that is in the foreground when the flow is triggered.
UUID The unique identifier of the draft to be appended to. Set by a search operation if no UUID was passed in originally.
NotificationTitle The title to be shown in any completion notification.
NotificationMessage The message to be shown in any completion notification.

Termination

Flow

drlog

Scripting

Sample Code (AppleScript)

tell application id "com.runningwithcrayons.Alfred"
	set configuration "title" to value "Movie Log" in workflow "com.thoughtasylum.doctordrafts"
	run trigger "drlog" in workflow "com.thoughtasylum.doctordrafts" with argument "Back to the Future"
	run trigger "drlog" in workflow "com.thoughtasylum.doctordrafts" with argument "Back to the Future Part II"
	run trigger "drlog" in workflow "com.thoughtasylum.doctordrafts" with argument "Back to the Future Part III"
end tell

Notes

  • Supports new lines from Alfred input as “\n”.
  • Supports tab characters from Alfred input as “\t”.
  • This flow is recursive.