Creates a new card in Supernotes using the Drafts’ title and body.


  • Replace YOUR-SUPERNOTES-API-KEY with your Supernotes API key.

How it works

  1. Extracts the Draft’s title and body using templates.
  2. Sends a POST request to the Supernotes API to create a new card.
  3. Logs an error and fails the action if the request fails.
var http = HTTP.create();

let title = draft.processTemplate("[[title]]");
let body = draft.processTemplate("[[body]]");

var response = http.request({
  url: "",
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  data: {
    icon: "",
    name: title,
    markup: body,

if (response.error) {


Make sure to replace YOUR-SUPERNOTES-API-KEY with your actual Supernotes API key.