Files
Momento/mcp-server/N8N-EXAMPLES.md
Antigravity a139f92686
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 16s
feat(mcp): update server with hierarchy support, batch operations, and tree view
2026-05-10 19:12:55 +00:00

10 KiB

N8N Examples — Memento MCP Server

Practical, copy-paste-ready N8N workflow snippets for every Memento MCP tool. All examples assume an MCP Client node configured with Streamable HTTP and x-api-key authentication.

Note Types

type value Description
richtext Rich text editor — default
markdown Markdown rendered (preferred over deprecated isMarkdown)
text Plain text
checklist Interactive checklist with checkItems

Note

: isMarkdown: true is deprecated. Use "type": "markdown" instead.


Notes

Create a simple text note

{
  "tool": "create_note",
  "arguments": {
    "title": "Quick idea",
    "content": "Explore serverless architecture for the new API gateway.",
    "color": "yellow",
    "labels": ["idea", "architecture"]
  }
}

Create a pinned markdown note

{
  "tool": "create_note",
  "arguments": {
    "title": "Project README",
    "content": "# My Project\n\nThis is the main documentation.\n\n## Getting Started\n\n```bash\nnpm install\nnpm run dev\n```",
    "isMarkdown": true,
    "isPinned": true,
    "color": "blue",
    "size": "large"
  }
}

Create a checklist note

{
  "tool": "create_note",
  "arguments": {
    "title": "Weekly tasks",
    "content": "Tasks for this week",
    "type": "checklist",
    "checkItems": [
      { "id": "1", "text": "Review pull requests", "checked": false },
      { "id": "2", "text": "Update deployment docs", "checked": false },
      { "id": "3", "text": "Team standup notes", "checked": true }
    ],
    "color": "teal"
  }
}

Create a note with a reminder

{
  "tool": "create_note",
  "arguments": {
    "title": "Dentist appointment",
    "content": "Dr. Martin — 10:30 AM. Bring insurance card.",
    "reminder": "2025-06-15T10:00:00.000Z",
    "reminderRecurrence": "yearly",
    "color": "red",
    "labels": ["health", "personal"]
  }
}

Create a note in a specific notebook

{
  "tool": "create_note",
  "arguments": {
    "title": "Sprint planning notes",
    "content": "**Goal**: Ship user authentication by Friday.\n\n- Design review at 2PM\n- Backend API ready by Wednesday",
    "isMarkdown": true,
    "notebookId": "{{ $json.notebookId }}",
    "labels": ["sprint", "planning"],
    "color": "purple"
  }
}
{
  "tool": "create_note",
  "arguments": {
    "title": "Research resources",
    "content": "Curated links for the ML paper review.",
    "links": [
      "https://arxiv.org/abs/2304.15004",
      "https://huggingface.co/papers",
      "https://paperswithcode.com"
    ],
    "labels": ["research", "ml"],
    "color": "green"
  }
}

Get all notes (lightweight)

{
  "tool": "get_notes",
  "arguments": {
    "limit": 50
  }
}

Get notes from a specific notebook

{
  "tool": "get_notes",
  "arguments": {
    "notebookId": "{{ $json.notebookId }}",
    "limit": 100
  }
}

Get unfiled notes (Inbox)

{
  "tool": "get_notes",
  "arguments": {
    "notebookId": "inbox",
    "limit": 50
  }
}

Get all notes including archived

{
  "tool": "get_notes",
  "arguments": {
    "includeArchived": true,
    "limit": 200,
    "fullDetails": true
  }
}

Get a single note by ID

{
  "tool": "get_note",
  "arguments": {
    "id": "{{ $json.noteId }}"
  }
}

Search notes by keyword

{
  "tool": "search_notes",
  "arguments": {
    "query": "deployment kubernetes"
  }
}

Search in a specific notebook

{
  "tool": "search_notes",
  "arguments": {
    "query": "{{ $json.searchTerm }}",
    "notebookId": "{{ $json.notebookId }}",
    "includeArchived": false
  }
}

Update a note's content

{
  "tool": "update_note",
  "arguments": {
    "id": "{{ $json.noteId }}",
    "content": "{{ $json.newContent }}",
    "color": "green"
  }
}

Mark a checklist item as done

{
  "tool": "update_note",
  "arguments": {
    "id": "{{ $json.noteId }}",
    "checkItems": [
      { "id": "1", "text": "Review pull requests", "checked": true },
      { "id": "2", "text": "Update deployment docs", "checked": false }
    ]
  }
}

Add labels to an existing note

{
  "tool": "update_note",
  "arguments": {
    "id": "{{ $json.noteId }}",
    "labels": ["ai-generated", "reviewed", "{{ $json.category }}"]
  }
}

Mark a reminder as done

{
  "tool": "update_note",
  "arguments": {
    "id": "{{ $json.noteId }}",
    "isReminderDone": true
  }
}

Move a note to a notebook

{
  "tool": "move_note",
  "arguments": {
    "id": "{{ $json.noteId }}",
    "notebookId": "{{ $json.targetNotebookId }}"
  }
}

Move a note to Inbox (no notebook)

{
  "tool": "move_note",
  "arguments": {
    "id": "{{ $json.noteId }}",
    "notebookId": null
  }
}

Pin a note

{
  "tool": "toggle_pin",
  "arguments": {
    "id": "{{ $json.noteId }}"
  }
}

Archive a note

{
  "tool": "toggle_archive",
  "arguments": {
    "id": "{{ $json.noteId }}"
  }
}

Delete a note permanently

{
  "tool": "delete_note",
  "arguments": {
    "id": "{{ $json.noteId }}"
  }
}

Export all notes as JSON backup

{
  "tool": "export_notes",
  "arguments": {}
}

Import notes from a JSON backup

{
  "tool": "import_notes",
  "arguments": {
    "data": "{{ $json.exportPayload }}"
  }
}

Notebooks

Create a notebook

{
  "tool": "create_notebook",
  "arguments": {
    "name": "Work Projects",
    "icon": "💼",
    "color": "#3B82F6"
  }
}

Create a notebook for a team/topic

{
  "tool": "create_notebook",
  "arguments": {
    "name": "Machine Learning Research",
    "icon": "🤖",
    "color": "#8B5CF6"
  }
}

List all notebooks

{
  "tool": "get_notebooks",
  "arguments": {}
}

Get a notebook with its notes

{
  "tool": "get_notebook",
  "arguments": {
    "id": "{{ $json.notebookId }}"
  }
}

Rename a notebook

{
  "tool": "update_notebook",
  "arguments": {
    "id": "{{ $json.notebookId }}",
    "name": "Q3 2025 Projects",
    "color": "#10B981"
  }
}

Reorder notebooks

{
  "tool": "reorder_notebooks",
  "arguments": {
    "notebookIds": [
      "{{ $json.ids[0] }}",
      "{{ $json.ids[1] }}",
      "{{ $json.ids[2] }}"
    ]
  }
}

Create a sub-notebook (hierarchical)

{
  "tool": "create_notebook",
  "arguments": {
    "name": "Project Alpha",
    "icon": "🚀",
    "color": "#10B981",
    "parentId": "{{ $json.parentNotebookId }}"
  }
}

Get notebook hierarchy (tree view)

{
  "tool": "get_notebook_hierarchy",
  "arguments": {}
}

Delete a notebook (notes go to Inbox)

{
  "tool": "delete_notebook",
  "arguments": {
    "id": "{{ $json.notebookId }}"
  }
}

Batch Operations

Batch move notes to a notebook

{
  "tool": "batch_move_notes",
  "arguments": {
    "ids": ["{{ $json.noteId1 }}", "{{ $json.noteId2 }}", "{{ $json.noteId3 }}"],
    "notebookId": "{{ $json.targetNotebookId }}"
  }
}

Batch delete notes

{
  "tool": "batch_delete_notes",
  "arguments": {
    "ids": ["{{ $json.noteId1 }}", "{{ $json.noteId2 }}"]
  }
}

Labels

Create a label inside a notebook

{
  "tool": "create_label",
  "arguments": {
    "name": "urgent",
    "color": "red",
    "notebookId": "{{ $json.notebookId }}"
  }
}

Create common project labels

{
  "tool": "create_label",
  "arguments": {
    "name": "in-progress",
    "color": "orange",
    "notebookId": "{{ $json.notebookId }}"
  }
}
{
  "tool": "create_label",
  "arguments": {
    "name": "done",
    "color": "green",
    "notebookId": "{{ $json.notebookId }}"
  }
}

List labels in a notebook

{
  "tool": "get_labels",
  "arguments": {
    "notebookId": "{{ $json.notebookId }}"
  }
}

List all labels (global)

{
  "tool": "get_labels",
  "arguments": {}
}

Rename a label

{
  "tool": "update_label",
  "arguments": {
    "id": "{{ $json.labelId }}",
    "name": "high-priority",
    "color": "red"
  }
}

Delete a label

{
  "tool": "delete_label",
  "arguments": {
    "id": "{{ $json.labelId }}"
  }
}

Reminders

Get all due reminders (for cron automation)

{
  "tool": "get_due_reminders",
  "arguments": {}
}

Tip

: Schedule this every 30 minutes with a cron trigger (0 */30 * * * *), then loop over results and send notifications via Slack, Telegram, or email.


Common Workflow Patterns

Pattern: Email → Note

  1. Email Trigger (IMAP) — fires on new email
  2. MCP Clientcreate_note
    {
      "title": "{{ $json.subject }}",
      "content": "**From**: {{ $json.from }}\n\n{{ $json.text }}",
      "labels": ["email"],
      "color": "blue",
      "isMarkdown": true
    }
    

Pattern: Reminder Notifications

  1. Schedule Trigger — every 30 minutes
  2. MCP Clientget_due_reminders
  3. IF — results not empty
  4. Loop over items → send Slack/Telegram message per reminder
  5. MCP Clientupdate_note with isReminderDone: true

Pattern: AI Summarization

  1. MCP Clientsearch_notes with a topic query
  2. OpenAI / Anthropic node — summarize the returned notes
  3. MCP Clientcreate_note with the summary as content, labeled ai-summary

Pattern: Daily Digest

  1. Schedule Trigger — every day at 8 AM
  2. MCP Clientget_notes with limit: 20 (most recent)
  3. AI node — generate a brief digest
  4. Email / Slack node — send the digest
  5. (Optional) MCP Clientcreate_note to archive the digest

Pattern: Webhook → Structured Note

  1. Webhook Trigger — receives JSON payload (e.g., from a form or CI/CD pipeline)
  2. Code node — format the payload into markdown
  3. MCP Clientcreate_note
    {
      "title": "Build #{{ $json.buildNumber }} — {{ $json.status }}",
      "content": "{{ $node['Code'].json.markdown }}",
      "isMarkdown": true,
      "color": "{{ $json.status === 'success' ? 'green' : 'red' }}",
      "labels": ["ci-cd", "{{ $json.repo }}"]
    }