X-Callback-Url Scheme

General scheme:

noteplan://x-callback-url/[action]?[action parameters]&[x-callback parameters]

Actions

/openNote

Open a note identified by the title or date.

Parameters:

  • noteDate optional to identify the calendar note in the format YYYYMMDD like '20180122'.
  • noteTitle optional to identify the normal note by actual title.
  • fileName optional to identify a note by filename instead of title or date. Searches first general notes, then calendar notes for the filename. If its an absolute path outside NotePlan, it will copy the note into the database (only Mac).
  • subWindow optional (only Mac), values: yes (opens note in a subwindow) and no

Example:

noteplan://x-callback-url/openNote?noteDate=20180204

/addText

Adds text to a note identified by the title, filename (normal notes) or date (calendar notes).

Parameters:

  • noteDate optional to identify the calendar note in the format YYYYMMDD like '20180122'.
  • noteTitle optional to identify the normal note by actual title.
  • fileName optional to identify a normal note by filename instead of title or date. Searches first general notes, then calendar notes for the filename.
  • text text to be added to the note.
  • mode optional, values: prepend, append
  • openNote optional, values: yes (opens the note, if not already selected), no
  • subWindow optional (only Mac), values: yes (opens note in a subwindow if 'openNote' was also added as argument with 'yes' value) and no

Examples:

  1. Calendar notes:

noteplan://x-callback-url/addText?noteDate=20180204&text=*%20Hello%20World&mode=append&openNote=yes

Use noteDate to target calendar notes.

  1. Normal notes:

noteplan://x-callback-url/addText?noteTitle=Test%20Note&text=*%20Hello%20World&mode=prepend

Use noteTitle to target normal notes.

/addNote

Adds a new note with text and a title. If the title already exists, it still creates a new note and appends a number to the filename. If you want to add a calendar note, use "/addText". The calendar notes are automatically created for you and there can't exist multiple calendar notes for one date.

A new note should have either a title or a text. Empty notes are not allowed.

  • noteTitle optional, will be prepended if it is used
  • text optional, text will be added to the note
  • openNote optional, values: yes (opens the note, if not already selected), no
  • subWindow optional (only Mac), values: yes (opens note in a subwindow) and no

Example:

noteplan://x-callback-url/addNote?text=New%20Note&openNote=yes

/deleteNote

  • noteTitle title to identify a normal note
  • noteDate date to identify a calendar note in the format YYYYMMDD like '20180122'
  • fileName optional to identify a note by filename instead of title or date. Searches first general notes, then calendar notes for the filename.

Example:

noteplan://x-callback-url/deleteNote?noteTitle=New%20Note

/selectTag

  • name required tag name, leave it empty to show all notes.

Example:

noteplan://x-callback-url/selectTag?name=noteplan

  • text required to identify the search string, leave it empty to clear the search field.
  • view optional, values: notes (notes view is default if not set), calendar (set the search field of the calendar view), note (set the search field of the opened note)

Example:

noteplan://x-callback-url/search?text=noteplan&view=calendar

Testing

Run the X-Callback-Url like this in the Terminal to test:

open "noteplan://x-callback-url/addText?noteDate=20180204&text=Hello%20World"

Or enter the URL into Safari or another browser.