{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "C99F0DB5-77E8-45E0-826B-6EF7E3C0FD83",
    "name": "FundingData: Monday funding digest"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -67.24233983286909,
        "y": 1.0027855153203333,
        "zoom": 0.97
      },
      "autoSave": false,
      "descriptions": {
        "flow": "Runs on a schedule every Monday morning. Works out last week's dates, pulls FundingData's totals for fintech rounds in Germany for that week and for the week before (Get Funding Stats, not metered), has Claude write a short digest from those numbers, and emails it to the team through Gmail with the top rounds, each linked to its source, and a FundingData credit.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Every Monday morning, pulls last week's fintech funding totals for Germany from FundingData, compares them with the week before, has Claude write a short digest and emails it to the team through Gmail with each round's source link and a FundingData credit.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Sends a single prompt to a Claude model and returns the generated text. This is the simplest way to use Claude: provide a prompt (and optionally a system instruction) and get the answer text plus token usage back. For multi-turn conversations, tool use, structured output, or thinking control, use Send Messages instead.",
          "elementId": "EXTENSION:::SHARED:::default:::anthropic-ai:::askClaude",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the digest Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::anthropic-ai:::askClaude",
          "legacyElementId": "JS###v1###AnthropicClaudeService###askClaude",
          "methodName": "askClaude",
          "position": {
            "x": 1266,
            "y": 40
          }
        },
        "flowElementId": "4DC9CC60-6FA0-47E0-BB21-17E77B4BA1A8",
        "groupId": null,
        "id": "CB59DAF9-C1B0-4D9D-8375-F297667FAFEB",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "prompt",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Week covered: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week",
                    "subPathSegments": [
                      {
                        "key": "label",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4F1D7B4-7254-4A63-895B-DD9B888B15F6"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\n\nLast week, fintech companies headquartered in Germany, from FundingData:\nTotal raised in USD: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "total",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nRounds: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "rounds",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nCompanies: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "companies",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nInvestors taking part: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "investors",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nRounds by stage: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "byStage",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nRounds by instrument: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "byInstrument",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nTop rounds (JSON): "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "topRounds",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nTop investors by amount: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "topInvestors",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nTop investors by number of rounds: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "topInvestorsByRounds",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\n\nThe week before, same filters:\nTotal raised in USD: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week before",
                    "subPathSegments": [
                      {
                        "key": "total",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "05ACB62C-A36E-424F-A2E2-1AA8EBE49CAF"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nRounds: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week before",
                    "subPathSegments": [
                      {
                        "key": "rounds",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "05ACB62C-A36E-424F-A2E2-1AA8EBE49CAF"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nRounds by stage: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week before",
                    "subPathSegments": [
                      {
                        "key": "byStage",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "05ACB62C-A36E-424F-A2E2-1AA8EBE49CAF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "model",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "claude-opus-4-8"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "system",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "You write a short Monday funding digest for a B2B sales team that sells to fintech companies in Germany. Use only the numbers, companies and investors given; never add a company, investor, amount or date that is not in the data. Write plain prose in three short sections, each headed by one of these lines on its own: What moved. Busiest investors. Three rounds worth a closer look. In the first section compare last week's total and round count with the week before. In the last section name up to three companies from the top rounds with their amount and stage and one sentence each on why a sales team should look. Under 250 words. No markdown symbols, no bullet characters, no exclamation marks. If last week had no rounds, say so in two sentences and stop."
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "maxTokens",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 4096
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "temperature",
              "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": "askClaude",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Digest",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "anthropic-ai",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Write the digest",
        "nextElementIds": [
          "4157C995-7386-4E62-903A-79080C573075"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": true,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Work out last week's dates Result"
          },
          "position": {
            "x": 110,
            "y": 49
          }
        },
        "flowElementId": "314A7E3F-5F71-4C17-AFD1-17E3D86F32E5",
        "groupId": null,
        "id": "F4F1D7B4-7254-4A63-895B-DD9B888B15F6",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const today = new Date();\ntoday.setUTCHours(0, 0, 0, 0);\nconst daysSinceMonday = (today.getUTCDay() + 6) % 7;\nconst thisMonday = new Date(today);\nthisMonday.setUTCDate(today.getUTCDate() - daysSinceMonday);\nconst lastMonday = new Date(thisMonday);\nlastMonday.setUTCDate(thisMonday.getUTCDate() - 7);\nconst lastSunday = new Date(thisMonday);\nlastSunday.setUTCDate(thisMonday.getUTCDate() - 1);\nconst prevMonday = new Date(lastMonday);\nprevMonday.setUTCDate(lastMonday.getUTCDate() - 7);\nconst prevSunday = new Date(lastMonday);\nprevSunday.setUTCDate(lastMonday.getUTCDate() - 1);\nconst iso = (d) => d.toISOString().slice(0, 10);\nconst pretty = (d) => d.toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' });\nreturn {\n  dateFrom: iso(lastMonday),\n  dateTo: iso(lastSunday),\n  prevFrom: iso(prevMonday),\n  prevTo: iso(prevSunday),\n  label: `${pretty(lastMonday)} to ${pretty(lastSunday)}, ${lastSunday.getUTCFullYear()}`,\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Week",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Work out last week's dates",
        "nextElementIds": [
          "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends emails through Gmail for AI agents to automate customer communication.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Send the digest to the team Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "legacyElementId": "JS###v1###GmailService###sendMessage",
          "methodName": "sendMessage",
          "position": {
            "x": 898,
            "y": 210
          }
        },
        "flowElementId": "C95859C3-DB26-4906-BC6D-4FC27D6FDD12",
        "groupId": null,
        "id": "07973AD4-F5DD-4E8E-B198-6BC6716E242D",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Team email list",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Team email list"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4157C995-7386-4E62-903A-79080C573075"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "html"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyContent",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Email",
                    "subPathSegments": [
                      {
                        "key": "html",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4157C995-7386-4E62-903A-79080C573075"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "from",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cc",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bcc",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachments",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Send the digest to the team', Error: The placeholder \"Team email list\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Sent digest",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send the digest to the team",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Totals for a filter set: amount, rounds, companies and investors, broken down by time, sector, stage, country and region, with the top rounds and investors. Not metered.",
          "elementId": "EXTENSION:::SHARED:::default:::fundingdata:::getStats",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "sector": {
              "Fintech": "Fintech"
            },
            "geo": {
              "DE": "Germany"
            }
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Last week's fintech rounds in Germany Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fundingdata:::getStats",
          "legacyElementId": null,
          "methodName": "getStats",
          "position": {
            "x": 455,
            "y": 40
          }
        },
        "flowElementId": "F4B826DD-CFF2-4615-AA09-0BC6F28A8227",
        "groupId": null,
        "id": "D2468662-6BC0-42D7-A108-B092F2C7D8A5",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "sector",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Fintech"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "stage",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeEstimated",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "geo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "DE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "period",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "from",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week",
                    "subPathSegments": [
                      {
                        "key": "dateFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4F1D7B4-7254-4A63-895B-DD9B888B15F6"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week",
                    "subPathSegments": [
                      {
                        "key": "dateTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4F1D7B4-7254-4A63-895B-DD9B888B15F6"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "investor",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minAmountUSD",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "instrument",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "founderOrigin",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "market",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "investorCountry",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "g",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "include",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "byStage"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "byInstrument"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "topRounds"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "topInvestors"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "topInvestorsByRounds"
                    }
                  ],
                  "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": "getStats",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "This week",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fundingdata",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Last week's fintech rounds in Germany",
        "nextElementIds": [
          "05ACB62C-A36E-424F-A2E2-1AA8EBE49CAF"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Assemble the email Result"
          },
          "position": {
            "x": 1266,
            "y": 219
          }
        },
        "flowElementId": "354791A2-9614-4661-A352-562A45FFD798",
        "groupId": null,
        "id": "4157C995-7386-4E62-903A-79080C573075",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "digest",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Digest",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CB59DAF9-C1B0-4D9D-8375-F297667FAFEB"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "topRounds",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "topRounds",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "label",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week",
                    "subPathSegments": [
                      {
                        "key": "label",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4F1D7B4-7254-4A63-895B-DD9B888B15F6"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "total",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "total",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "roundCount",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "This week",
                    "subPathSegments": [
                      {
                        "key": "rounds",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2468662-6BC0-42D7-A108-B092F2C7D8A5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const esc = (s) => String(s ?? '').replace(/[&<>\"]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;' }[c]));\nconst money = (usd) => {\n  const n = Number(usd);\n  if (!n) return 'undisclosed';\n  if (n >= 1e9) return '$' + (n / 1e9).toFixed(1) + 'B';\n  if (n >= 1e6) return '$' + (n / 1e6).toFixed(1) + 'M';\n  return '$' + Math.round(n / 1e3) + 'K';\n};\nconst paras = String(digest || '')\n  .split(/\\n+/)\n  .map((s) => s.trim())\n  .filter(Boolean)\n  .map((p) => /^(What moved|Busiest investors|Three rounds worth a closer look)\\.?$/i.test(p)\n    ? `<h3 style=\"margin:18px 0 6px;font-size:16px\">${esc(p.replace(/\\.$/, ''))}</h3>`\n    : `<p style=\"margin:0 0 10px\">${esc(p)}</p>`)\n  .join('');\nconst rows = (Array.isArray(topRounds) ? topRounds : []).slice(0, 10).map((r) => {\n  const leads = Array.isArray(r.leadInvestors) && r.leadInvestors.length ? r.leadInvestors : (Array.isArray(r.investors) ? r.investors : []);\n  const url = r.citation && r.citation.url;\n  const sourceName = (r.citation && (r.citation.publisher || r.citation.title)) || 'source';\n  return `<li style=\"margin:0 0 8px\"><strong>${esc(r.company)}</strong>: ${money(r.amountUSD)}${r.stage ? ', ' + esc(r.stage) : ''}, ${esc(r.date)}${leads.length ? ', ' + esc(leads.join(', ')) : ''}${url ? ` (<a href=\"${esc(url)}\">${esc(sourceName)}</a>)` : ''}</li>`;\n}).join('');\nconst count = Number(roundCount) || 0;\nconst html = `<div style=\"font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.5;color:#1b2430;max-width:640px\">\n<h2 style=\"margin:0 0 4px;font-size:20px\">Fintech funding in Germany, ${esc(label)}</h2>\n<p style=\"margin:0 0 16px;color:#555\">${count} ${count === 1 ? 'round' : 'rounds'}, ${money(total)} in total</p>\n${paras}\n${rows ? `<h3 style=\"margin:18px 0 6px;font-size:16px\">Top rounds of the week</h3><ol style=\"padding-left:20px;margin:0\">${rows}</ol>` : ''}\n<p style=\"margin:20px 0 0;color:#555;font-size:13px\">Funding data from <a href=\"https://fundingdata.com\">FundingData</a>. Each round links to the article or filing it was read from.</p>\n</div>`;\nreturn { subject: `Monday funding digest: fintech in Germany, ${label}`, html };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Email",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Assemble the email",
        "nextElementIds": [
          "07973AD4-F5DD-4E8E-B198-6BC6716E242D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Totals for a filter set: amount, rounds, companies and investors, broken down by time, sector, stage, country and region, with the top rounds and investors. Not metered.",
          "elementId": "EXTENSION:::SHARED:::default:::fundingdata:::getStats",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "sector": {
              "Fintech": "Fintech"
            },
            "geo": {
              "DE": "Germany"
            }
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "The week before, for comparison Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fundingdata:::getStats",
          "legacyElementId": null,
          "methodName": "getStats",
          "position": {
            "x": 880,
            "y": 40
          }
        },
        "flowElementId": "8E31111E-0392-4EB6-931F-4A4D1200F6D3",
        "groupId": null,
        "id": "05ACB62C-A36E-424F-A2E2-1AA8EBE49CAF",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "sector",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Fintech"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "stage",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeEstimated",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "geo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "DE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "period",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "from",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week",
                    "subPathSegments": [
                      {
                        "key": "prevFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4F1D7B4-7254-4A63-895B-DD9B888B15F6"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Week",
                    "subPathSegments": [
                      {
                        "key": "prevTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4F1D7B4-7254-4A63-895B-DD9B888B15F6"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "investor",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minAmountUSD",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "instrument",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "founderOrigin",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "market",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "investorCountry",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "g",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "include",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "byStage"
                    }
                  ],
                  "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": "getStats",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Week before",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fundingdata",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "The week before, for comparison",
        "nextElementIds": [
          "CB59DAF9-C1B0-4D9D-8375-F297667FAFEB"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "F4F1D7B4-7254-4A63-895B-DD9B888B15F6",
    "groups": [],
    "id": "6EDFB481-9B04-4E2E-B667-3F03DB964C6F",
    "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 address the digest goes to, such as your sales team's group address.",
          "error": null,
          "name": "Team email list",
          "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:35:12.092Z"
}
