{
  "updatedAt": "2026-05-22T22:47:04.512Z",
  "createdAt": "2026-05-09T22:31:02.480Z",
  "id": "9qfbZJJmSJqmg5sX",
  "name": "Whisper Audio Transcription",
  "description": "Disabled 2026-05-24 after PD Ollama/LiteLLM hammering destabilized PlausibleDeniability. Needs redesign before re-enable.",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "transcribe",
        "responseMode": "lastNode",
        "responseData": "allEntries",
        "options": {
          "rawBody": true
        }
      },
      "id": "83da1668-bc21-4d8f-bf35-f0fbf45168c2",
      "name": "Transcription Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ],
      "webhookId": "f50eec94-1e56-4189-88ee-51b701c1d889"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://10.5.30.6:8786/v1/audio/transcriptions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            },
            {
              "name": "model",
              "value": "Systran/faster-whisper-large-v3"
            },
            {
              "name": "language",
              "value": "en"
            },
            {
              "name": "response_format",
              "value": "verbose_json"
            }
          ]
        },
        "options": {}
      },
      "id": "98a7fb4d-fd91-451d-b5d8-00e8382742ef",
      "name": "Whisper Transcribe",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        224,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "const result = $input.first().json;\n\nconst segments = result.segments || [];\nconst fullText = result.text || segments.map(s => s.text).join(' ');\nconst duration = result.duration || segments[segments.length - 1]?.end || 0;\n\n// Format timestamps\nconst timestamped = segments.map(s => {\n  const start = new Date(s.start * 1000).toISOString().substr(11, 8);\n  return `[${start}] ${s.text.trim()}`;\n}).join('\\n');\n\nreturn [{\n  json: {\n    text: fullText.trim(),\n    timestamped_text: timestamped,\n    duration_seconds: Math.round(duration),\n    segment_count: segments.length,\n    language: result.language || 'en'\n  }\n}];"
      },
      "id": "44c39528-48a3-4769-9f46-302b5a4a15e2",
      "name": "Format Transcript",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        448,
        0
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "transcribe/summarize",
        "responseMode": "lastNode",
        "responseData": "allEntries",
        "options": {
          "rawBody": true
        }
      },
      "id": "5f400dfe-a426-4462-a7a8-62d6bd809d21",
      "name": "Transcribe + Summarize Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        304
      ],
      "webhookId": "69b4b2e8-9486-4aa3-b9db-fb8e6bdae98e"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://10.5.30.6:8786/v1/audio/transcriptions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            },
            {
              "name": "model",
              "value": "Systran/faster-whisper-large-v3"
            },
            {
              "name": "language",
              "value": "en"
            }
          ]
        },
        "options": {}
      },
      "id": "83ef29fb-596f-4621-9c3e-3f930389838e",
      "name": "Whisper Transcribe 2",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        224,
        304
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://10.5.30.6:4000/v1/chat/completions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "={{'Bearer ' + $env.LITELLM_API_KEY}}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"medium\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a meeting/audio note summarizer. Given a transcription, provide:\\n1. A brief summary (2-3 sentences)\\n2. Key points as a bullet list\\n3. Any action items mentioned\\n\\nRespond in JSON with keys: summary, key_points (array), action_items (array)\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize this transcription:\\n\\n{{ $json.text }}\"\n    }\n  ],\n  \"max_tokens\": 500,\n  \"temperature\": 0.2,\n  \"response_format\": { \"type\": \"json_object\" }\n}",
        "options": {}
      },
      "id": "66078f0a-2ed6-4f19-bbde-4ac186975bbb",
      "name": "AI Summarize Audio",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        448,
        304
      ]
    },
    {
      "parameters": {
        "jsCode": "const llmResponse = $input.first().json;\nconst transcript = $('Whisper Transcribe 2').first().json;\nlet analysis;\n\ntry {\n  analysis = JSON.parse(llmResponse.choices?.[0]?.message?.content || '{}');\n} catch(e) {\n  analysis = { summary: llmResponse.choices?.[0]?.message?.content || 'Summary failed', key_points: [], action_items: [] };\n}\n\nreturn [{\n  json: {\n    transcript: transcript.text || '',\n    duration_seconds: Math.round(transcript.duration || 0),\n    language: transcript.language || 'en',\n    summary: analysis.summary,\n    key_points: analysis.key_points || [],\n    action_items: analysis.action_items || []\n  }\n}];"
      },
      "id": "318664ee-dec9-4ed3-bb2b-65ae04f05119",
      "name": "Format Summary Response",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        672,
        304
      ]
    },
    {
      "parameters": {
        "jsCode": "const t = $input.first().json;\nconst mins = Math.floor(t.duration_seconds / 60);\nconst secs = t.duration_seconds % 60;\nreturn [{ json: {\n  title: '🎙️ Transcription Complete',\n  message: `Duration: ${mins}m ${secs}s · ${t.segment_count} segments · Language: ${t.language}`,\n  priority: 3\n}}];\n"
      },
      "id": "3d9e7895-5486-430d-a812-fe0eade6297e",
      "name": "Format Transcription Notify",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        672,
        0
      ]
    },
    {
      "parameters": {
        "message": "={{ $json.message }}",
        "additionalFields": {
          "priority": "={{ $json.priority }}",
          "title": "={{ $json.title }}"
        },
        "options": {
          "contentType": "text/plain"
        }
      },
      "id": "b84d1549-0675-4fc7-8c44-023e6bc59d57",
      "name": "Notify Transcription Done",
      "type": "n8n-nodes-base.gotify",
      "typeVersion": 1,
      "position": [
        896,
        0
      ],
      "credentials": {
        "gotifyApi": {
          "id": "MzvuWWDoIzIBNW5k",
          "name": "Whisper"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const t = $('Format Transcript').first().json;\nconst title = `Transcript ${new Date().toLocaleDateString('en-US')}`;\nconst content = `Transcript\\nDate: ${new Date().toISOString()}\\nDuration: ${t.duration_seconds}s\\nLanguage: ${t.language}\\n\\n${t.timestamped_text || t.text}`;\nreturn [{ binary: { document: { data: Buffer.from(content,'utf-8').toString('base64'), mimeType:'text/plain', fileName: `${title}.txt` }}, json: { title } }];\n"
      },
      "id": "f34ac00a-73fb-4bc9-80e2-cceff281f091",
      "name": "Prepare Transcript Doc",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1120,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://paperless.paccoco.com/api/documents/post_document/",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{'Bearer ' + $env.LITELLM_API_KEY}}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "document",
              "value": "data",
              "parameterType": "formBinaryData"
            },
            {
              "name": "title",
              "value": "={{ $json.title }}"
            },
            {
              "name": "tags[]",
              "value": "${PAPERLESS_TAG_TRANSCRIPTION}"
            }
          ]
        }
      },
      "id": "1ce7fdc1-ba26-4254-86ed-5042a05e665b",
      "name": "Save Transcript to Paperless",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1344,
        0
      ],
      "continueOnFail": true
    },
    {
      "parameters": {
        "jsCode": "const s = $input.first().json;\nconst mins = Math.floor(s.duration_seconds / 60);\nconst points = (s.key_points || []).slice(0,3).map((p,i) => `${i+1}. ${p}`).join('\\n');\nreturn [{ json: {\n  title: '🎙️ Transcription + Summary Complete',\n  message: `${mins}m audio\\n\\nSummary: ${s.summary}\\n\\nKey points:\\n${points}`,\n  priority: 4\n}}];\n"
      },
      "id": "da6d6f1d-6e61-4c20-a511-3c1e21f67722",
      "name": "Format Summary Notify",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        896,
        304
      ]
    },
    {
      "parameters": {
        "message": "={{ $json.message }}",
        "additionalFields": {
          "priority": "={{ $json.priority }}",
          "title": "={{ $json.title }}"
        },
        "options": {
          "contentType": "text/plain"
        }
      },
      "id": "9628d545-5a5a-4c83-95fa-9cceb63b9124",
      "name": "Notify Summary Done",
      "type": "n8n-nodes-base.gotify",
      "typeVersion": 1,
      "position": [
        1120,
        304
      ],
      "credentials": {
        "gotifyApi": {
          "id": "MzvuWWDoIzIBNW5k",
          "name": "Whisper"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const s = $('Format Summary Response').first().json;\nconst title = `Audio Summary ${new Date().toLocaleDateString('en-US')}`;\nconst points = (s.key_points || []).map((p,i) => `${i+1}. ${p}`).join('\\n');\nconst actions = (s.action_items || []).map((a,i) => `${i+1}. ${a}`).join('\\n');\nconst content = [\n  `Audio Transcription & Summary`, `Date: ${new Date().toISOString()}`,\n  `Duration: ${Math.floor(s.duration_seconds/60)}m ${s.duration_seconds%60}s`,\n  `Language: ${s.language}`, '', `Summary`, `=======`, s.summary,\n  '', `Key Points`, `==========`, points,\n  ...(actions ? ['', `Action Items`, `============`, actions] : []),\n  '', `Full Transcript`, `==============`, s.transcript\n].join('\\n');\nreturn [{ binary: { document: { data: Buffer.from(content,'utf-8').toString('base64'), mimeType:'text/plain', fileName:`${title}.txt` }}, json: { title } }];\n"
      },
      "id": "f3935208-9dcf-460a-99b1-d41df92ac6b3",
      "name": "Prepare Summary Doc",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1344,
        304
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://paperless.paccoco.com/api/documents/post_document/",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{'Bearer ' + $env.LITELLM_API_KEY}}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "document",
              "value": "data",
              "parameterType": "formBinaryData"
            },
            {
              "name": "title",
              "value": "={{ $json.title }}"
            },
            {
              "name": "tags[]",
              "value": "${PAPERLESS_TAG_TRANSCRIPTION}"
            }
          ]
        }
      },
      "id": "f4b94dc6-6cb3-4ad4-a390-3a8bd35daac2",
      "name": "Save Summary to Paperless",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1568,
        304
      ],
      "continueOnFail": true
    }
  ],
  "connections": {
    "Transcription Webhook": {
      "main": [
        [
          {
            "node": "Whisper Transcribe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Whisper Transcribe": {
      "main": [
        [
          {
            "node": "Format Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe + Summarize Webhook": {
      "main": [
        [
          {
            "node": "Whisper Transcribe 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Whisper Transcribe 2": {
      "main": [
        [
          {
            "node": "AI Summarize Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Summarize Audio": {
      "main": [
        [
          {
            "node": "Format Summary Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Transcript": {
      "main": [
        [
          {
            "node": "Format Transcription Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Transcription Notify": {
      "main": [
        [
          {
            "node": "Notify Transcription Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Transcription Done": {
      "main": [
        [
          {
            "node": "Prepare Transcript Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Transcript Doc": {
      "main": [
        [
          {
            "node": "Save Transcript to Paperless",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Summary Response": {
      "main": [
        [
          {
            "node": "Format Summary Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Summary Notify": {
      "main": [
        [
          {
            "node": "Notify Summary Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Summary Done": {
      "main": [
        [
          {
            "node": "Prepare Summary Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Summary Doc": {
      "main": [
        [
          {
            "node": "Save Summary to Paperless",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "pinData": {},
  "versionId": "81c25ef2-9dc3-4110-b1af-cd3b82056261",
  "activeVersionId": "81c25ef2-9dc3-4110-b1af-cd3b82056261",
  "versionCounter": 31,
  "triggerCount": 2,
  "shared": [
    {
      "updatedAt": "2026-05-09T22:31:02.480Z",
      "createdAt": "2026-05-09T22:31:02.480Z",
      "role": "workflow:owner",
      "workflowId": "9qfbZJJmSJqmg5sX",
      "projectId": "dxCRnBdX5uJizCGa",
      "project": {
        "updatedAt": "2026-05-06T01:10:37.484Z",
        "createdAt": "2026-05-06T01:08:07.721Z",
        "id": "dxCRnBdX5uJizCGa",
        "name": "Wilfred Fizzlepoof <admin@paccoco.com>",
        "type": "personal",
        "icon": null,
        "description": null,
        "creatorId": "47b2227f-2fc2-4a08-bd35-ea157b92df0d"
      }
    }
  ],
  "tags": [
    {
      "updatedAt": "2026-05-06T22:39:59.719Z",
      "createdAt": "2026-05-06T22:39:59.719Z",
      "id": "GLLrEIR8I7eA4ydv",
      "name": "transcription"
    },
    {
      "updatedAt": "2026-05-06T22:38:51.678Z",
      "createdAt": "2026-05-06T22:38:51.678Z",
      "id": "S9FxzVfHLsHmyzyt",
      "name": "ai"
    },
    {
      "updatedAt": "2026-05-06T22:39:59.716Z",
      "createdAt": "2026-05-06T22:39:59.716Z",
      "id": "tuPxDoKFqpVrrQoX",
      "name": "whisper"
    }
  ],
  "activeVersion": {
    "updatedAt": "2026-05-22T22:47:04.513Z",
    "createdAt": "2026-05-22T22:47:04.513Z",
    "versionId": "81c25ef2-9dc3-4110-b1af-cd3b82056261",
    "workflowId": "9qfbZJJmSJqmg5sX",
    "nodes": [
      {
        "parameters": {
          "httpMethod": "POST",
          "path": "transcribe",
          "responseMode": "lastNode",
          "responseData": "allEntries",
          "options": {
            "rawBody": true
          }
        },
        "id": "83da1668-bc21-4d8f-bf35-f0fbf45168c2",
        "name": "Transcription Webhook",
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          0,
          0
        ],
        "webhookId": "f50eec94-1e56-4189-88ee-51b701c1d889"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://10.5.30.6:8786/v1/audio/transcriptions",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Accept",
                "value": "application/json"
              }
            ]
          },
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "parameterType": "formBinaryData",
                "name": "file",
                "inputDataFieldName": "data"
              },
              {
                "name": "model",
                "value": "Systran/faster-whisper-large-v3"
              },
              {
                "name": "language",
                "value": "en"
              },
              {
                "name": "response_format",
                "value": "verbose_json"
              }
            ]
          },
          "options": {}
        },
        "id": "98a7fb4d-fd91-451d-b5d8-00e8382742ef",
        "name": "Whisper Transcribe",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          224,
          0
        ]
      },
      {
        "parameters": {
          "jsCode": "const result = $input.first().json;\n\nconst segments = result.segments || [];\nconst fullText = result.text || segments.map(s => s.text).join(' ');\nconst duration = result.duration || segments[segments.length - 1]?.end || 0;\n\n// Format timestamps\nconst timestamped = segments.map(s => {\n  const start = new Date(s.start * 1000).toISOString().substr(11, 8);\n  return `[${start}] ${s.text.trim()}`;\n}).join('\\n');\n\nreturn [{\n  json: {\n    text: fullText.trim(),\n    timestamped_text: timestamped,\n    duration_seconds: Math.round(duration),\n    segment_count: segments.length,\n    language: result.language || 'en'\n  }\n}];"
        },
        "id": "44c39528-48a3-4769-9f46-302b5a4a15e2",
        "name": "Format Transcript",
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          448,
          0
        ]
      },
      {
        "parameters": {
          "httpMethod": "POST",
          "path": "transcribe/summarize",
          "responseMode": "lastNode",
          "responseData": "allEntries",
          "options": {
            "rawBody": true
          }
        },
        "id": "5f400dfe-a426-4462-a7a8-62d6bd809d21",
        "name": "Transcribe + Summarize Webhook",
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          0,
          304
        ],
        "webhookId": "69b4b2e8-9486-4aa3-b9db-fb8e6bdae98e"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://10.5.30.6:8786/v1/audio/transcriptions",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Accept",
                "value": "application/json"
              }
            ]
          },
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "parameterType": "formBinaryData",
                "name": "file",
                "inputDataFieldName": "data"
              },
              {
                "name": "model",
                "value": "Systran/faster-whisper-large-v3"
              },
              {
                "name": "language",
                "value": "en"
              }
            ]
          },
          "options": {}
        },
        "id": "83ef29fb-596f-4621-9c3e-3f930389838e",
        "name": "Whisper Transcribe 2",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          224,
          304
        ]
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://10.5.30.6:4000/v1/chat/completions",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Content-Type",
                "value": "application/json"
              },
              {
                "name": "Authorization",
                "value": "={{'Bearer ' + $env.LITELLM_API_KEY}}"
              }
            ]
          },
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"model\": \"medium\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a meeting/audio note summarizer. Given a transcription, provide:\\n1. A brief summary (2-3 sentences)\\n2. Key points as a bullet list\\n3. Any action items mentioned\\n\\nRespond in JSON with keys: summary, key_points (array), action_items (array)\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize this transcription:\\n\\n{{ $json.text }}\"\n    }\n  ],\n  \"max_tokens\": 500,\n  \"temperature\": 0.2,\n  \"response_format\": { \"type\": \"json_object\" }\n}",
          "options": {}
        },
        "id": "66078f0a-2ed6-4f19-bbde-4ac186975bbb",
        "name": "AI Summarize Audio",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          448,
          304
        ]
      },
      {
        "parameters": {
          "jsCode": "const llmResponse = $input.first().json;\nconst transcript = $('Whisper Transcribe 2').first().json;\nlet analysis;\n\ntry {\n  analysis = JSON.parse(llmResponse.choices?.[0]?.message?.content || '{}');\n} catch(e) {\n  analysis = { summary: llmResponse.choices?.[0]?.message?.content || 'Summary failed', key_points: [], action_items: [] };\n}\n\nreturn [{\n  json: {\n    transcript: transcript.text || '',\n    duration_seconds: Math.round(transcript.duration || 0),\n    language: transcript.language || 'en',\n    summary: analysis.summary,\n    key_points: analysis.key_points || [],\n    action_items: analysis.action_items || []\n  }\n}];"
        },
        "id": "318664ee-dec9-4ed3-bb2b-65ae04f05119",
        "name": "Format Summary Response",
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          672,
          304
        ]
      },
      {
        "parameters": {
          "jsCode": "const t = $input.first().json;\nconst mins = Math.floor(t.duration_seconds / 60);\nconst secs = t.duration_seconds % 60;\nreturn [{ json: {\n  title: '🎙️ Transcription Complete',\n  message: `Duration: ${mins}m ${secs}s · ${t.segment_count} segments · Language: ${t.language}`,\n  priority: 3\n}}];\n"
        },
        "id": "3d9e7895-5486-430d-a812-fe0eade6297e",
        "name": "Format Transcription Notify",
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          672,
          0
        ]
      },
      {
        "parameters": {
          "message": "={{ $json.message }}",
          "additionalFields": {
            "priority": "={{ $json.priority }}",
            "title": "={{ $json.title }}"
          },
          "options": {
            "contentType": "text/plain"
          }
        },
        "id": "b84d1549-0675-4fc7-8c44-023e6bc59d57",
        "name": "Notify Transcription Done",
        "type": "n8n-nodes-base.gotify",
        "typeVersion": 1,
        "position": [
          896,
          0
        ],
        "credentials": {
          "gotifyApi": {
            "id": "MzvuWWDoIzIBNW5k",
            "name": "Whisper"
          }
        }
      },
      {
        "parameters": {
          "jsCode": "const t = $('Format Transcript').first().json;\nconst title = `Transcript ${new Date().toLocaleDateString('en-US')}`;\nconst content = `Transcript\\nDate: ${new Date().toISOString()}\\nDuration: ${t.duration_seconds}s\\nLanguage: ${t.language}\\n\\n${t.timestamped_text || t.text}`;\nreturn [{ binary: { document: { data: Buffer.from(content,'utf-8').toString('base64'), mimeType:'text/plain', fileName: `${title}.txt` }}, json: { title } }];\n"
        },
        "id": "f34ac00a-73fb-4bc9-80e2-cceff281f091",
        "name": "Prepare Transcript Doc",
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          1120,
          0
        ]
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://paperless.paccoco.com/api/documents/post_document/",
          "options": {},
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Authorization",
                "value": "={{'Bearer ' + $env.LITELLM_API_KEY}}"
              }
            ]
          },
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "name": "document",
                "value": "data",
                "parameterType": "formBinaryData"
              },
              {
                "name": "title",
                "value": "={{ $json.title }}"
              },
              {
                "name": "tags[]",
                "value": "${PAPERLESS_TAG_TRANSCRIPTION}"
              }
            ]
          }
        },
        "id": "1ce7fdc1-ba26-4254-86ed-5042a05e665b",
        "name": "Save Transcript to Paperless",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1344,
          0
        ],
        "continueOnFail": true
      },
      {
        "parameters": {
          "jsCode": "const s = $input.first().json;\nconst mins = Math.floor(s.duration_seconds / 60);\nconst points = (s.key_points || []).slice(0,3).map((p,i) => `${i+1}. ${p}`).join('\\n');\nreturn [{ json: {\n  title: '🎙️ Transcription + Summary Complete',\n  message: `${mins}m audio\\n\\nSummary: ${s.summary}\\n\\nKey points:\\n${points}`,\n  priority: 4\n}}];\n"
        },
        "id": "da6d6f1d-6e61-4c20-a511-3c1e21f67722",
        "name": "Format Summary Notify",
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          896,
          304
        ]
      },
      {
        "parameters": {
          "message": "={{ $json.message }}",
          "additionalFields": {
            "priority": "={{ $json.priority }}",
            "title": "={{ $json.title }}"
          },
          "options": {
            "contentType": "text/plain"
          }
        },
        "id": "9628d545-5a5a-4c83-95fa-9cceb63b9124",
        "name": "Notify Summary Done",
        "type": "n8n-nodes-base.gotify",
        "typeVersion": 1,
        "position": [
          1120,
          304
        ],
        "credentials": {
          "gotifyApi": {
            "id": "MzvuWWDoIzIBNW5k",
            "name": "Whisper"
          }
        }
      },
      {
        "parameters": {
          "jsCode": "const s = $('Format Summary Response').first().json;\nconst title = `Audio Summary ${new Date().toLocaleDateString('en-US')}`;\nconst points = (s.key_points || []).map((p,i) => `${i+1}. ${p}`).join('\\n');\nconst actions = (s.action_items || []).map((a,i) => `${i+1}. ${a}`).join('\\n');\nconst content = [\n  `Audio Transcription & Summary`, `Date: ${new Date().toISOString()}`,\n  `Duration: ${Math.floor(s.duration_seconds/60)}m ${s.duration_seconds%60}s`,\n  `Language: ${s.language}`, '', `Summary`, `=======`, s.summary,\n  '', `Key Points`, `==========`, points,\n  ...(actions ? ['', `Action Items`, `============`, actions] : []),\n  '', `Full Transcript`, `==============`, s.transcript\n].join('\\n');\nreturn [{ binary: { document: { data: Buffer.from(content,'utf-8').toString('base64'), mimeType:'text/plain', fileName:`${title}.txt` }}, json: { title } }];\n"
        },
        "id": "f3935208-9dcf-460a-99b1-d41df92ac6b3",
        "name": "Prepare Summary Doc",
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          1344,
          304
        ]
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://paperless.paccoco.com/api/documents/post_document/",
          "options": {},
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Authorization",
                "value": "={{'Bearer ' + $env.LITELLM_API_KEY}}"
              }
            ]
          },
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "name": "document",
                "value": "data",
                "parameterType": "formBinaryData"
              },
              {
                "name": "title",
                "value": "={{ $json.title }}"
              },
              {
                "name": "tags[]",
                "value": "${PAPERLESS_TAG_TRANSCRIPTION}"
              }
            ]
          }
        },
        "id": "f4b94dc6-6cb3-4ad4-a390-3a8bd35daac2",
        "name": "Save Summary to Paperless",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1568,
          304
        ],
        "continueOnFail": true
      }
    ],
    "connections": {
      "Transcription Webhook": {
        "main": [
          [
            {
              "node": "Whisper Transcribe",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Whisper Transcribe": {
        "main": [
          [
            {
              "node": "Format Transcript",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Transcribe + Summarize Webhook": {
        "main": [
          [
            {
              "node": "Whisper Transcribe 2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Whisper Transcribe 2": {
        "main": [
          [
            {
              "node": "AI Summarize Audio",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "AI Summarize Audio": {
        "main": [
          [
            {
              "node": "Format Summary Response",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Format Transcript": {
        "main": [
          [
            {
              "node": "Format Transcription Notify",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Format Transcription Notify": {
        "main": [
          [
            {
              "node": "Notify Transcription Done",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Notify Transcription Done": {
        "main": [
          [
            {
              "node": "Prepare Transcript Doc",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Prepare Transcript Doc": {
        "main": [
          [
            {
              "node": "Save Transcript to Paperless",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Format Summary Response": {
        "main": [
          [
            {
              "node": "Format Summary Notify",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Format Summary Notify": {
        "main": [
          [
            {
              "node": "Notify Summary Done",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Notify Summary Done": {
        "main": [
          [
            {
              "node": "Prepare Summary Doc",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Prepare Summary Doc": {
        "main": [
          [
            {
              "node": "Save Summary to Paperless",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "authors": "Wilfred Fizzlepoof",
    "name": null,
    "description": null,
    "autosaved": false,
    "workflowPublishHistory": [
      {
        "createdAt": "2026-05-22T22:47:04.563Z",
        "id": 343,
        "workflowId": "9qfbZJJmSJqmg5sX",
        "versionId": "81c25ef2-9dc3-4110-b1af-cd3b82056261",
        "event": "deactivated",
        "userId": "47b2227f-2fc2-4a08-bd35-ea157b92df0d"
      },
      {
        "createdAt": "2026-05-22T22:47:04.608Z",
        "id": 344,
        "workflowId": "9qfbZJJmSJqmg5sX",
        "versionId": "81c25ef2-9dc3-4110-b1af-cd3b82056261",
        "event": "activated",
        "userId": "47b2227f-2fc2-4a08-bd35-ea157b92df0d"
      }
    ]
  }
}
