Action weblog

Posted by maique, Last update over 1 year ago

This action creates a new post on’s weblog service,

If you’d like a title on your post, make sure the first line is “# title of post”. Otherwise the title will be whatever comes first.

You’ll need an account, and the API key for that account. You’ll be asked for both during first run.

Thanks to:


Colin Devroe


  • script

    // Storing the credentials in Draft's Credential instead of the action code directly
    // Thank you podiboq:
    var credential = Credential.create(" weblog", "Store your API key username privately");
    credential.addTextField("omg_username", "Your username");
    credential.addPasswordField("omg_api_key", "API Key");
    // Get the values and store them: 
    let omg_api_key = credential.getValue("omg_api_key")
    let omg_username = credential.getValue("omg_username")
    var d = new Date("2015-12-01 21:15");
    var content = draft.processTemplate("[[draft]]");
    var random = Math.random().toString().substr(2, 8);
      var http = HTTP.create();
      var response = http.request({
    	"url": "" + omg_username + "/weblog/entry/" + random + "/",
    	"method": "POST",
    	"data": { "content": content},
    	"headers": {
    	  "Authorization": "Bearer " + omg_api_key


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