Drafts Action Directory

Insert Color (Shortcuts app example)

Posted by agiletortoise, Last update 7 days ago

Example to demonstrate how to insert a result from a Shortcuts app shortcut into the current draft.

The action has two steps, the first a “Run Shortcut” step. This step is configured with the name of a valid Shortcut in the Shortcuts app, in this case the examples Shortcut is named Select Color, which can be installed from this link. It is a simple shortcut that prompts you to select from a list of colors - but any Shortcut that returns text could be used.

The second step is an “Insert Text” step, configured with the [[shortcut_result]] tag as a template. After the shortcut returns to Drafts, this tag is filled with the result of the Shortcut. It could be used in other step templates as well, but in this case we want to insert the result in the current draft at the cursor location.

Install

Steps

  • runShortcut

    shortcutName
    Select Color
    waitForResponse
    true
  • insertText

    template
    [[shortcut_result]]

Options

  • After Success Default
    Notification Info
    Log Level Info

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.