Files
Momento/mcp-server/n8n-workflow-mcp-webhook-to-note.json
Antigravity 0ebf10344d
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 55s
feat(mcp): add all 4 note types, translate N8N docs to English, add N8N workflow examples
- tools.js: expose type enum ['text','markdown','richtext','checklist'] in create_note & update_note
  - default changed from 'text' to 'richtext' (matches Prisma schema)
  - isMarkdown marked as deprecated in favour of type='markdown'
- N8N-CONFIG.md: full French → English translation
- N8N-WORKFLOWS.md: full French → English translation
- N8N-EXAMPLES.md: new comprehensive examples for all 22 MCP tools + workflow patterns
- n8n-workflow-mcp-reminder-bot.json: cron → get_due_reminders → Telegram → mark done
- n8n-workflow-mcp-email-to-note.json: IMAP → create_note → urgent Slack alert
- n8n-workflow-mcp-daily-digest.json: 8AM cron → notes + reminders digest → save + Slack
- n8n-workflow-mcp-webhook-to-note.json: universal webhook → create_note → respond
- notebooks-list.tsx: fix truncated notebook names (pe-24→pe-14), replace hover overlay with Tooltip
2026-05-03 20:49:11 +00:00

93 lines
4.2 KiB
JSON

{
"name": "Memento MCP — Webhook to Note",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "memento-note",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-trigger",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [240, 300],
"webhookId": "memento-create-note"
},
{
"parameters": {
"jsCode": "// Flexible input: accept anything and build a note from it\nconst body = $input.item.json.body || $input.item.json;\n\nconst title = body.title || body.subject || body.name || null;\nconst content = body.content || body.text || body.message || body.description || JSON.stringify(body, null, 2);\nconst color = body.color || 'default';\nconst labels = Array.isArray(body.labels) ? body.labels : body.labels ? [body.labels] : [];\nconst notebookId = body.notebookId || body.notebook_id || null;\nconst isPinned = body.isPinned === true || body.pinned === true;\nconst isMarkdown = body.isMarkdown === true || body.markdown === true;\nconst reminder = body.reminder || body.dueDate || body.due_date || null;\nconst color_valid = ['default','red','orange','yellow','green','teal','blue','purple','pink','gray'].includes(color) ? color : 'default';\n\nreturn [{ json: { title, content, color: color_valid, labels, notebookId, isPinned, isMarkdown, reminder } }];"
},
"id": "prepare-note",
"name": "Prepare Note Data",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [480, 300]
},
{
"parameters": {
"method": "POST",
"url": "http://memento-mcp:3001/mcp",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{ "name": "Content-Type", "value": "application/json" },
{ "name": "x-api-key", "value": "={{ $vars.MEMENTO_API_KEY }}" }
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"create_note\",\n \"arguments\": {\n \"title\": {{ $json.title ? JSON.stringify($json.title) : 'null' }},\n \"content\": {{ JSON.stringify($json.content) }},\n \"color\": \"{{ $json.color }}\",\n \"labels\": {{ JSON.stringify($json.labels) }},\n \"isPinned\": {{ $json.isPinned }},\n \"isMarkdown\": {{ $json.isMarkdown }}\n {{ $json.notebookId ? ', \"notebookId\": \"' + $json.notebookId + '\"' : '' }}\n {{ $json.reminder ? ', \"reminder\": \"' + $json.reminder + '\"' : '' }}\n }\n }\n}"
},
"id": "mcp-create-note",
"name": "MCP — Create Note",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [720, 300]
},
{
"parameters": {
"jsCode": "const response = $input.item.json;\nconst result = JSON.parse(response.result?.content?.[0]?.text || '{}');\n\nreturn [{\n json: {\n success: true,\n noteId: result.id,\n title: result.title,\n createdAt: result.createdAt\n }\n}];"
},
"id": "format-response",
"name": "Format Response",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [960, 300]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ $json }}"
},
"id": "webhook-response",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [1200, 300]
}
],
"connections": {
"Webhook": {
"main": [[{ "node": "Prepare Note Data", "type": "main", "index": 0 }]]
},
"Prepare Note Data": {
"main": [[{ "node": "MCP — Create Note", "type": "main", "index": 0 }]]
},
"MCP — Create Note": {
"main": [[{ "node": "Format Response", "type": "main", "index": 0 }]]
},
"Format Response": {
"main": [[{ "node": "Respond to Webhook", "type": "main", "index": 0 }]]
}
},
"pinData": {},
"settings": { "executionOrder": "v1" },
"staticData": null,
"tags": [{ "id": "memento-mcp", "name": "Memento MCP" }],
"triggerCount": 1,
"updatedAt": "2026-05-03T00:00:00.000Z",
"versionId": "1"
}