{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "DC05EE96-7F39-4F14-826E-4E8EB50A5A2C",
    "name": "sevdesk: emailed receipts to coded vouchers"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": 102.80580248919176,
        "y": -31.38334363844251,
        "zoom": 0.6417129487814522
      },
      "autoSave": true,
      "descriptions": {
        "flow": "When a supplier invoice or receipt arrives in Gmail, uploads it to sevdesk, codes it against the booking accounts sevdesk allows for expenses, creates a draft voucher with the receipt attached, and posts the coding to the bookkeeper in Slack. Nothing is sealed.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a supplier invoice or receipt arrives in Gmail, uploads it to sevdesk, codes it against the booking accounts sevdesk allows for expenses, creates a draft voucher with the receipt attached, and posts the coding to the bookkeeper in Slack. Nothing is sealed.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Triggers when an email with a new attachment is received. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "legacyElementId": "JS###v1###GmailService###onNewAttachment",
          "methodName": "onNewAttachment",
          "position": {
            "x": 110,
            "y": 40
          }
        },
        "flowElementId": "490F20CC-045D-4BB0-BF1B-91BF35B4C3B7",
        "groupId": null,
        "id": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewAttachment",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New receipt email",
          "serviceId": "gmail-service",
          "slaConditions": [],
          "staticData": {
            "query": "subject:(Rechnung OR Beleg OR Quittung OR invoice OR receipt)"
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New receipt email",
        "nextElementIds": [
          "B96195DD-E39E-4452-A7FF-D02897455DB8"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Lists the sevdesk booking accounts valid for expense receipts, with the tax rules that go with each.",
          "elementId": "EXTENSION:::SHARED:::default:::sevdesk:::getExpenseAccountGuidance",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get the expense accounts Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::sevdesk:::getExpenseAccountGuidance",
          "legacyElementId": "JS###v1###SevdeskService###getExpenseAccountGuidance",
          "methodName": "getExpenseAccountGuidance",
          "position": {
            "x": 352,
            "y": 206
          }
        },
        "flowElementId": "5629C8C0-7163-4B4E-84CF-133784605560",
        "groupId": null,
        "id": "0A30FE75-B25C-4275-81E2-D9935787AF83",
        "metaInfo": {
          "bodyParams": [],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getExpenseAccountGuidance",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Expense accounts",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "sevdesk",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get the expense accounts",
        "nextElementIds": [
          "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read and code the receipt Result"
          },
          "tools": {},
          "position": {
            "x": 28,
            "y": 416
          }
        },
        "flowElementId": "7C2E9A6F-EDC8-4616-B345-ABCA547135AB",
        "groupId": null,
        "id": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C",
        "metaInfo": {
          "aiApiKey": null,
          "aiModel": "claude-sonnet-5",
          "aiProvider": "ANTHROPIC",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "dynamicAiApiKey": {
            "expression": [
              {
                "id": "PLACEHOLDER_DATA",
                "label": "Anthropic key",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_STATIC_DATA",
                "value": "Anthropic key"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "files": [
            {
              "mimeType": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New receipt email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "mimetype",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              },
              "url": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B96195DD-E39E-4452-A7FF-D02897455DB8"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              }
            }
          ],
          "forceParsedOutput": true,
          "langSmithSettings": {
            "enabled": false,
            "apiKey": null,
            "projectName": null,
            "label": "FlowRunner AI-Agent",
            "accountCluster": "US"
          },
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "messagesHistoryEnabled": false,
          "messagesHistoryLimit": 15,
          "onFailElemId": null,
          "resultAlias": "Receipt coding",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You code supplier invoices and card receipts for bookkeeping in sevdesk. You get the receipt file, the email it came with, and the list of booking accounts sevdesk allows for expense receipts, each with the tax rules allowed for it. Choose accounts and tax rules only from that list. Never invent an account, and never pair an account with a tax rule the list does not allow for it.\n\nReply with JSON only, with these fields:\nsupplierName: the supplier as printed on the receipt\ndocumentNumber: the supplier's invoice or receipt number, or empty text\nvoucherDate: the receipt date as YYYY-MM-DD\ncurrency: the three-letter currency code, EUR if none is shown\ntaxRuleId: the id of the tax rule for the whole receipt, taken from the allowed tax rules of the accounts you chose\npositions: an array with one entry per VAT rate on the receipt, each with accountDatevId (the accountDatevId of the chosen account from the list), taxRate (the VAT rate as a number, such as 19, 7 or 0), net (always false), sumGross (the gross amount at that rate as a number) and comment (a few words on what was bought)\ntotal: the gross total of the receipt as a number\nsummary: one short line per position for the bookkeeper, with the account number and name, the VAT rate, the gross amount and why you chose that account\ndoubts: anything you were unsure about, in one sentence, or empty text if nothing"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "Email from "
              },
              {
                "id": "RESULT",
                "label": "New receipt email",
                "subPathSegments": [
                  {
                    "key": "fromAddress",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nSubject: "
              },
              {
                "id": "RESULT",
                "label": "New receipt email",
                "subPathSegments": [
                  {
                    "key": "subject",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\n"
              },
              {
                "id": "RESULT",
                "label": "New receipt email",
                "subPathSegments": [
                  {
                    "key": "message",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\nBooking accounts sevdesk allows for expense receipts:\n"
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Expense accounts",
                "subPathSegments": [
                  {
                    "key": "objects",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "0A30FE75-B25C-4275-81E2-D9935787AF83"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read and code the receipt",
        "nextElementIds": [
          "1EF4676E-CD79-4265-B272-3A543DD10E47"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Saves a Gmail attachment to FlowRunner Files and returns the file URL.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Save the receipt file Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "legacyElementId": "JS###v1###GmailService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 400,
            "y": 40
          }
        },
        "flowElementId": "FE44BDF3-C4A9-4634-A441-B208103C9FD6",
        "groupId": null,
        "id": "B96195DD-E39E-4452-A7FF-D02897455DB8",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New receipt email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New receipt email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New receipt email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "saveAttachment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Receipt file",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the receipt file",
        "nextElementIds": [
          "8BAFD7F5-7E96-44BC-8CBF-C887E59A2E99"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a sevdesk voucher together with its positions, or updates an existing one when a voucher ID is given.",
          "elementId": "EXTENSION:::SHARED:::default:::sevdesk:::createVoucher",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the voucher Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::sevdesk:::createVoucher",
          "legacyElementId": "JS###v1###SevdeskService###createVoucher",
          "methodName": "createVoucher",
          "position": {
            "x": 486,
            "y": 402
          }
        },
        "flowElementId": "A768F31A-A854-467B-917F-163332B1159E",
        "groupId": null,
        "id": "1EF4676E-CD79-4265-B272-3A543DD10E47",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "creditDebit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "D"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "positions",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "positions",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "voucherId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "voucherDate",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "voucherDate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "description",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "documentNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "supplierId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "supplierName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "supplierName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "status",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "50"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "voucherType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "VOU"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "taxRuleId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "taxRuleId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "taxType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "taxSetId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "currency",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "currency",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "exchangeRate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "foreignCurrencyDeadline",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "payDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "paymentDeadline",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "deliveryDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "deliveryDateUntil",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "costCenterId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "filename",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Uploaded receipt",
                    "subPathSegments": [
                      {
                        "key": "objects",
                        "optional": false
                      },
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C6217A29-C830-4B92-B6FB-9974564AD34B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recurringInterval",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recurringStartDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recurringNextVoucher",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recurringEndDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "positionsToDelete",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createVoucher",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Voucher",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "sevdesk",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the voucher",
        "nextElementIds": [
          "B1FA9DCF-A3F5-4BE6-8890-AA1C36803E91"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Send the coding to the bookkeeper Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 808,
            "y": 406
          }
        },
        "flowElementId": "3437DCC5-5E87-42B5-B863-AB2DED0BAA20",
        "groupId": null,
        "id": "B1FA9DCF-A3F5-4BE6-8890-AA1C36803E91",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "*Receipt from "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "supplierName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is in sevdesk as a draft voucher*\nNumber: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "documentNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "  |  Date: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "voucherDate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "  |  Total: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "total",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "currency",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\n"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "summary",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nNotes: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt coding",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "doubts",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3F97E218-B822-48B2-B9C5-F7CB9D54E42C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nVoucher "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Voucher",
                    "subPathSegments": [
                      {
                        "key": "objects",
                        "optional": false
                      },
                      {
                        "key": "voucher",
                        "optional": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1EF4676E-CD79-4265-B272-3A543DD10E47"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", receipt attached. <"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B96195DD-E39E-4452-A7FF-D02897455DB8"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "|Open the receipt>. Nothing has been sealed."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Bookkeeper message",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send the coding to the bookkeeper",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a specified attachment from a message using its message ID and attachment ID.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::getAttachment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get the receipt content Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::getAttachment",
          "legacyElementId": "JS###v1###GmailService###getAttachment",
          "methodName": "getAttachment",
          "position": {
            "x": 690,
            "y": 40
          }
        },
        "flowElementId": "147AEA2C-98FF-4084-8EF5-AC9E8B1F4111",
        "groupId": null,
        "id": "8BAFD7F5-7E96-44BC-8CBF-C887E59A2E99",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New receipt email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New receipt email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getAttachment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Receipt content",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get the receipt content",
        "nextElementIds": [
          "C6217A29-C830-4B92-B6FB-9974564AD34B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Uploads a receipt file to sevdesk and returns the internal filename, which Create Voucher then attaches to the voucher.",
          "elementId": "EXTENSION:::SHARED:::default:::sevdesk:::uploadVoucherFile",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Upload the receipt to sevdesk Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::sevdesk:::uploadVoucherFile",
          "legacyElementId": "JS###v1###SevdeskService###uploadVoucherFile",
          "methodName": "uploadVoucherFile",
          "position": {
            "x": 664,
            "y": 204
          }
        },
        "flowElementId": "6A57A2A5-992C-4CF2-9CBB-3D03DA07902F",
        "groupId": null,
        "id": "C6217A29-C830-4B92-B6FB-9974564AD34B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "filename",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New receipt email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileContent",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt content",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8BAFD7F5-7E96-44BC-8CBF-C887E59A2E99"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "contentType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New receipt email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "mimetype",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "uploadVoucherFile",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Uploaded receipt",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "sevdesk",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Upload the receipt to sevdesk",
        "nextElementIds": [
          "0A30FE75-B25C-4275-81E2-D9935787AF83"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "1CCE67E5-8F57-4E49-A1C4-CF64B97B3A77",
    "groups": [],
    "id": "9D0416D6-2C8E-4717-93EF-3B0D074EC966",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "The Anthropic key the AI step uses.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-11-17T05:55:17.034Z"
}
