Drafts Action Directory

App Price

Posted by @nahumck, Last update about 2 months ago

Opens the “App Price” Workflow and returns the result.

Workflow:
https://workflow.is/workflows/cd97fa45ce17486bbe5774321e4d8216

Install

Steps

  • script

    // [[selection]] tag workaround
    
    var sel = editor.getSelectedText();
    draft.setTemplateTag("selection", sel)
  • runWorkflow

    workflowName
    App Price
    waitForResponse
    true
  • script

    // check for last result from Workflow callback, insert if available
    var response = context.callbackResponses[0];
    if (response) {
      var result = response["result"];
      if (result) {
        var selRange = editor.getSelectedRange();
        editor.setSelectedText(result);
        editor.setSelectedRange([selRange[0] + result.length, 0]);
      }
    }

Options

  • After Success Default
    Notification Info
    Log Level Error

Comments

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