Creates a new draft in Drafts based on the content of a file. The path to the file should be passed as the query to this flow, which will then read the content of the file and use that as the content for the draft.
The creation is achieved either using a URL scheme (opening in the foreground), or AppleScript (creating in the background. The flow supports different options for different routes, and the route to be taken should be specified via the
OpenDraft variable when calling this trigger.
- Prefixing content to lines is supported by all methods.
- Flagging and tagging is supported by the AppleScript (create in background) method.
- Running an action on the new draft is supported by the URL scheme (create in foreground) method, and will be forced if triggered for a background open method.
The following variables can be passed in and will be processed by the flow.
| ||The file path to the file to use as the content for the new draft.|
| ||Set to |
| ||The name of an action to execute on the new draft once it has been created if the draft is to be opened.|
| ||Set as |
| ||The text to prepend to each content line.|
| ||A comma separated list of tags to add to the new draft, if the draft is to be created in the background.|
* These are mandatory for triggering this flow.
The following variables are set-up by the flow.
| ||The (modified) content to populate the new draft with.|
| ||The title to be shown in any completion notification.|
| ||The message to be shown in any completion notification.|
- External Trigger:
- Unlike other triggers in this flow, this trigger does not convert
\tto a new line or tab respectively. This is because the content entry is not subject to thre limitations of being entered directlyinto Alfred.