Send to Memos [v1]

Posted by hu3rror, Last update about 2 months ago


about 2 months ago

For Memos versions < 0.22.0

show all updates...

about 2 months ago

For Memos versions < 0.22.0

10 months ago

Add comments for supporting access token

An action to send draft to Memos with access token.

Memos, a piracy-first, lightweight note-taking service.

For more information,checkout


  • script

      Post to Memos with Access Token
    // Create a credential object
    let credential = Credential.create("Memos Instance URL & Access Token",
    `URL example:
    Get Access Token from your memos instance: "Settings > My Account > Create"`);
    // Add text field for Memos instance URL
    credential.addURLField("memos_instance", "Memos Instance URL");
    // Add password field for Memos access token
    credential.addPasswordField("memos_access_token", "Memos Access Token");
    // Authorize the credential object
    // Get the Memos instance URL and access token from the credential object
    let endpoint = credential.getValue("memos_instance") + "/api/v1/memo";
    let accessToken = credential.getValue("memos_access_token");
    // Get the content of the draft
    let content = draft.content;
    // Check if the content is not empty
    if (content.length > 0) {
        // Create an HTTP object
        let http = HTTP.create();
        // Send a POST request to the Memos API with the content
        var response = http.request({
            "url": endpoint,
            "method": "POST",
            "data": {
                "content": content
            "headers": {
                "Content-type": "application/json",
                "Authorization": "Bearer " + accessToken
    // Log the response status code
    console.log("Response: " + response.statusCode);
    // Check if the response status code is not 200 or 202
    if (response.statusCode != 200 && response.statusCode != 202) {
        // Fail the context;


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