{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "2965A022-8F9B-4410-8B07-36EC09A13B77",
    "name": "FundingData: funding history on target accounts"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -43.01886792452831,
        "y": 9.81132075471698,
        "zoom": 0.75
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When the SDR team adds a row to the target accounts sheet in Google Sheets, looks the row's website up in FundingData with Resolve Name. When one company clearly wins, reads its funding history by that exact name and writes the total raised, the last round's date, stage and amount, the lead investors and the source link into the row, with Source set to FundingData. When FundingData has close matches but no clear winner, asks the RevOps analyst in Slack to pick one or Neither; a pick is read and written the same way, Neither marks the row as having no funding record. A name with no close match is marked the same way without asking.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When the SDR team adds a target account row to the sheet, matches its website to the exact company in FundingData, asks the analyst in Slack when the match is not clear, and writes the total raised, last round, lead investors and source link to the row, credited to FundingData.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Monitors Google Sheets for new rows and triggers AI workflows when data is added. Perfect for automated processing of form submissions, real-time data analysis, or immediate response to user input in collaborative spreadsheets. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "legacyElementId": "JS###v1###GoogleSheets###onNewRow",
          "methodName": "onNewRow",
          "position": {
            "x": 110,
            "y": 40
          }
        },
        "flowElementId": "AB22A684-FD47-42FB-BFFE-CE40228DE9F0",
        "groupId": null,
        "id": "1AFBB9CE-DC42-47F9-8227-EF680614E522",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'New target account in the sheet', Error: Document is required",
            "valid": false
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewRow",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Target row",
          "serviceId": "google-sheets",
          "slaConditions": [],
          "staticData": {
            "sheetId": 0
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New target account in the sheet",
        "nextElementIds": [
          "17A42C5F-5D50-43A9-A0A3-7D65539A7B09"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "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,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the analyst Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1641,
            "y": 470
          }
        },
        "flowElementId": "809DE7FF-C9EC-44C4-87EE-A6A4EB9FBB42",
        "groupId": null,
        "id": "2C6FB4DF-AE93-4780-A468-FA685D87FD7C",
        "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": "ELEMENT_RESULT",
                    "label": "Analyst question",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "756FDCBC-90D6-49C5-A2C7-65D654B24BA5"
                  }
                ],
                "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": "BASIC",
                "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": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Analyst question",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "756FDCBC-90D6-49C5-A2C7-65D654B24BA5"
                  }
                ],
                "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": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Question to analyst",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the analyst",
        "nextElementIds": [
          "1846D27F-BB0A-4753-B518-447E3EA0BA66"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 891,
            "y": 479
          }
        },
        "flowElementId": "8D755920-D66E-45DD-8AFA-26F6C505F722",
        "groupId": null,
        "id": "06307F54-D1B7-40E7-83E9-CA42455C81BD",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "7b9533e1-6799-4488-a33f-801e2bf77cb6",
                "nestedOperation": null,
                "operation": "notEqual",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Analyst's answer",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "1846D27F-BB0A-4753-B518-447E3EA0BA66"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "none"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "7b9533e1-6799-4488-a33f-801e2bf77cb6"
            ]
          },
          "elseComponent": {
            "componentId": "C92BD413-F3F3-453C-A7C4-7501A6306386",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Picked",
          "storeResult": false,
          "thenComponent": {
            "componentId": "168D09DA-33D6-46FC-890A-7C0DC44A1C76",
            "componentType": "ELEMENT"
          }
        },
        "name": "Analyst picked a company?",
        "nextElementIds": [
          "168D09DA-33D6-46FC-890A-7C0DC44A1C76",
          "C92BD413-F3F3-453C-A7C4-7501A6306386"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Resolves a free-text name, or a website domain, to the exact company and investor names the other actions accept. Exact matches are flagged and best is set only when one candidate clearly wins. Not metered.",
          "elementId": "EXTENSION:::SHARED:::default:::fundingdata:::resolveName",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the company in FundingData Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fundingdata:::resolveName",
          "legacyElementId": null,
          "methodName": "resolveName",
          "position": {
            "x": 496,
            "y": 40
          }
        },
        "flowElementId": "406016B3-A75A-442C-847E-A5F588520A48",
        "groupId": null,
        "id": "17A42C5F-5D50-43A9-A0A3-7D65539A7B09",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "domain",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Target row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Website",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1AFBB9CE-DC42-47F9-8227-EF680614E522"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "kind",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "company"
                  }
                ],
                "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": "resolveName",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Name match",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fundingdata",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the company in FundingData",
        "nextElementIds": [
          "44A87478-F84C-44C9-8192-EB160008E08D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 1238,
            "y": 479
          }
        },
        "flowElementId": "CDE9898E-613F-4439-A477-4C06510BF93E",
        "groupId": null,
        "id": "1846D27F-BB0A-4753-B518-447E3EA0BA66",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Analyst's answer",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the analyst's answer",
        "nextElementIds": [
          "06307F54-D1B7-40E7-83E9-CA42455C81BD"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "Company name": "e122ced5-e6a4-4229-97f3-5b7dd231bb0a"
          },
          "position": {
            "x": 534,
            "y": 479
          }
        },
        "flowElementId": "358B4DD6-38F4-47E9-B85B-AB4CB0FA125F",
        "groupId": null,
        "id": "168D09DA-33D6-46FC-890A-7C0DC44A1C76",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "Company name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Analyst's answer",
                    "subPathSegments": [
                      {
                        "key": "decision",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1846D27F-BB0A-4753-B518-447E3EA0BA66"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Picked name",
          "storeResult": true
        },
        "name": "Use the analyst's pick",
        "nextElementIds": [
          "6D80D003-1222-403F-905D-C4BFBE3DA4A4"
        ],
        "nextGroupIds": [],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "Company name": "ef75da51-1d50-40a9-8dfe-e9a501eba085"
          },
          "position": {
            "x": 531,
            "y": 349
          }
        },
        "flowElementId": "E96A41C7-ED2F-4A69-A874-956C7DAF498B",
        "groupId": null,
        "id": "1303E9A2-F57A-4C69-BBC9-FDB87359CF81",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "Company name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Name match",
                    "subPathSegments": [
                      {
                        "key": "best",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "17A42C5F-5D50-43A9-A0A3-7D65539A7B09"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Matched name",
          "storeResult": true
        },
        "name": "Use the matched name",
        "nextElementIds": [
          "6D80D003-1222-403F-905D-C4BFBE3DA4A4"
        ],
        "nextGroupIds": [],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the question for the analyst Result"
          },
          "position": {
            "x": 1597,
            "y": 49
          }
        },
        "flowElementId": "94128D19-A41F-4C7E-955B-976D1C05E463",
        "groupId": null,
        "id": "756FDCBC-90D6-49C5-A2C7-65D654B24BA5",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "rowNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Target row",
                    "subPathSegments": [
                      {
                        "key": "rowNumber",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1AFBB9CE-DC42-47F9-8227-EF680614E522"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "company",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Target row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Company",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1AFBB9CE-DC42-47F9-8227-EF680614E522"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "website",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Target row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Website",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1AFBB9CE-DC42-47F9-8227-EF680614E522"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "candidates",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Name match",
                    "subPathSegments": [
                      {
                        "key": "companies",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "17A42C5F-5D50-43A9-A0A3-7D65539A7B09"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answerLink",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Answer link",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Answer link"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "executionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_ID",
                    "label": null,
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.executionId",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "executionId",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const money = (usd) => {\n  const n = Number(usd);\n  if (!n) return '';\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 link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${encodeURIComponent(decision)}`;\nconst cands = (Array.isArray(candidates) ? candidates : []).filter(c => c && c.name).slice(0, 4);\nconst describe = (c, i) => {\n  const parts = [];\n  if (c.raisedUSD) parts.push(money(c.raisedUSD) + ' raised');\n  if (c.rounds) parts.push(c.rounds + (c.rounds === 1 ? ' round' : ' rounds'));\n  if (c.exact) parts.push('exact name match');\n  return `${i + 1}. *${c.name}*${parts.length ? ', ' + parts.join(', ') : ''}`;\n};\nconst lines = [\n  `*Row ${rowNumber} in the target accounts sheet needs a match.*`,\n  `The sheet says: ${company || '(no name)'}, ${website || '(no website)'}`,\n  'FundingData has these close matches and picked none of them:',\n  ...cands.map(describe),\n  'Pick the right company, or Neither to mark the row as having no funding record.',\n  'Source: <https://fundingdata.com|FundingData>',\n];\nconst buttons = cands.map((c) => ({ type: 'button', text: { type: 'plain_text', text: c.name.slice(0, 75) }, url: link(c.name) }));\nbuttons.push({ type: 'button', style: 'danger', text: { type: 'plain_text', text: 'Neither' }, url: link('none') });\nreturn {\n  text: `Row ${rowNumber}: which FundingData company is ${company || website}?`,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements: buttons },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Analyst question",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the question for the analyst",
        "nextElementIds": [
          "2C6FB4DF-AE93-4780-A468-FA685D87FD7C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Updates existing data in Google Sheets for AI agents to modify records, correct information, or maintain data accuracy in automated workflows. Perfect for updating user profiles, adjusting scores, or maintaining dynamic data that changes over time.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Mark the row as having no record Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "legacyElementId": "JS###v1###GoogleSheets###updateRow",
          "methodName": "updateRow",
          "position": {
            "x": 496,
            "y": 210
          }
        },
        "flowElementId": "F3BF917F-2736-4036-856F-74FCC1099E40",
        "groupId": null,
        "id": "C92BD413-F3F3-453C-A7C4-7501A6306386",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 0
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Target row",
                    "subPathSegments": [
                      {
                        "key": "rowNumber",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1AFBB9CE-DC42-47F9-8227-EF680614E522"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowData",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "JSON",
                    "label": null,
                    "parsedValue": {
                      "Total raised (USD)": "No record in FundingData",
                      "Source": "FundingData"
                    },
                    "type": "INPUT",
                    "value": "{\"Total raised (USD)\": \"No record in FundingData\", \"Source\": \"FundingData\"}"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Mark the row as having no record', Error: Document is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Row marked",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Mark the row as having no record",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 915,
            "y": 49
          }
        },
        "flowElementId": "96B30586-04CE-45F4-B0D4-BFF135376162",
        "groupId": null,
        "id": "44A87478-F84C-44C9-8192-EB160008E08D",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "2b91b7d3-2776-4ae0-9028-7aee006bbddb",
                "nestedOperation": null,
                "operation": "isNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Name match",
                      "subPathSegments": [
                        {
                          "key": "best",
                          "optional": false
                        },
                        {
                          "key": "name",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "17A42C5F-5D50-43A9-A0A3-7D65539A7B09"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": []
              }
            ],
            "grouping": [
              "2b91b7d3-2776-4ae0-9028-7aee006bbddb"
            ]
          },
          "elseComponent": {
            "componentId": "8810FE26-3FC9-4FE6-9AD2-E53572C12E21",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Clear match",
          "storeResult": false,
          "thenComponent": {
            "componentId": "1303E9A2-F57A-4C69-BBC9-FDB87359CF81",
            "componentType": "ELEMENT"
          }
        },
        "name": "One clear match?",
        "nextElementIds": [
          "1303E9A2-F57A-4C69-BBC9-FDB87359CF81",
          "8810FE26-3FC9-4FE6-9AD2-E53572C12E21"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1268,
            "y": 49
          }
        },
        "flowElementId": "BFAA7033-327D-4357-A370-67DFEED5514A",
        "groupId": null,
        "id": "8810FE26-3FC9-4FE6-9AD2-E53572C12E21",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "41e61549-3a69-48d7-ba78-8efb223733bd",
                "nestedOperation": null,
                "operation": "arrayIsNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Name match",
                      "subPathSegments": [
                        {
                          "key": "companies",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "17A42C5F-5D50-43A9-A0A3-7D65539A7B09"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "ARRAY",
                "values": []
              }
            ],
            "grouping": [
              "41e61549-3a69-48d7-ba78-8efb223733bd"
            ]
          },
          "elseComponent": {
            "componentId": "C92BD413-F3F3-453C-A7C4-7501A6306386",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Any candidates",
          "storeResult": false,
          "thenComponent": {
            "componentId": "756FDCBC-90D6-49C5-A2C7-65D654B24BA5",
            "componentType": "ELEMENT"
          }
        },
        "name": "Any close matches?",
        "nextElementIds": [
          "756FDCBC-90D6-49C5-A2C7-65D654B24BA5",
          "C92BD413-F3F3-453C-A7C4-7501A6306386"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Gets one company's funding history (rounds, total raised, founders, investors, citations) by its name or its website domain.",
          "elementId": "EXTENSION:::SHARED:::default:::fundingdata:::getCompany",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the funding history Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fundingdata:::getCompany",
          "legacyElementId": null,
          "methodName": "getCompany",
          "position": {
            "x": 135,
            "y": 470
          }
        },
        "flowElementId": "AB871B2D-757F-4D81-BDD4-7A1B94A2D158",
        "groupId": null,
        "id": "6D80D003-1222-403F-905D-C4BFBE3DA4A4",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - Company name",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.Company name",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "Company name",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "domain",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "stages",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fields",
              "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": "getCompany",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Funding history",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fundingdata",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Read the funding history",
        "nextElementIds": [
          "493EDDF4-E985-427A-8A14-D0A586F147A4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Updates existing data in Google Sheets for AI agents to modify records, correct information, or maintain data accuracy in automated workflows. Perfect for updating user profiles, adjusting scores, or maintaining dynamic data that changes over time.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the funding history to the row Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "legacyElementId": "JS###v1###GoogleSheets###updateRow",
          "methodName": "updateRow",
          "position": {
            "x": 488,
            "y": 640
          }
        },
        "flowElementId": "023DFA96-F556-430A-8220-9FCCA3925ADC",
        "groupId": null,
        "id": "8D6FE1F7-E2C8-4D4D-93F2-0D9ADD29A35E",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 0
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Target row",
                    "subPathSegments": [
                      {
                        "key": "rowNumber",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "1AFBB9CE-DC42-47F9-8227-EF680614E522"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowData",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Sheet update",
                    "subPathSegments": [
                      {
                        "key": "rowData",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "493EDDF4-E985-427A-8A14-D0A586F147A4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Write the funding history to the row', Error: Document is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Row written",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Write the funding history to the row",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick out the last round Result"
          },
          "position": {
            "x": 142,
            "y": 649
          }
        },
        "flowElementId": "EDB1A419-9295-402E-B0E8-6A00DACACE4D",
        "groupId": null,
        "id": "493EDDF4-E985-427A-8A14-D0A586F147A4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "company",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Funding history",
                    "subPathSegments": [
                      {
                        "key": "company",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6D80D003-1222-403F-905D-C4BFBE3DA4A4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rounds",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Funding history",
                    "subPathSegments": [
                      {
                        "key": "rounds",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6D80D003-1222-403F-905D-C4BFBE3DA4A4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "totalRaised",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Funding history",
                    "subPathSegments": [
                      {
                        "key": "totalRaisedUSD",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6D80D003-1222-403F-905D-C4BFBE3DA4A4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "roundCount",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Funding history",
                    "subPathSegments": [
                      {
                        "key": "roundCount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6D80D003-1222-403F-905D-C4BFBE3DA4A4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "investors",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Funding history",
                    "subPathSegments": [
                      {
                        "key": "investors",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6D80D003-1222-403F-905D-C4BFBE3DA4A4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(rounds) ? rounds.slice() : [];\nlist.sort((a, b) => String(b.date || '').localeCompare(String(a.date || '')));\nconst last = list[0] || {};\nconst join = (v) => Array.isArray(v) ? v.filter(Boolean).join(', ') : '';\nconst leads = join(last.leadInvestors) || join(last.investors) || join(investors);\nconst stage = last.stage || (last.stageEstimate ? `${last.stageEstimate} (estimated from size)` : '');\nconst sourceUrl = (last.citation && last.citation.url) || '';\nconst num = (v) => (v === null || v === undefined || v === '' ? '' : Number(v));\nreturn {\n  rowData: {\n    'FundingData name': company || '',\n    'Total raised (USD)': num(totalRaised),\n    'Rounds': num(roundCount),\n    'Last round date': last.date || '',\n    'Last round stage': stage,\n    'Last round amount (USD)': num(last.amountUSD),\n    'Lead investors': leads,\n    'Source link': sourceUrl,\n    'Source': 'FundingData',\n  },\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Sheet update",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick out the last round",
        "nextElementIds": [
          "8D6FE1F7-E2C8-4D4D-93F2-0D9ADD29A35E"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "1AFBB9CE-DC42-47F9-8227-EF680614E522",
    "groups": [],
    "id": "A703C2E8-0889-4FBD-B3DB-620C9FC883DF",
    "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 URL of the block Wait for the analyst's answer. The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "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:08.272Z"
}
