Action Step – OneNote

Create, append or prepend to notes in Microsoft’s OneNote service.



  • Notebook: Template for notebook name. Should be exact match for existing notebook in your personal OneNote account, or leave blank to target the default notebook.
  • Section: Name of a section within the specified notebook. If the section does not exist, Drafts will created it.
  • Page: Title of page in the section specified above. If the page does not exist, Drafts will create it.
  • Template: Template for the content of the note.
  • Template Output Format: Determines how the output of the above template should be treated. Options:
    • Text: Assumes the output of the template is plain text, and converts it to HTML by converting HTML entities, and adding line breaks.
    • Markdown: Assumes the output of the template is raw Markdown, and runs it through the Markdown processor to convert it to HTML to upload.
    • HTML: Assumes the template outputs HTML. When using this, the template should not include <html>, <body> tags, just the content part of the HTML, in fully-valid X-HTML format (closing tags, quoted attributes) or OneNote will reject the content. Generating the correct HTML, it is possible to create special OneNote-specific items like tasks. Refer to OneNote data tag documentation.
  • Write Type:
    • create: Create a new note. If an existing file already exists at the location. If the page targetted already exists, fail with an error.
    • replace: Create new page, overwriting an existing if it exists.
    • prepend: Prepend template content at the beginning of the page. Create the page if it does not already exist.
    • append: Append template content at the end of the page. Create the page if it does not already exist.
  • Identifier: A string identifier for the OneNote account to use. This value is only needed if you wish to use more than one OneNote account with Drafts. If used, all actions with the same identifier will use the same alternate login for OneNote.