Send to Remarkable

Posted by enivrezvous, Last update 9 months ago


9 months ago

Update with easier to read script in case you want to change anything in the setup, of the format the script has as an output.

Action is functionally a copy of raigmcclellan’s PDF Export action. The script has been rewritten and repurposed for Remarkable.

Takes a draft and sends to Remarkable as a PDF using iPhone shortcuts.

Use shortcut:


  • script

    // Convert Markdown to HTML
    var markdownConverter = MultiMarkdown.create();
    var htmlContent = markdownConverter.render(draft.content);
    // Define an HTML template with styles to set base fonts
    var htmlTemplate = "<html><style>body{font-family:'Avenir Next';font-size:100%;line-height: 1.5;}</style><body>[[content]]</body></html>";
    // Replace the [[content]] placeholder in the template with the HTML content
    var finalHTML = htmlTemplate.replace("[[content]]", htmlContent);
    // Set draft template tag for use in the workflow
    draft.setTemplateTag("script_content", finalHTML);
    // Optionally, handle errors during conversion or template replacement
    if (!finalHTML) {
        console.log("Error: Markdown to HTML conversion or template replacement failed.");
  • runWorkflow

    Draft to Remarkable


  • 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.