Post to

Posted by agiletortoise, Last update over 4 years ago

Post to a hosted account. First time running this action, you will need to provide an app token generated from your profile at


  • script

      post to hosted account
      using Micropub API
    // First run, you will be prompted for
    // App Token. Generate tokens on the
    // Account page
    var credential = Credential.create("", "Insert app token generated on account page.");
    credential.addTextField("apptoken", "App Token");
    var appToken = credential.getValue("apptoken");
    // Setup API and content 
    var endpoint = ""
    var content = draft.content
    // create and post HTTP request
    var http = HTTP.create();
    var response = http.request({
      "url": endpoint,
      "method": "POST",
      "encoding": "form",
      "data": {
        "h": "entry",
        "content": content
      "headers": {
        "Authorization": "Bearer " + appToken
    console.log("Response: " + response.statusCode);
    if (response.statusCode != 200 && response.statusCode != 202) {;


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