Post to Writeas Blog

Posted by David Blue, Last update about 2 years ago


about 2 years ago

-Actually listed publicly in the directory

show all updates...

about 2 years ago

-Actually listed publicly in the directory

about 2 years ago

-Listed publicly in the directory

about 2 years ago

-Name update
-Description update

about 2 years ago

-Modified/unified the credential identifier to “”

Post to a named blog (“collection”) via the API.

The URL of the result is logged, copied to the system clipboard, and inserted in the current draft as a markdown-formatted hyperlink.

Writeas Post Example

For more information, see this action’s corresponding GitHub issue.


  • script

    // setup and request credentials
    let credential = Credential.create("Writeas", "Enter your target Writeas blog slug (collection) and Writeas/Snapas API auth token.");
    credential.addTextField("collection", "Collection");
    credential.addPasswordField("token", "Access Token");
    const token = credential.getValue("token");
    const collection = credential.getValue("collection");
    // make post
    let endpoint = `${collection}/posts`;
    // configure post details
    // for more information, see:
    let data = {
    	"body": draft.content,
    // create and post HTTP request
    var http = HTTP.create();
    var response = http.request({
    	"url": endpoint,
    	"method": "POST",
    	"data": data,
    	"headers": {
    		"Authorization" : token,
    // log result post URL and copy to clipboard
    if (response.statusCode == 201) {
    	let d = JSON.parse(response.responseText);
    	console.log("Posted to Writeas. URL: " +;
    else {
    	console.log(" Error: " + response.error);;
  • insertText

    - [[[display_title]]]([[walink]])


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