{
  "id": "nZo3Zlr8pv4jIV0Q",
  "name": "cos2-voice-to-lab-ai CORRECTED",
  "nodes": [
    {
      "parameters": {
        "jsCode": "const b = $input.first().json.body ?? $input.first().json;\nlet fileIds = b.file_ids ?? [];\nif (typeof fileIds === 'string') fileIds = fileIds.split(',').map(s=>s.trim()).filter(Boolean);\nreturn [{ json: {\n  user_id: b.user_id ?? '',\n  user_name: b.user_name ?? '',\n  channel_id: b.channel_id ?? '',\n  text: b.text ?? '',\n  post_id: b.post_id ?? '',\n  file_ids: fileIds,\n  first_file_id: fileIds[0] ?? '',\n  is_voice: fileIds.length > 0,\n  is_from_bot: b.user_id === $env.MATTERMOST_BOT_USER_ID\n}}];"
      },
      "id": "264f109c-bfe8-408a-a2cd-d06b5742adf0",
      "name": "Parse payload",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        432,
        480
      ],
      "disabled": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f15b9dfa-b18f-4417-92a6-5bd63c64e719",
              "leftValue": "={{ $json.is_from_bot }}",
              "rightValue": false,
              "operator": {
                "type": "boolean",
                "operation": "false"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "05addf38-087d-4144-8d17-9f1ddbb175df",
      "name": "Not from bot?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        656,
        480
      ],
      "disabled": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f4bddf8b-057a-4a62-a3fa-0dbb6b45e2fa",
              "leftValue": "={{ $json.is_voice }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "true"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "ec72b1a2-485c-4cb4-8ef7-91f0787843df",
      "name": "Is voice?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        880,
        480
      ],
      "disabled": true
    },
    {
      "parameters": {
        "url": "={{ $env.MATTERMOST_BASE_URL }}/api/v4/files/{{ $json.first_file_id }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.MATTERMOST_BOT_TOKEN }}"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "id": "f4fd6328-af16-4a9f-92a1-8cf66ac9bd4c",
      "name": "Fetch audio",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1088,
        336
      ],
      "disabled": true
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.groq.com/openai/v1/audio/transcriptions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.GROQ_API_KEY }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "whisper-large-v3"
            },
            {
              "name": "response_format",
              "value": "json"
            },
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {
          "timeout": 45000
        }
      },
      "id": "4b92209e-5317-43b4-8bc4-19f9559e0b38",
      "name": "Whisper transcribe",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1312,
        336
      ],
      "disabled": true,
      "notes": "Groq Whisper large-v3: ~265x realtime, English+German+many others."
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "53f059e4-84ee-4673-b679-f725667b6a9c",
              "name": "transcript",
              "value": "={{ $json.text }}",
              "type": "string"
            },
            {
              "id": "636d0114-411c-47d8-9d02-918ffda1e69d",
              "name": "channel_id",
              "value": "={{ $('Parse payload').first().json.channel_id }}",
              "type": "string"
            },
            {
              "id": "65a7b86e-5af1-4a4e-954a-4daad89c1e2f",
              "name": "source",
              "value": "voice \u00b7 whisper-large-v3",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "019870f6-e16b-4a8a-a4f6-b4a64bcf543e",
      "name": "Transcript (voice)",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1536,
        336
      ],
      "disabled": true
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a72df01f-73b2-4697-bc17-d83b4519645a",
              "name": "transcript",
              "value": "={{ $json.text }}",
              "type": "string"
            },
            {
              "id": "410e545b-9c43-43e5-84c9-586fb7aa60c5",
              "name": "channel_id",
              "value": "={{ $json.channel_id }}",
              "type": "string"
            },
            {
              "id": "76536c5e-67c2-4966-b7c9-ea611378796f",
              "name": "source",
              "value": "text",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "486d1d0e-13f8-4381-9f0c-b771f40b9d2c",
      "name": "Transcript (text)",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1088,
        608
      ],
      "disabled": true
    },
    {
      "parameters": {},
      "id": "a2e7de05-4810-45d4-ab51-b432193b6044",
      "name": "Merge branches",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        1760,
        480
      ],
      "disabled": true
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.transcript }}",
        "options": {
          "systemMessage": "You are the COS Lab AI assistant, a helpful AI agent for master's and PhD students in molecular biology, chemistry, and lab sciences at Heidelberg University. Your replies land back in a Mattermost channel, so treat messages as short chat turns rather than essays.\n\nRULES:\n- Be concise. 2-5 sentences for simple questions; short bullet lists for procedures. Never pad.\n- If the input looks like transcribed speech (messy punctuation, repeated words, half-sentences), infer the intent charitably and answer the underlying question.\n- If a claim depends on current events, specific publications after 2024, or unverified experimental results, flag the uncertainty in one short sentence at the end.\n- Default language: English. If the user writes or speaks in German, reply in German.\n- Refuse clinical advice, dosing recommendations, and anything outside academic molecular-biology/chemistry/lab scope \u2014 say so briefly and suggest who to ask.\n- You have short-term memory (last few turns in this channel). Use it to resolve pronouns and follow-ups; do not invent prior context that isn't there."
        }
      },
      "id": "6f77c968-02ad-4cb5-b3e8-971a9ccb4146",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        1984,
        480
      ],
      "disabled": true
    },
    {
      "parameters": {
        "model": "openai/gpt-oss-120b",
        "options": {
          "temperature": 0.3
        }
      },
      "id": "11c3e006-47a0-4468-bb2a-e37d28217748",
      "name": "Groq gpt-oss-120b",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "typeVersion": 1,
      "position": [
        1760,
        80
      ],
      "credentials": {
        "groqApi": {
          "id": "groq-shared-cred",
          "name": "Groq (shared, students)"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('When chat message received').item.json.sessionId }}",
        "contextWindowLength": 8
      },
      "id": "732af36c-4d07-4039-88e2-882962312ddf",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        2144,
        720
      ],
      "disabled": true
    },
    {
      "parameters": {
        "jsCode": "const out = $input.first().json;\n// AI Agent returns the reply on .output\nconst answer = out?.output ?? out?.text ?? '(Lab AI returned no content)';\nconst ctx = $('Merge branches').first().json;\nconst transcript = ctx.transcript ?? '';\nconst channel_id = ctx.channel_id ?? '';\nconst source = ctx.source ?? 'text';\nconst reply = '> **Input (' + source + '):** ' + transcript + '\\n\\n' + answer;\nreturn [{ json: { channel_id, reply } }];\n"
      },
      "id": "2335d10f-1282-4401-906b-4ba3abe764b5",
      "name": "Format reply",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2336,
        480
      ],
      "disabled": true
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.MATTERMOST_BASE_URL }}/api/v4/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.MATTERMOST_BOT_TOKEN }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={ \"channel_id\": \"{{ $json.channel_id }}\", \"message\": {{ JSON.stringify($json.reply) }} }",
        "options": {}
      },
      "id": "33d5f4be-589c-4d95-acad-440660f5029e",
      "name": "Post to Mattermost",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2560,
        480
      ],
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "6cd550f0-c712-4e2c-8d31-e2c4a6f06da3",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        96,
        -176
      ],
      "webhookId": "bf18f939-9cce-4824-88ac-ebc475689ad0"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.transcript }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        2000,
        736
      ],
      "id": "249bff70-225c-40e6-85c9-6608bcbe9f40",
      "name": "Simple Memory1",
      "disabled": true
    },
    {
      "parameters": {
        "jsCode": "const b = $input.first().json.body ?? $input.first().json;\nlet fileIds = b.file_ids ?? [];\nif (typeof fileIds === 'string') fileIds = fileIds.split(',').map(s=>s.trim()).filter(Boolean);\nconst botUserId = $env.MATTERMOST_BOT_USER_ID ?? '';\nreturn [{ json: {\n  user_id: b.user_id ?? '',\n  user_name: b.user_name ?? '',\n  channel_id: b.channel_id ?? '',\n  text: b.text ?? '',\n  post_id: b.post_id ?? '',\n  file_ids: fileIds,\n  first_file_id: fileIds[0] ?? '',\n  is_voice: fileIds.length > 0,\n  is_from_bot: b.user_id === botUserId\n}}];"
      },
      "id": "a283a467-c4db-4ac1-a193-f1de4977eca9",
      "name": "Parse payload1",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        336,
        -176
      ],
      "disabled": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f15b9dfa-b18f-4417-92a6-5bd63c64e719",
              "leftValue": "={{ $json.is_from_bot }}",
              "rightValue": false,
              "operator": {
                "type": "boolean",
                "operation": "false"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "77a0c5e4-dea0-4393-b26e-411f6b6ed987",
      "name": "Not from bot?1",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        560,
        -176
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f4bddf8b-057a-4a62-a3fa-0dbb6b45e2fa",
              "leftValue": "={{ $json.is_voice }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "true"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "a29b8aa4-1e89-4374-bfdd-fba40dd5f1df",
      "name": "Is voice?1",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        784,
        -176
      ]
    },
    {
      "parameters": {
        "url": "={{ $env.MATTERMOST_BASE_URL }}/api/v4/files/{{ $json.first_file_id }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.MATTERMOST_BOT_TOKEN }}"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "id": "c1da0582-eb12-4636-9bdb-b651639afb98",
      "name": "Fetch audio1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1008,
        -272
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.groq.com/openai/v1/audio/transcriptions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.GROQ_API_KEY }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "whisper-large-v3"
            },
            {
              "name": "response_format",
              "value": "json"
            },
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {
          "timeout": 45000
        }
      },
      "id": "b6e1f684-e837-4fde-aeb1-fc507f84211e",
      "name": "Whisper transcribe1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1232,
        -272
      ],
      "notes": "Groq Whisper large-v3: ~265x realtime, English+German+many others."
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "53f059e4-84ee-4673-b679-f725667b6a9c",
              "name": "transcript",
              "value": "={{ $json.text }}",
              "type": "string"
            },
            {
              "id": "636d0114-411c-47d8-9d02-918ffda1e69d",
              "name": "channel_id",
              "value": "={{ $('Parse payload1').first().json.channel_id }}",
              "type": "string"
            },
            {
              "id": "65a7b86e-5af1-4a4e-954a-4daad89c1e2f",
              "name": "source",
              "value": "voice \u00b7 whisper-large-v3",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "a4057b28-2dc2-4d2c-9cf9-ddbb72456bb3",
      "name": "Transcript (voice)1",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1456,
        -272
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a72df01f-73b2-4697-bc17-d83b4519645a",
              "name": "transcript",
              "value": "={{ $json.text }}",
              "type": "string"
            },
            {
              "id": "410e545b-9c43-43e5-84c9-586fb7aa60c5",
              "name": "channel_id",
              "value": "={{ $json.channel_id }}",
              "type": "string"
            },
            {
              "id": "76536c5e-67c2-4966-b7c9-ea611378796f",
              "name": "source",
              "value": "text",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "d029346f-c480-433c-94d1-0d1bbda75c6e",
      "name": "Transcript (text)1",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1456,
        -80
      ]
    },
    {
      "parameters": {},
      "id": "69277841-2e2e-44a4-8ce1-1b98b081c927",
      "name": "Merge branches1",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        1680,
        -176
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.transcript }}",
        "options": {
          "systemMessage": "You are the COS Lab AI assistant, a helpful AI agent for master's and PhD students in molecular biology, chemistry, and lab sciences at Heidelberg University. Your replies land back in a Mattermost channel, so treat messages as short chat turns rather than essays.\n\nRULES:\n- Be concise. 2-5 sentences for simple questions; short bullet lists for procedures. Never pad.\n- If the input looks like transcribed speech (messy punctuation, repeated words, half-sentences), infer the intent charitably and answer the underlying question.\n- If a claim depends on current events, specific publications after 2024, or unverified experimental results, flag the uncertainty in one short sentence at the end.\n- Default language: English. If the user writes or speaks in German, reply in German.\n- Refuse clinical advice, dosing recommendations, and anything outside academic molecular-biology/chemistry/lab scope \u2014 say so briefly and suggest who to ask.\n- You have short-term memory (last few turns in this channel). Use it to resolve pronouns and follow-ups; do not invent prior context that isn't there."
        }
      },
      "id": "35a51b7e-a5ac-445e-9c72-43eede5a33f4",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        1904,
        -176
      ]
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('When chat message received').item.json.sessionId }}",
        "contextWindowLength": 8
      },
      "id": "41836a7f-5235-499a-bc99-4bbb653038f2",
      "name": "Simple Memory2",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        2016,
        80
      ]
    },
    {
      "parameters": {
        "jsCode": "const out = $input.first().json;\n// AI Agent returns the reply on .output\nconst answer = out?.output ?? out?.text ?? '(Lab AI returned no content)';\nconst ctx = $('Merge branches1').first().json;\nconst transcript = ctx.transcript ?? '';\nconst channel_id = ctx.channel_id ?? '';\nconst source = ctx.source ?? 'text';\nconst reply = '> **Input (' + source + '):** ' + transcript + '\\n\\n' + answer;\nreturn [{ json: { channel_id, reply } }];\n"
      },
      "id": "1aa64928-05c8-4af8-a0c6-a364f1b146a9",
      "name": "Format reply1",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2256,
        -176
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.MATTERMOST_BASE_URL }}/api/v4/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.MATTERMOST_BOT_TOKEN }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={ \"channel_id\": \"{{ $json.channel_id }}\", \"message\": {{ JSON.stringify($json.reply) }} }",
        "options": {}
      },
      "id": "a5331d70-a7c4-4646-9b3a-e11749d9ccd7",
      "name": "Post to Mattermost1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2480,
        -176
      ]
    },
    {
      "parameters": {
        "content": "## old version - the ai agent node was outdated :-( \n\n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/components/sticky-notes/)",
        "height": 576,
        "width": 2512
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        304
      ],
      "typeVersion": 1,
      "id": "aec50bd8-14ef-4009-824b-d880aaaa9364",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## see variable here\n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/components/sticky-notes/)",
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2224,
        48
      ],
      "typeVersion": 1,
      "id": "fa42459d-6a1b-4d93-ab93-8ec9e7975094",
      "name": "Sticky Note2"
    }
  ],
  "connections": {
    "Parse payload": {
      "main": [
        [
          {
            "node": "Not from bot?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Not from bot?": {
      "main": [
        [
          {
            "node": "Is voice?",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Is voice?": {
      "main": [
        [
          {
            "node": "Fetch audio",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Transcript (text)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch audio": {
      "main": [
        [
          {
            "node": "Whisper transcribe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Whisper transcribe": {
      "main": [
        [
          {
            "node": "Transcript (voice)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcript (voice)": {
      "main": [
        [
          {
            "node": "Merge branches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcript (text)": {
      "main": [
        [
          {
            "node": "Merge branches",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge branches": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq gpt-oss-120b": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        []
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Format reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format reply": {
      "main": [
        [
          {
            "node": "Post to Mattermost",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Parse payload1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Parse payload1": {
      "main": [
        [
          {
            "node": "Not from bot?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Not from bot?1": {
      "main": [
        [
          {
            "node": "Is voice?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is voice?1": {
      "main": [
        [
          {
            "node": "Fetch audio1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Transcript (text)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch audio1": {
      "main": [
        [
          {
            "node": "Whisper transcribe1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Whisper transcribe1": {
      "main": [
        [
          {
            "node": "Transcript (voice)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcript (voice)1": {
      "main": [
        [
          {
            "node": "Merge branches1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcript (text)1": {
      "main": [
        [
          {
            "node": "Merge branches1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge branches1": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Format reply1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory2": {
      "ai_memory": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Format reply1": {
      "main": [
        [
          {
            "node": "Post to Mattermost1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "staticData": null,
  "pinData": {}
}