{
  "name": "Faktury – příjem, AI vytěžení a zápis (ukázka)",
  "nodes": [
    {
      "parameters": {
        "content": "## Ukázka – fiktivní firma\n**Příjem faktur e-mailem → AI vytěžení → kontrola → Google Sheets**\n\nPřístupy a ID jsou placeholdery `DOPLNIT`. Fiktivní testovací IČO 12345678 a 87654321 neprojdou kontrolou mod 11 – jsou povolené v seznamu výjimek v uzlu „Kontrola faktury“. Naostro seznam vyprázdněte.",
        "height": 220,
        "width": 520,
        "color": "5"
      },
      "id": "a82fb1bb-617b-5a4c-8371-5c6e13a50cc6",
      "name": "Poznámka – ukázka",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -260,
        -260
      ]
    },
    {
      "parameters": {
        "mailbox": "INBOX",
        "postProcessAction": "read",
        "format": "resolved",
        "dataPropertyAttachmentsPrefixName": "attachment_",
        "options": {
          "customEmailConfig": "[\"UNSEEN\"]"
        }
      },
      "id": "c5a5f142-48bc-524a-affb-4949f0d41df6",
      "name": "Nový e-mail s fakturou (IMAP)",
      "type": "n8n-nodes-base.emailReadImap",
      "typeVersion": 2.2,
      "position": [
        0,
        0
      ],
      "credentials": {
        "imap": {
          "id": "DOPLNIT",
          "name": "IMAP – schránka faktury@DOPLNIT"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Z každého e-mailu vybere PDF přílohy, jedna příloha = jedna položka\n// (Run Once for All Items). Přílohy z IMAP jsou v binary.attachment_0, attachment_1…\nconst vystup = [];\n$input.all().forEach((item, index) => {\n  const prilohy = item.binary || {};\n  const od = item.json.from;\n  const odesilatel = typeof od === 'object' && od !== null ? od.text || '' : String(od || '');\n  for (const soubor of Object.values(prilohy)) {\n    const jePdf = soubor.mimeType === 'application/pdf' || /\\.pdf$/i.test(soubor.fileName || '');\n    if (!jePdf) continue;\n    vystup.push({\n      json: {\n        odesilatel,\n        predmet: item.json.subject || '',\n        prijato: item.json.date ? new Date(item.json.date).toISOString() : new Date().toISOString(),\n        soubor: soubor.fileName || 'faktura.pdf',\n      },\n      binary: { data: soubor },\n      pairedItem: { item: index },\n    });\n  }\n});\n// E-mail bez PDF se tiše přeskočí.\nreturn vystup;\n"
      },
      "id": "6aeb6253-7399-5482-82f0-a024f8db63a0",
      "name": "Rozdělit PDF přílohy",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "operation": "pdf",
        "binaryPropertyName": "data",
        "options": {
          "joinPages": true
        }
      },
      "id": "c4e8c9aa-cf7f-518b-a3a8-c3835da0c7a5",
      "name": "Text z PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1.2,
      "position": [
        440,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Vytěž údaje z této faktury (soubor {{ $('Rozdělit PDF přílohy').item.json.soubor }}):\n\n{{ ($json.text || '').slice(0, 15000) }}",
        "hasOutputParser": true,
        "messages": {
          "messageValues": [
            {
              "type": "SystemMessagePromptTemplate",
              "message": "Jsi AI asistent pro vytěžování přijatých faktur. Dostaneš text z PDF faktury v češtině.\nVrať POUZE údaje, které v textu skutečně jsou. Nic nedomýšlej a nedopočítávej.\nPravidla:\n- dodavatel = firma, která fakturu VYSTAVILA (ne odběratel). IČO a DIČ ber také od dodavatele.\n- ico: jen číslice bez mezer. dic: např. CZ12345678.\n- data převeď na RRRR-MM-DD (např. „28. 11. 2026“ → „2026-11-28“).\n- částky jako čísla s desetinnou tečkou, bez mezer a bez měny (např. „7 139,00 Kč“ → 7139.00).\n- castka_bez_dph = základ daně celkem, dph = DPH celkem, castka_celkem = celkem k úhradě.\n- mena: ISO kód (Kč → CZK).\n- Když údaj chybí nebo si nejsi jistý, dej null."
            }
          ]
        },
        "batching": {
          "batchSize": 1,
          "delayBetweenBatches": 0
        }
      },
      "id": "76c23992-6d49-53b5-812d-03cc2a78a8bf",
      "name": "AI vytěžení údajů",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        660,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-4.1-mini"
        },
        "responsesApiEnabled": false,
        "options": {
          "temperature": 0,
          "maxRetries": 2
        }
      },
      "id": "02e61673-9cb8-58b4-a28a-fd10cbc91eb0",
      "name": "OpenAI model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        600,
        220
      ],
      "credentials": {
        "openAiApi": {
          "id": "DOPLNIT",
          "name": "OpenAI – účet klienta"
        }
      }
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"dodavatel\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ],\n      \"description\": \"Obchodní název dodavatele (vystavitele faktury)\"\n    },\n    \"ico\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ],\n      \"description\": \"IČO dodavatele, jen číslice\"\n    },\n    \"dic\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ],\n      \"description\": \"DIČ dodavatele, např. CZ12345678\"\n    },\n    \"cislo_faktury\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ]\n    },\n    \"variabilni_symbol\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ],\n      \"description\": \"Jen číslice\"\n    },\n    \"datum_vystaveni\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ],\n      \"description\": \"RRRR-MM-DD\"\n    },\n    \"datum_splatnosti\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ],\n      \"description\": \"RRRR-MM-DD\"\n    },\n    \"castka_bez_dph\": {\n      \"type\": [\n        \"number\",\n        \"null\"\n      ]\n    },\n    \"dph\": {\n      \"type\": [\n        \"number\",\n        \"null\"\n      ]\n    },\n    \"castka_celkem\": {\n      \"type\": [\n        \"number\",\n        \"null\"\n      ]\n    },\n    \"mena\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ],\n      \"description\": \"ISO kód, např. CZK nebo EUR\"\n    }\n  },\n  \"required\": [\n    \"dodavatel\",\n    \"ico\",\n    \"dic\",\n    \"cislo_faktury\",\n    \"variabilni_symbol\",\n    \"datum_vystaveni\",\n    \"datum_splatnosti\",\n    \"castka_bez_dph\",\n    \"dph\",\n    \"castka_celkem\",\n    \"mena\"\n  ],\n  \"additionalProperties\": false\n}"
      },
      "id": "911ebece-9d0f-52fd-bd6d-270fa7db05ed",
      "name": "Striktní JSON",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        780,
        220
      ]
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Kontrola vytěžené faktury (režim: Run Once for Each Item)\n// Vstup: $json.output = JSON z AI (Structured Output Parser)\n// Výstup: řádek pro Google Sheets + stav „zpracováno“ / „ke kontrole“\n\n// Fiktivní testovací IČO ze zadání neprojdou kontrolním součtem mod 11.\n// Povolujeme je výjimkou. Naostro tento seznam vyprázdněte.\nconst VYJIMKY_ICO = ['12345678', '87654321'];\n// Tolerance pro kontrolu „bez DPH + DPH = celkem“ (v jednotkách měny)\nconst TOLERANCE = { CZK: 1 };\nconst TOLERANCE_JINA_MENA = 0.05;\n\nconst ai = $json.output || {};\nconst meta = $('Rozdělit PDF přílohy').item.json;\nconst duvody = [];   // chyby → stav „ke kontrole“\nconst poznamky = []; // jen informace, stav nemění\n\n// --- pomocné funkce ---\nfunction text(v) {\n  return v === null || v === undefined ? '' : String(v).trim();\n}\n\nfunction cislo(v) {\n  if (typeof v === 'number') return Number.isFinite(v) ? v : null;\n  const s = text(v).replace(/\\s| |Kč|CZK|EUR/gi, '').replace(',', '.');\n  if (s === '') return null;\n  const n = Number(s);\n  return Number.isFinite(n) ? n : null;\n}\n\n// IČO: 8 číslic, váhy 8..2, kontrolní číslice = (11 - součet mod 11) mod 10\nfunction icoKontrolniSoucetOk(ico) {\n  let soucet = 0;\n  for (let i = 0; i < 7; i++) soucet += Number(ico[i]) * (8 - i);\n  const zbytek = soucet % 11;\n  const kontrolni = (11 - zbytek) % 10; // zbytek 0 → 1, zbytek 1 → 0\n  return kontrolni === Number(ico[7]);\n}\n\n// Datum ve tvaru RRRR-MM-DD, které skutečně existuje\nfunction platneDatum(s) {\n  const m = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(text(s));\n  if (!m) return null;\n  const d = new Date(Date.UTC(+m[1], +m[2] - 1, +m[3]));\n  if (d.getUTCFullYear() !== +m[1] || d.getUTCMonth() !== +m[2] - 1 || d.getUTCDate() !== +m[3]) return null;\n  return d;\n}\n\n// --- 1) povinné údaje ---\nconst dodavatel = text(ai.dodavatel);\nconst cisloFaktury = text(ai.cislo_faktury);\nif (!dodavatel) duvody.push('Chybí název dodavatele.');\nif (!cisloFaktury) duvody.push('Chybí číslo faktury.');\n\n// --- 2) IČO ---\nlet ico = text(ai.ico).replace(/\\s/g, '');\nif (/^\\d{1,7}$/.test(ico)) ico = ico.padStart(8, '0'); // starší IČO bývají kratší\nif (!/^\\d{8}$/.test(ico)) {\n  duvody.push(`IČO „${ico || '–'}“ nemá 8 číslic.`);\n} else if (!icoKontrolniSoucetOk(ico)) {\n  if (VYJIMKY_ICO.includes(ico)) {\n    poznamky.push(`IČO ${ico} neprošlo kontrolním součtem, je ale na seznamu výjimek (testovací data).`);\n  } else {\n    duvody.push(`IČO ${ico} neprošlo kontrolním součtem (mod 11).`);\n  }\n}\n\n// --- 3) DIČ (nepovinné, ale když je, musí mít správný tvar) ---\nconst dic = text(ai.dic).replace(/\\s/g, '').toUpperCase();\nif (dic) {\n  if (!/^CZ\\d{8,10}$/.test(dic)) {\n    duvody.push(`DIČ „${dic}“ nemá tvar CZ + 8 až 10 číslic.`);\n  } else if (dic.length === 10 && /^\\d{8}$/.test(ico) && dic !== 'CZ' + ico) {\n    duvody.push(`DIČ ${dic} neodpovídá IČO ${ico}.`);\n  }\n}\n\n// --- 4) variabilní symbol ---\nconst vs = text(ai.variabilni_symbol).replace(/\\s/g, '');\nif (!vs) poznamky.push('Variabilní symbol na faktuře není.');\nelse if (!/^\\d{1,10}$/.test(vs)) duvody.push(`Variabilní symbol „${vs}“ není 1–10 číslic.`);\n\n// --- 5) částky ---\nconst mena = (text(ai.mena) || 'CZK').toUpperCase();\nconst bezDph = cislo(ai.castka_bez_dph);\nconst dph = cislo(ai.dph);\nconst celkem = cislo(ai.castka_celkem);\nif (celkem === null) duvody.push('Chybí celková částka.');\nif (bezDph === null || dph === null) {\n  duvody.push('Chybí částka bez DPH nebo DPH – součet nelze ověřit.');\n} else if (celkem !== null) {\n  const tolerance = TOLERANCE[mena] ?? TOLERANCE_JINA_MENA;\n  const rozdil = Math.abs(bezDph + dph - celkem);\n  if (rozdil > tolerance) {\n    duvody.push(`Bez DPH (${bezDph}) + DPH (${dph}) ≠ celkem (${celkem}), rozdíl ${rozdil.toFixed(2)} ${mena}.`);\n  }\n  if (bezDph > 0) {\n    const sazba = dph / bezDph;\n    const zname = [0, 0.12, 0.21];\n    if (!zname.some((s) => Math.abs(sazba - s) < 0.005)) {\n      poznamky.push(`DPH odpovídá sazbě ${(sazba * 100).toFixed(1)} % – možná více sazeb na jedné faktuře.`);\n    }\n  }\n}\nif (!/^[A-Z]{3}$/.test(mena)) duvody.push(`Měna „${mena}“ není třípísmenný kód.`);\n\n// --- 6) data ---\nconst vystaveno = platneDatum(ai.datum_vystaveni);\nconst splatnost = platneDatum(ai.datum_splatnosti);\nif (!vystaveno) duvody.push(`Datum vystavení „${text(ai.datum_vystaveni) || '–'}“ není platné datum.`);\nif (!splatnost) {\n  duvody.push(`Datum splatnosti „${text(ai.datum_splatnosti) || '–'}“ není platné datum.`);\n} else if (vystaveno) {\n  const dny = Math.round((splatnost - vystaveno) / 86400000);\n  if (dny < 0) duvody.push('Datum splatnosti je dřív než datum vystavení.');\n  else if (dny > 120) duvody.push(`Splatnost ${dny} dní je neobvykle dlouhá.`);\n}\n\nconst stav = duvody.length ? 'ke kontrole' : 'zpracováno';\n\nreturn {\n  json: {\n    'Klíč': `${ico || 'bez-ico'}|${cisloFaktury || meta.soubor}`,\n    'Přijato': meta.prijato,\n    'Odesílatel': meta.odesilatel,\n    'Soubor': meta.soubor,\n    'Dodavatel': dodavatel,\n    'IČO': ico,\n    'DIČ': dic,\n    'Číslo faktury': cisloFaktury,\n    'Variabilní symbol': vs,\n    'Datum vystavení': text(ai.datum_vystaveni),\n    'Datum splatnosti': text(ai.datum_splatnosti),\n    'Bez DPH': bezDph,\n    'DPH': dph,\n    'Celkem': celkem,\n    'Měna': mena,\n    'Stav': stav,\n    'Důvody kontroly': duvody.join(' '),\n    'Poznámky': poznamky.join(' '),\n    // „Stav platby“ a „Upozornění odesláno“ záměrně nezapisujeme,\n    // aby opakovaně poslaná faktura nepřepsala ruční „zaplaceno“.\n  },\n};\n"
      },
      "id": "a4d50263-c0ad-5e7a-8a3c-3dbe807a170e",
      "name": "Kontrola faktury",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        960,
        0
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "sheet",
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "DOPLNIT_ID_TABULKY_FAKTURY",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Faktury",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [
            "Klíč"
          ],
          "schema": [
            {
              "id": "Klíč",
              "displayName": "Klíč",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Přijato",
              "displayName": "Přijato",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Odesílatel",
              "displayName": "Odesílatel",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Soubor",
              "displayName": "Soubor",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Dodavatel",
              "displayName": "Dodavatel",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "IČO",
              "displayName": "IČO",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "DIČ",
              "displayName": "DIČ",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Číslo faktury",
              "displayName": "Číslo faktury",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Variabilní symbol",
              "displayName": "Variabilní symbol",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Datum vystavení",
              "displayName": "Datum vystavení",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Datum splatnosti",
              "displayName": "Datum splatnosti",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Bez DPH",
              "displayName": "Bez DPH",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "DPH",
              "displayName": "DPH",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Celkem",
              "displayName": "Celkem",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Měna",
              "displayName": "Měna",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Stav",
              "displayName": "Stav",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Důvody kontroly",
              "displayName": "Důvody kontroly",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Poznámky",
              "displayName": "Poznámky",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "cellFormat": "RAW"
        }
      },
      "id": "e964d3df-209d-56d1-8ffc-7eba714c6b1e",
      "name": "Zapsat do Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1180,
        0
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "DOPLNIT",
          "name": "Google Sheets – účet klienta"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "650a4821-cc50-582d-9eea-058e4e6fa49b",
              "leftValue": "={{ $('Kontrola faktury').item.json['Stav'] }}",
              "rightValue": "ke kontrole",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "166f65ea-70d4-5cda-ae5e-34ad54a8ea70",
      "name": "Je ke kontrole?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1400,
        0
      ]
    },
    {
      "parameters": {
        "fromEmail": "DOPLNIT_EMAIL_ODESILATELE",
        "toEmail": "DOPLNIT_EMAIL_UCETNI",
        "subject": "=Faktura ke kontrole: {{ $('Kontrola faktury').item.json['Dodavatel'] || 'neznámý dodavatel' }} {{ $('Kontrola faktury').item.json['Číslo faktury'] }}",
        "emailFormat": "html",
        "html": "=<p>Dobrý den,</p>\n<p>automatická kontrola u faktury našla nesrovnalost. Faktura je v tabulce se stavem „ke kontrole“.</p>\n<ul>\n<li>Soubor: {{ $('Kontrola faktury').item.json['Soubor'] }}</li>\n<li>Od: {{ $('Kontrola faktury').item.json['Odesílatel'] }}</li>\n<li>Dodavatel: {{ $('Kontrola faktury').item.json['Dodavatel'] }} (IČO {{ $('Kontrola faktury').item.json['IČO'] }})</li>\n<li>Celkem: {{ $('Kontrola faktury').item.json['Celkem'] }} {{ $('Kontrola faktury').item.json['Měna'] }}</li>\n</ul>\n<p><b>Důvody:</b> {{ $('Kontrola faktury').item.json['Důvody kontroly'] }}</p>\n<p>Prosím ověřte údaje podle PDF a opravte je v tabulce.</p>\n<p><small>Ukázka – fiktivní firma.</small></p>",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "3122cd19-8f8e-5e83-b049-ca669088117f",
      "name": "Upozornit účetní",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        1620,
        -100
      ],
      "credentials": {
        "smtp": {
          "id": "DOPLNIT",
          "name": "SMTP – odesílání upozornění"
        }
      }
    },
    {
      "parameters": {},
      "id": "eb8d90a7-3e9b-55b2-b4f8-bd207019646c",
      "name": "V pořádku – hotovo",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1620,
        100
      ]
    }
  ],
  "connections": {
    "Nový e-mail s fakturou (IMAP)": {
      "main": [
        [
          {
            "node": "Rozdělit PDF přílohy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rozdělit PDF přílohy": {
      "main": [
        [
          {
            "node": "Text z PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text z PDF": {
      "main": [
        [
          {
            "node": "AI vytěžení údajů",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI model": {
      "ai_languageModel": [
        [
          {
            "node": "AI vytěžení údajů",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Striktní JSON": {
      "ai_outputParser": [
        [
          {
            "node": "AI vytěžení údajů",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI vytěžení údajů": {
      "main": [
        [
          {
            "node": "Kontrola faktury",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Kontrola faktury": {
      "main": [
        [
          {
            "node": "Zapsat do Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Zapsat do Google Sheets": {
      "main": [
        [
          {
            "node": "Je ke kontrole?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Je ke kontrole?": {
      "main": [
        [
          {
            "node": "Upozornit účetní",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "V pořádku – hotovo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "timezone": "Europe/Prague",
    "saveDataErrorExecution": "all"
  },
  "tags": []
}
