Link Search Menu Expand Document
Table of contents
  1. Run Action
    1. Description
    2. Flow
    3. Building the Flow

Run Action

Description

While Doctor Drafts can do many things with Drafts, it does have limits. However Drafts actions have far fewer constraints, and we can extend the reach of Doctor Drafts with several of the flows by also including details to trigger the running of an action on a draft.

In this example, we will be posting to micro-blogging service Micro.blog using the Post to Micro.blog action from the Drafts directory.

Flow

The flow to do this consists of just three sequential blocks.

run-action - flow

Building the Flow

The first block is an Inputs > Keyword block, and just sets up the keyword we want to use, in this case p2mb to trigger the flow. It is set to require an argument. This argument will be the text that we type after the keyword and is what will be the content of the new draft and therefore the content that will be posted to Micro.blog.

run-action - 01

The next block is a Utilities > Args and Vars block. This passes through the {query} untouched to the final block, and specifies the name of the action to be run via the action variable. In this case the name of the action is “Post to Micro.blog”.

run-action - 02

The final step is to link an Outputs > Call External Trigger block. If you select the Workflow Triggers… button, this will allow you to select from the list of available triggers and will populate the Workflow ID and Trigger ID fields, with no risk of typos. Here we are selecting the dropennew trigger ID from Doctor Drafts.

run-action - 03

If you take a look at the Flow - dropennew page in the Documentation section, it explains how it works, and what variables it expects to be set. Note in the above screenshot that the Pass input as argument and Pass variables options are set. These are critical to this working correctly.