Action

Template

Last update almost 6 years ago - Unlisted

Calls a list of templates

Steps

  • script

    //List of 'actions' that are templates. Names must match actions
    var list = ["Meeting template", "CSS template", "Supervision template"];
    
    //Prompt to bring up the list of templates
    var p = Prompt.create();
    p.title = "Select template";
    p.addSelect("template", "", list, ["Meeting"], false);
    p.addButton("Create template");
    var s = p.show();
    
    //Set 'Draft' tag to be called in URL scheme
    if (p.buttonPressed == "Create template") {
    var t = p.fieldValues["template"];
    draft.setTemplateTag("template",t);
    }
    
  • callbackUrl

    template
    drafts5://x-callback-url/create?action=[[template]]
    waitForResponse
    false
    encodeTags
    true

Options

  • After Success Nothing
    Notification None
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.