{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "3ED17462-136E-41C5-9AE8-237B287A3DA5",
    "name": "Morse: receipt photos logged in Notion"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -70,
        "y": 0,
        "zoom": 1
      },
      "autoSave": false,
      "descriptions": {
        "flow": "Checks the expenses inbox in Gmail for emails with images. Each JPEG, PNG, GIF or WebP attachment is saved, read by a Morse vision model on zero-retention endpoints for the vendor, date, total, tax and currency, and written as a row in the team's expenses database in Notion.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Checks the expenses inbox in Gmail for emails with images. Each JPEG, PNG, GIF or WebP attachment is saved, read by a Morse vision model on zero-retention endpoints for the vendor, date, total, tax and currency, and written as a row in the team's expenses database in Notion.",
    "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": "58016A91-116A-4DE5-B74B-D2F99B328459",
        "groupId": null,
        "id": "D5AD47F6-2A07-4AD5-9BCA-D7E34E8CCC91",
        "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": "Receipt email",
          "serviceId": "gmail-service",
          "slaConditions": [],
          "staticData": {
            "query": "in:inbox (filename:jpg OR filename:jpeg OR filename:png OR filename:gif OR filename:webp)"
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "Receipt email with images",
        "nextElementIds": [],
        "nextGroupIds": [
          "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0"
        ],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": true,
          "blockDefinitionId": "condition",
          "position": {
            "x": 110,
            "y": 229
          }
        },
        "flowElementId": "E4C7D516-9B33-46B7-BA99-E1ECFAFB9252",
        "groupId": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0",
        "id": "2F37AF3D-B7BF-4C10-9B18-2A80F525A59F",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "58bd596c-fa70-45ee-a810-cfa62a045ed4",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "label": null,
                      "subPathSegments": [
                        {
                          "key": "mimetype",
                          "optional": false
                        }
                      ],
                      "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "value": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "image/jpeg"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              },
              {
                "id": "37daf1d5-2f0a-4468-94c9-fb4855003b59",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "label": null,
                      "subPathSegments": [
                        {
                          "key": "mimetype",
                          "optional": false
                        }
                      ],
                      "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "value": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "image/png"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              },
              {
                "id": "6addf3a1-1666-4650-8b78-e25628d7afd6",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "label": null,
                      "subPathSegments": [
                        {
                          "key": "mimetype",
                          "optional": false
                        }
                      ],
                      "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "value": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "image/gif"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              },
              {
                "id": "a99f944f-3a87-4fc4-aff3-2eda6849845b",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "label": null,
                      "subPathSegments": [
                        {
                          "key": "mimetype",
                          "optional": false
                        }
                      ],
                      "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "value": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "image/webp"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "58bd596c-fa70-45ee-a810-cfa62a045ed4",
              "OR",
              "37daf1d5-2f0a-4468-94c9-fb4855003b59",
              "OR",
              "6addf3a1-1666-4650-8b78-e25628d7afd6",
              "OR",
              "a99f944f-3a87-4fc4-aff3-2eda6849845b"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Receipt image",
          "storeResult": false,
          "thenComponent": {
            "componentId": "6FF9ECAB-7133-4D8B-8F52-AA33B9FB73CD",
            "componentType": "ELEMENT"
          }
        },
        "name": "Is it a receipt image?",
        "nextElementIds": [
          "6FF9ECAB-7133-4D8B-8F52-AA33B9FB73CD"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Build the Notion row Result"
          },
          "position": {
            "x": 1136,
            "y": 229
          }
        },
        "flowElementId": "2BEA1627-D032-40C3-8927-7FBE6F1BDAB2",
        "groupId": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0",
        "id": "54D4DB17-8D59-479F-BF2D-368B302D11AE",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "reading",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receipt reading",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CC83F19E-9BBE-4174-9C7D-14A1E68A5766"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "filename",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sender",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Receipt email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "D5AD47F6-2A07-4AD5-9BCA-D7E34E8CCC91"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Receipt email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "D5AD47F6-2A07-4AD5-9BCA-D7E34E8CCC91"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "let text = String(reading || '').trim();\nconst fenced = text.match(/```(?:json)?\\s*([\\s\\S]*?)```/i);\nif (fenced) text = fenced[1].trim();\nconst start = text.indexOf('{');\nconst end = text.lastIndexOf('}');\nif (start === -1 || end === -1) throw new Error(`Morse did not return JSON for ${filename}: ${text.slice(0, 200)}`);\nlet r;\ntry { r = JSON.parse(text.slice(start, end + 1)); } catch (e) { throw new Error(`Could not parse the receipt reading for ${filename}: ${text.slice(0, 200)}`); }\nconst num = v => { if (v === null || v === undefined || v === '') return null; const n = Number(String(v).replace(/[^0-9.-]/g, '')); return Number.isFinite(n) ? n : null; };\nconst str = v => (v === null || v === undefined) ? '' : String(v).trim();\nconst date = /^\\d{4}-\\d{2}-\\d{2}$/.test(str(r.date)) ? str(r.date) : null;\nconst title = str(r.vendor) || filename || 'Receipt';\n// Property names must match the expenses database in Notion: Name, Date, Total, Tax, Currency, Source.\nconst properties = {\n  Name: { title: [{ text: { content: title } }] },\n  Total: { number: num(r.total) },\n  Tax: { number: num(r.tax) },\n  Currency: { rich_text: str(r.currency) ? [{ text: { content: str(r.currency).toUpperCase() } }] : [] },\n  Source: { rich_text: [{ text: { content: `${str(sender)} / ${str(subject)} / ${filename}`.slice(0, 2000) } }] },\n};\nif (date) properties.Date = { date: { start: date } };\nreturn { properties, vendor: title, date, total: num(r.total), tax: num(r.tax), currency: str(r.currency).toUpperCase() };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Notion row",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Build the Notion row",
        "nextElementIds": [
          "1E5C2AE4-0C26-4C58-943F-FBCE1D0A96B4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a new item (page) within a database with specified property values and optional content blocks. The properties must match the database schema, and content can include rich text, headings, lists, and other block types.",
          "elementId": "EXTENSION:::SHARED:::default:::notion:::createDatabaseItem",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Add the receipt to the expenses database Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::notion:::createDatabaseItem",
          "legacyElementId": "JS###v1###Notion###createDatabaseItem",
          "methodName": "createDatabaseItem",
          "position": {
            "x": 1064,
            "y": 390
          }
        },
        "flowElementId": "A3861A0A-059C-4787-A16A-A746AA6C6AD9",
        "groupId": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0",
        "id": "1E5C2AE4-0C26-4C58-943F-FBCE1D0A96B4",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "databaseId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Expenses database ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Expenses database ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "properties",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Notion row",
                    "subPathSegments": [
                      {
                        "key": "properties",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "54D4DB17-8D59-479F-BF2D-368B302D11AE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "children",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Add the receipt to the expenses database', Error: The placeholder \"Expenses database ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createDatabaseItem",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Expense row",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "notion",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Add the receipt to the expenses database",
        "nextElementIds": [],
        "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 Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "legacyElementId": "JS###v1###GmailService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 412,
            "y": 220
          }
        },
        "flowElementId": "E93DE2CC-502A-4FA9-8E32-2F31DDF778F8",
        "groupId": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0",
        "id": "6FF9ECAB-7133-4D8B-8F52-AA33B9FB73CD",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Receipt email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "D5AD47F6-2A07-4AD5-9BCA-D7E34E8CCC91"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileOptions",
              "type": "OBJECT",
              "value": [
                {
                  "name": "scope",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "FLOW"
                      }
                    ],
                    "mode": "BASIC",
                    "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",
        "nextElementIds": [
          "CC83F19E-9BBE-4174-9C7D-14A1E68A5766"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Asks a Morse vision model about one or more images and returns its answer as Text alongside the full response, including usage and its cost in US dollars. Each image is given as a URL, such as a FlowRunner file URL, which the action downloads and sends to Morse inline (Morse takes no remote image links), or as a data: URL. Images must be JPEG, PNG, GIF or WebP. Pick a model from the list: it shows only the models that read images.",
          "elementId": "EXTENSION:::SHARED:::default:::morse:::analyzeImage",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "model": {
              "moonshotai/kimi-k3.1-pro": "Kimi K3.1 Pro"
            }
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the receipt with Morse Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::morse:::analyzeImage",
          "legacyElementId": null,
          "methodName": "analyzeImage",
          "position": {
            "x": 712,
            "y": 220
          }
        },
        "flowElementId": "70F7FFCC-D27F-4D51-A63C-E0917314F4FE",
        "groupId": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0",
        "id": "CC83F19E-9BBE-4174-9C7D-14A1E68A5766",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "model",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "moonshotai/kimi-k3.1-pro"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "prompt",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "This image is a receipt. Read it and answer with JSON only, no other text, in exactly this shape:\n{\"vendor\": string or null, \"date\": \"YYYY-MM-DD\" or null, \"total\": number or null, \"tax\": number or null, \"currency\": three-letter ISO code or null}\nTotal is the amount paid including tax, as a plain number without a currency sign. Use null for anything the receipt does not show. Do not guess."
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageUrls",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Receipt file",
                      "subPathSegments": [
                        {
                          "key": "fileUrl",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "6FF9ECAB-7133-4D8B-8F52-AA33B9FB73CD"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "detail",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "systemPrompt",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "maxTokens",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "temperature",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "reasoningEffort",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minPrivacy",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "zeroDataRetention",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_TRUE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": true
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "maxPricePrompt",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "maxPriceCompletion",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "privacyVeil",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "privacyVeilReport",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "privacyVeilRestore",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "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": "analyzeImage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Receipt reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "morse",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Read the receipt with Morse",
        "nextElementIds": [
          "54D4DB17-8D59-479F-BF2D-368B302D11AE"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "D5AD47F6-2A07-4AD5-9BCA-D7E34E8CCC91",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": -180,
            "zoom": 1
          },
          "position": {
            "x": 448,
            "y": 49
          }
        },
        "flowElementId": "DD8E25B8-B450-49E2-B665-4E069B0C9924",
        "groupId": null,
        "id": "BC467BE0-EED3-440C-B4E9-3FB10B0C18A0",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'For each attachment', Error: Children have error",
            "valid": false
          },
          "enabled": true,
          "firstElementId": "2F37AF3D-B7BF-4C10-9B18-2A80F525A59F",
          "list": {
            "expression": [
              {
                "id": "RESULT",
                "label": "Receipt email",
                "subPathSegments": [
                  {
                    "key": "attachments",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "D5AD47F6-2A07-4AD5-9BCA-D7E34E8CCC91"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "Each attachment",
          "storeResult": true
        },
        "name": "For each attachment",
        "nextElementIds": [],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "0755CB85-6AE0-437C-84EC-0F7B24DA552D",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
      "executionStaticData": [
        {
          "description": "The ID of your Notion expenses database (the 32-character part of its URL). Its properties: Name (title), Date (date), Total (number), Tax (number), Currency (text), Source (text).",
          "error": null,
          "name": "Expenses database ID",
          "type": "STRING",
          "value": ""
        }
      ],
      "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-12-02T08:43:39.888Z"
}
