- Add debounced state updates for title and content (500ms delay) - Immediate UI updates with delayed history saving - Prevent one-letter-per-undo issue - Add cleanup for debounce timers on unmount
178 lines
4.0 KiB
JSON
178 lines
4.0 KiB
JSON
{
|
|
"name": "Memento API Testing Workflow",
|
|
"nodes": [
|
|
{
|
|
"parameters": {},
|
|
"id": "manual-trigger",
|
|
"name": "Manual Trigger",
|
|
"type": "n8n-nodes-base.manualTrigger",
|
|
"typeVersion": 1,
|
|
"position": [250, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "http://localhost:3000/api/notes",
|
|
"authentication": "none",
|
|
"sendHeaders": true,
|
|
"headerParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"sendBody": true,
|
|
"bodyParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "title",
|
|
"value": "N8N API Test"
|
|
},
|
|
{
|
|
"name": "content",
|
|
"value": "This note was created via N8N workflow using the Memento REST API!"
|
|
},
|
|
{
|
|
"name": "color",
|
|
"value": "blue"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": "create-note-http",
|
|
"name": "Create Note via API",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [470, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"method": "GET",
|
|
"url": "http://localhost:3000/api/notes",
|
|
"authentication": "none",
|
|
"options": {}
|
|
},
|
|
"id": "get-notes-http",
|
|
"name": "Get All Notes via API",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [690, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"method": "PUT",
|
|
"url": "http://localhost:3000/api/notes",
|
|
"authentication": "none",
|
|
"sendHeaders": true,
|
|
"headerParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"sendBody": true,
|
|
"bodyParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"value": "={{ $json.data.id }}"
|
|
},
|
|
{
|
|
"name": "title",
|
|
"value": "N8N Updated"
|
|
},
|
|
{
|
|
"name": "isPinned",
|
|
"value": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": "update-note-http",
|
|
"name": "Update Note via API (Pin)",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [910, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"values": {
|
|
"string": [
|
|
{
|
|
"name": "test_result",
|
|
"value": "API Testing Complete"
|
|
},
|
|
{
|
|
"name": "total_notes",
|
|
"value": "={{ $json.length }}"
|
|
},
|
|
{
|
|
"name": "message",
|
|
"value": "Successfully created, retrieved, and updated notes via REST API"
|
|
}
|
|
]
|
|
},
|
|
"options": {}
|
|
},
|
|
"id": "format-results",
|
|
"name": "Format Results",
|
|
"type": "n8n-nodes-base.set",
|
|
"typeVersion": 3.4,
|
|
"position": [1130, 300]
|
|
}
|
|
],
|
|
"connections": {
|
|
"Manual Trigger": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Create Note via API",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Create Note via API": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Get All Notes via API",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Get All Notes via API": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Update Note via API (Pin)",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Update Note via API (Pin)": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Format Results",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"settings": {
|
|
"executionOrder": "v1"
|
|
}
|
|
}
|