{ "kind": "open-flow-workflow", "version": 1, "name": "EU Company Register to Google Sheets", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_e1bd8eb1e7fb33d5": { "name": "Enrich the company sheet", "kind": "start", "inputDefs": [] }, "n_95fde90442dfc60c": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_GOOGLE_SHEET_ID" }, "range": { "kind": "value", "value": "'Companies'" }, "majorDimension": { "kind": "value", "value": "ROWS" }, "valueRenderOption": { "kind": "value", "value": "UNFORMATTED_VALUE" }, "dateTimeRenderOption": { "kind": "value", "value": "FORMATTED_STRING" } }, "name": "Read all company queries", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The A1 notation of the range to retrieve.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to retrieve." }, "nullable": false, "handle": "range" }, { "description": "The major dimension for the returned values.", "jsonSchema": { "type": "string", "enum": [ "DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS" ], "description": "The major dimension for the returned values." }, "nullable": true, "handle": "majorDimension", "value": null }, { "description": "How values should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values should be rendered in the output." }, "nullable": true, "handle": "valueRenderOption", "value": null }, { "description": "How dates and times should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates and times should be rendered in the output." }, "nullable": true, "handle": "dateTimeRenderOption", "value": null } ], "outputs": [ { "description": "The A1 notation of the range.", "jsonSchema": { "type": "string", "description": "The A1 notation of the range." }, "nullable": false, "handle": "range" }, { "description": "The major dimension of the values (ROWS or COLUMNS).", "jsonSchema": { "type": "string", "description": "The major dimension of the values (ROWS or COLUMNS)." }, "nullable": false, "handle": "majorDimension" }, { "description": "The data values in the range.", "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" } ], "name": "Read all company queries", "executor": { "kind": "connector", "action": "googlesheets.values_get" } } }, "n_6e6090a524f26cf4": { "inputs": { "values": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_95fde90442dfc60c", "output": "values" } ] } }, "name": "Prepare every company query", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "jobs" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasJobs" } ], "name": "Prepare every company query", "moduleId": "n_f2a40318ccdb6777", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_65f5473fdbfd17ee": { "inputs": { "jobs": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6e6090a524f26cf4", "output": "jobs" } ] }, "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "state" } ] }, "startedRun": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6d2a64f3cbdc8024", "output": "run" } ] }, "polledRun": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_af5e00af0baaf14a", "output": "run" } ] }, "items": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_57f6785465fd0400", "output": "items" } ] } }, "name": "Collect registry results", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "jobs" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" }, { "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The Apify run identifier." }, "actId": { "type": "string", "description": "The actor identifier associated with the run." }, "status": { "type": "string", "description": "The current run status." }, "startedAt": { "type": "string", "description": "When the run started." }, "finishedAt": { "type": "string", "description": "When the run finished." }, "defaultDatasetId": { "type": "string", "description": "The default dataset identifier created for the run." }, "defaultKeyValueStoreId": { "type": "string", "description": "The default key-value store identifier created for the run." }, "defaultRequestQueueId": { "type": "string", "description": "The default request queue identifier created for the run." }, "stats": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run statistics object." }, "options": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run options object." }, "usage": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run usage summary object." } }, "required": [ "id", "actId", "status" ], "additionalProperties": true, "description": "An Apify actor run." }, "nullable": true, "handle": "startedRun" }, { "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The Apify run identifier." }, "actId": { "type": "string", "description": "The actor identifier associated with the run." }, "status": { "type": "string", "description": "The current run status." }, "startedAt": { "type": "string", "description": "When the run started." }, "finishedAt": { "type": "string", "description": "When the run finished." }, "defaultDatasetId": { "type": "string", "description": "The default dataset identifier created for the run." }, "defaultKeyValueStoreId": { "type": "string", "description": "The default key-value store identifier created for the run." }, "defaultRequestQueueId": { "type": "string", "description": "The default request queue identifier created for the run." }, "stats": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run statistics object." }, "options": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run options object." }, "usage": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run usage summary object." } }, "required": [ "id", "actId", "status" ], "additionalProperties": true, "description": "An Apify actor run." }, "nullable": true, "handle": "polledRun" }, { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A JSON-compatible Apify value." }, "description": "A single item returned from an Apify dataset." }, "description": "The ordered list of Apify dataset items." }, "nullable": true, "handle": "items" } ], "outputs": [ { "jsonSchema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "description": "The Apify actor run identifier." }, "datasetId": { "type": "string", "minLength": 1, "description": "The Apify dataset identifier." } }, "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "action" }, { "jsonSchema": { "type": "object", "additionalProperties": { "description": "A JSON-compatible Apify value." }, "description": "The JSON input object passed to the actor run." }, "nullable": true, "handle": "input" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "offset" }, { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "records" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasRecords" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "queryCount" } ], "name": "Collect registry results", "moduleId": "n_cfc0805e15b70e0b", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a00476ebc6ad1010": { "inputs": {}, "name": "Next registry request", "kind": "condition", "matchMode": "first", "cases": [ { "output": "start", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "action" } }, "operator": "==", "right": { "kind": "value", "value": "start" } } ] } ] }, { "output": "poll", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "action" } }, "operator": "==", "right": { "kind": "value", "value": "poll" } } ] } ] }, { "output": "items", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "action" } }, "operator": "==", "right": { "kind": "value", "value": "items" } } ] } ] } ] }, "n_6d2a64f3cbdc8024": { "inputs": { "actorId": { "kind": "value", "value": "gubidonius~company-registry-lookup" }, "input": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "input" } ] }, "timeoutSecs": { "kind": "value", "value": 600 }, "memoryMbytes": { "kind": "value", "value": 1024 } }, "name": "Start one registry Actor", "kind": "task", "task": { "inputs": [ { "description": "The Apify actor identifier, such as apify~web-scraper or apify/web-scraper.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Apify actor identifier, such as apify~web-scraper or apify/web-scraper." }, "nullable": false, "handle": "actorId" }, { "description": "The JSON input object passed to the actor run.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A JSON-compatible Apify value." }, "description": "The JSON input object passed to the actor run." }, "nullable": true, "handle": "input", "value": null }, { "description": "The actor build tag or number to run.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The actor build tag or number to run." }, "nullable": true, "handle": "build", "value": null }, { "description": "The memory limit for the run in megabytes.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "The memory limit for the run in megabytes." }, "nullable": true, "handle": "memoryMbytes", "value": null }, { "description": "The maximum runtime for the run in seconds.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "The maximum runtime for the run in seconds." }, "nullable": true, "handle": "timeoutSecs", "value": null } ], "outputs": [ { "description": "An Apify actor run.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The Apify run identifier." }, "actId": { "type": "string", "description": "The actor identifier associated with the run." }, "status": { "type": "string", "description": "The current run status." }, "startedAt": { "type": "string", "description": "When the run started." }, "finishedAt": { "type": "string", "description": "When the run finished." }, "defaultDatasetId": { "type": "string", "description": "The default dataset identifier created for the run." }, "defaultKeyValueStoreId": { "type": "string", "description": "The default key-value store identifier created for the run." }, "defaultRequestQueueId": { "type": "string", "description": "The default request queue identifier created for the run." }, "stats": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run statistics object." }, "options": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run options object." }, "usage": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run usage summary object." } }, "required": [ "id", "actId", "status" ], "additionalProperties": true, "description": "An Apify actor run." }, "nullable": false, "handle": "run" } ], "name": "Start one registry Actor", "executor": { "kind": "connector", "action": "apify.run_actor" } } }, "n_af5e00af0baaf14a": { "inputs": { "waitForFinishSeconds": { "kind": "value", "value": 10 }, "runId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_fc9a9b16a2195ed7", "output": "value" } ] } }, "name": "Wait for the same Actor run", "kind": "task", "task": { "inputs": [ { "description": "The Apify actor run identifier.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Apify actor run identifier." }, "nullable": false, "handle": "runId" }, { "description": "How many seconds to wait for run completion before returning.", "jsonSchema": { "type": "integer", "minimum": 0, "description": "How many seconds to wait for run completion before returning." }, "nullable": true, "handle": "waitForFinishSeconds", "value": null } ], "outputs": [ { "description": "An Apify actor run.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The Apify run identifier." }, "actId": { "type": "string", "description": "The actor identifier associated with the run." }, "status": { "type": "string", "description": "The current run status." }, "startedAt": { "type": "string", "description": "When the run started." }, "finishedAt": { "type": "string", "description": "When the run finished." }, "defaultDatasetId": { "type": "string", "description": "The default dataset identifier created for the run." }, "defaultKeyValueStoreId": { "type": "string", "description": "The default key-value store identifier created for the run." }, "defaultRequestQueueId": { "type": "string", "description": "The default request queue identifier created for the run." }, "stats": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run statistics object." }, "options": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run options object." }, "usage": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The run usage summary object." } }, "required": [ "id", "actId", "status" ], "additionalProperties": true, "description": "An Apify actor run." }, "nullable": false, "handle": "run" } ], "name": "Wait for the same Actor run", "executor": { "kind": "connector", "action": "apify.get_run" } } }, "n_57f6785465fd0400": { "inputs": { "limit": { "kind": "value", "value": 1000 }, "offset": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "offset" } ] }, "clean": { "kind": "value", "value": false }, "skipHidden": { "kind": "value", "value": false }, "datasetId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_56a215b83e4f675a", "output": "value" } ] } }, "name": "Read every result page", "kind": "task", "task": { "inputs": [ { "description": "The Apify dataset identifier.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Apify dataset identifier." }, "nullable": false, "handle": "datasetId" }, { "description": "The maximum number of items to return.", "jsonSchema": { "type": "integer", "minimum": 1, "description": "The maximum number of items to return." }, "nullable": true, "handle": "limit", "value": null }, { "description": "How many items to skip before returning results.", "jsonSchema": { "type": "integer", "minimum": 0, "description": "How many items to skip before returning results." }, "nullable": true, "handle": "offset", "value": null }, { "description": "Whether hidden fields and empty values should be removed from each item.", "jsonSchema": { "type": "boolean", "description": "Whether hidden fields and empty values should be removed from each item." }, "nullable": true, "handle": "clean", "value": null }, { "description": "Whether fields starting with a hash sign should be skipped.", "jsonSchema": { "type": "boolean", "description": "Whether fields starting with a hash sign should be skipped." }, "nullable": true, "handle": "skipHidden", "value": null } ], "outputs": [ { "description": "The ordered list of Apify dataset items.", "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A JSON-compatible Apify value." }, "description": "A single item returned from an Apify dataset." }, "description": "The ordered list of Apify dataset items." }, "nullable": false, "handle": "items" } ], "name": "Read every result page", "executor": { "kind": "connector", "action": "apify.get_dataset_items" } } }, "n_c4de0fb4dab890f8": { "inputs": {}, "name": "No registry matches", "kind": "condition", "matchMode": "first", "cases": [ { "output": "empty", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "hasRecords" } }, "operator": "==", "right": { "kind": "value", "value": false } } ] } ] } ] }, "n_34e5fbac72fdd53c": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_GOOGLE_SHEET_ID" }, "range": { "kind": "value", "value": "'Companies'" }, "majorDimension": { "kind": "value", "value": "ROWS" }, "valueRenderOption": { "kind": "value", "value": "UNFORMATTED_VALUE" }, "dateTimeRenderOption": { "kind": "value", "value": "FORMATTED_STRING" } }, "name": "Read current company rows", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The A1 notation of the range to retrieve.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to retrieve." }, "nullable": false, "handle": "range" }, { "description": "The major dimension for the returned values.", "jsonSchema": { "type": "string", "enum": [ "DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS" ], "description": "The major dimension for the returned values." }, "nullable": true, "handle": "majorDimension", "value": null }, { "description": "How values should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values should be rendered in the output." }, "nullable": true, "handle": "valueRenderOption", "value": null }, { "description": "How dates and times should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates and times should be rendered in the output." }, "nullable": true, "handle": "dateTimeRenderOption", "value": null } ], "outputs": [ { "description": "The A1 notation of the range.", "jsonSchema": { "type": "string", "description": "The A1 notation of the range." }, "nullable": false, "handle": "range" }, { "description": "The major dimension of the values (ROWS or COLUMNS).", "jsonSchema": { "type": "string", "description": "The major dimension of the values (ROWS or COLUMNS)." }, "nullable": false, "handle": "majorDimension" }, { "description": "The data values in the range.", "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" } ], "name": "Read current company rows", "executor": { "kind": "connector", "action": "googlesheets.values_get" } } }, "n_822ee0b4642f5646": { "inputs": { "values": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_34e5fbac72fdd53c", "output": "values" } ] }, "records": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "records" } ] }, "sheetName": { "kind": "value", "value": "Companies" } }, "name": "Plan registry sheet writes", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" }, { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "records" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "sheetName" } ], "outputs": [ { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "headerCellsExpected" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "updateCellsExpected" }, { "jsonSchema": { "type": "object", "properties": { "headerData": { "type": "array", "items": { "type": "object", "properties": { "range": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to write to." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to write into the range." }, "majorDimension": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The major dimension of the values array." } }, "required": [ "range", "values" ], "additionalProperties": false, "description": "A batch values update item." }, "minItems": 1, "description": "The list of value ranges to update." }, "updateData": { "type": "array", "items": { "type": "object", "properties": { "range": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to write to." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to write into the range." }, "majorDimension": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The major dimension of the values array." } }, "required": [ "range", "values" ], "additionalProperties": false, "description": "A batch values update item." }, "minItems": 1, "description": "The list of value ranges to update." }, "appendValues": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to append." } }, "additionalProperties": false }, "nullable": false, "handle": "request" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasHeader" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasUpdates" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasAppends" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "updatedRecords" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "appendedRecords" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "companyRecords" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to append values after." }, "nullable": false, "handle": "appendRange" } ], "name": "Plan registry sheet writes", "moduleId": "n_6165833c952a90a4", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_9d006702f777d15a": { "inputs": {}, "name": "Need registry headers", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasHeader" } }, "operator": "==", "right": { "kind": "value", "value": true } } ] } ] } ] }, "n_414d849bfba64f65": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_GOOGLE_SHEET_ID" }, "valueInputOption": { "kind": "value", "value": "USER_ENTERED" }, "data": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_896df6aea7b2780a", "output": "value" } ] } }, "name": "Write registry headers", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The list of value ranges to update.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "range": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to write to." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to write into the range." }, "majorDimension": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The major dimension of the values array." } }, "required": [ "range", "values" ], "additionalProperties": false, "description": "A batch values update item." }, "minItems": 1, "description": "The list of value ranges to update." }, "nullable": false, "handle": "data" }, { "description": "How the input data should be interpreted.", "jsonSchema": { "type": "string", "enum": [ "INPUT_VALUE_OPTION_UNSPECIFIED", "RAW", "USER_ENTERED" ], "description": "How the input data should be interpreted." }, "nullable": true, "handle": "valueInputOption", "value": null }, { "description": "Whether to include the written values in the response.", "jsonSchema": { "type": "boolean", "description": "Whether to include the written values in the response." }, "nullable": true, "handle": "includeValuesInResponse", "value": null }, { "description": "How values in the response should be rendered.", "jsonSchema": { "type": "string", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values in the response should be rendered." }, "nullable": true, "handle": "responseValueRenderOption", "value": null }, { "description": "How dates in the response should be rendered.", "jsonSchema": { "type": "string", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates in the response should be rendered." }, "nullable": true, "handle": "responseDateTimeRenderOption", "value": null } ], "outputs": [ { "description": "The unique ID of the spreadsheet.", "jsonSchema": { "type": "string", "description": "The unique ID of the spreadsheet." }, "nullable": false, "handle": "spreadsheetId" }, { "description": "The total number of rows updated across all ranges.", "jsonSchema": { "type": "integer", "description": "The total number of rows updated across all ranges." }, "nullable": false, "handle": "totalUpdatedRows" }, { "description": "The total number of columns updated across all ranges.", "jsonSchema": { "type": "integer", "description": "The total number of columns updated across all ranges." }, "nullable": false, "handle": "totalUpdatedColumns" }, { "description": "The total number of cells updated across all ranges.", "jsonSchema": { "type": "integer", "description": "The total number of cells updated across all ranges." }, "nullable": false, "handle": "totalUpdatedCells" }, { "description": "The per-range update responses.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "updatedRange": { "type": "string", "description": "The A1 notation of the range that was updated." }, "updatedRows": { "type": "integer", "description": "The number of rows that were updated." }, "updatedColumns": { "type": "integer", "description": "The number of columns that were updated." }, "updatedCells": { "type": "integer", "description": "The number of cells that were updated." }, "updatedData": { "type": "object", "properties": { "range": { "type": "string", "description": "The A1 notation of the range." }, "majorDimension": { "type": "string", "description": "The major dimension of the values (ROWS or COLUMNS)." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." } }, "required": [ "range", "majorDimension", "values" ], "additionalProperties": false, "description": "The values of the cells after the update." } }, "required": [ "updatedRange", "updatedRows", "updatedColumns", "updatedCells" ], "additionalProperties": false, "description": "The batch update item schema." }, "description": "The per-range update responses." }, "nullable": false, "handle": "responses" } ], "name": "Write registry headers", "executor": { "kind": "connector", "action": "googlesheets.update_values_batch" } } }, "n_6ad12b1d06e077e5": { "inputs": {}, "name": "Need matched-cell writes", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasUpdates" } }, "operator": "==", "right": { "kind": "value", "value": true } } ] } ] } ] }, "n_13da5e4c75cffc4a": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_GOOGLE_SHEET_ID" }, "valueInputOption": { "kind": "value", "value": "USER_ENTERED" }, "data": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_69fcdede6a4706dc", "output": "value" } ] } }, "name": "Update matched cells", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The list of value ranges to update.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "range": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to write to." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to write into the range." }, "majorDimension": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The major dimension of the values array." } }, "required": [ "range", "values" ], "additionalProperties": false, "description": "A batch values update item." }, "minItems": 1, "description": "The list of value ranges to update." }, "nullable": false, "handle": "data" }, { "description": "How the input data should be interpreted.", "jsonSchema": { "type": "string", "enum": [ "INPUT_VALUE_OPTION_UNSPECIFIED", "RAW", "USER_ENTERED" ], "description": "How the input data should be interpreted." }, "nullable": true, "handle": "valueInputOption", "value": null }, { "description": "Whether to include the written values in the response.", "jsonSchema": { "type": "boolean", "description": "Whether to include the written values in the response." }, "nullable": true, "handle": "includeValuesInResponse", "value": null }, { "description": "How values in the response should be rendered.", "jsonSchema": { "type": "string", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values in the response should be rendered." }, "nullable": true, "handle": "responseValueRenderOption", "value": null }, { "description": "How dates in the response should be rendered.", "jsonSchema": { "type": "string", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates in the response should be rendered." }, "nullable": true, "handle": "responseDateTimeRenderOption", "value": null } ], "outputs": [ { "description": "The unique ID of the spreadsheet.", "jsonSchema": { "type": "string", "description": "The unique ID of the spreadsheet." }, "nullable": false, "handle": "spreadsheetId" }, { "description": "The total number of rows updated across all ranges.", "jsonSchema": { "type": "integer", "description": "The total number of rows updated across all ranges." }, "nullable": false, "handle": "totalUpdatedRows" }, { "description": "The total number of columns updated across all ranges.", "jsonSchema": { "type": "integer", "description": "The total number of columns updated across all ranges." }, "nullable": false, "handle": "totalUpdatedColumns" }, { "description": "The total number of cells updated across all ranges.", "jsonSchema": { "type": "integer", "description": "The total number of cells updated across all ranges." }, "nullable": false, "handle": "totalUpdatedCells" }, { "description": "The per-range update responses.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "updatedRange": { "type": "string", "description": "The A1 notation of the range that was updated." }, "updatedRows": { "type": "integer", "description": "The number of rows that were updated." }, "updatedColumns": { "type": "integer", "description": "The number of columns that were updated." }, "updatedCells": { "type": "integer", "description": "The number of cells that were updated." }, "updatedData": { "type": "object", "properties": { "range": { "type": "string", "description": "The A1 notation of the range." }, "majorDimension": { "type": "string", "description": "The major dimension of the values (ROWS or COLUMNS)." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." } }, "required": [ "range", "majorDimension", "values" ], "additionalProperties": false, "description": "The values of the cells after the update." } }, "required": [ "updatedRange", "updatedRows", "updatedColumns", "updatedCells" ], "additionalProperties": false, "description": "The batch update item schema." }, "description": "The per-range update responses." }, "nullable": false, "handle": "responses" } ], "name": "Update matched cells", "executor": { "kind": "connector", "action": "googlesheets.update_values_batch" } } }, "n_57ba183173098e8e": { "inputs": {}, "name": "Need new company rows", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasAppends" } }, "operator": "==", "right": { "kind": "value", "value": true } } ] } ] } ] }, "n_c1ab53382db1db57": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_GOOGLE_SHEET_ID" }, "valueInputOption": { "kind": "value", "value": "USER_ENTERED" }, "range": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "appendRange" } ] }, "values": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_2d276b77537a9f3f", "output": "value" } ] } }, "name": "Append new companies", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The A1 notation of the range to append values after.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to append values after." }, "nullable": false, "handle": "range" }, { "description": "The data to append.", "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to append." }, "nullable": false, "handle": "values" }, { "description": "The major dimension of the values array.", "jsonSchema": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The major dimension of the values array." }, "nullable": true, "handle": "majorDimension", "value": null }, { "description": "How the data should be inserted.", "jsonSchema": { "type": "string", "enum": [ "OVERWRITE", "INSERT_ROWS" ], "description": "How the data should be inserted." }, "nullable": true, "handle": "insertDataOption", "value": null }, { "description": "How the input data should be interpreted.", "jsonSchema": { "type": "string", "enum": [ "RAW", "USER_ENTERED" ], "description": "How the input data should be interpreted." }, "nullable": true, "handle": "valueInputOption", "value": null }, { "description": "Whether to include the appended values in the response.", "jsonSchema": { "type": "boolean", "description": "Whether to include the appended values in the response." }, "nullable": true, "handle": "includeValuesInResponse", "value": null }, { "description": "How values in the response should be rendered.", "jsonSchema": { "type": "string", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values in the response should be rendered." }, "nullable": true, "handle": "responseValueRenderOption", "value": null }, { "description": "How dates in the response should be rendered.", "jsonSchema": { "type": "string", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates in the response should be rendered." }, "nullable": true, "handle": "responseDateTimeRenderOption", "value": null } ], "outputs": [ { "description": "The unique ID of the spreadsheet.", "jsonSchema": { "type": "string", "description": "The unique ID of the spreadsheet." }, "nullable": false, "handle": "spreadsheetId" }, { "description": "The A1 notation of the range that was updated.", "jsonSchema": { "type": "string", "description": "The A1 notation of the range that was updated." }, "nullable": false, "handle": "updatedRange" }, { "description": "The number of rows that were updated.", "jsonSchema": { "type": "integer", "description": "The number of rows that were updated." }, "nullable": false, "handle": "updatedRows" }, { "description": "The number of columns that were updated.", "jsonSchema": { "type": "integer", "description": "The number of columns that were updated." }, "nullable": false, "handle": "updatedColumns" }, { "description": "The number of cells that were updated.", "jsonSchema": { "type": "integer", "description": "The number of cells that were updated." }, "nullable": false, "handle": "updatedCells" }, { "description": "The values of the cells after the update.", "jsonSchema": { "type": "object", "properties": { "range": { "type": "string", "description": "The A1 notation of the range." }, "majorDimension": { "type": "string", "description": "The major dimension of the values (ROWS or COLUMNS)." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." } }, "required": [ "range", "majorDimension", "values" ], "additionalProperties": false, "description": "The values of the cells after the update." }, "nullable": true, "handle": "updatedData" }, { "description": "The A1 notation of the table range that data was appended to.", "jsonSchema": { "type": "string", "description": "The A1 notation of the table range that data was appended to." }, "nullable": false, "handle": "tableRange" } ], "name": "Append new companies", "executor": { "kind": "connector", "action": "googlesheets.spreadsheets_values_append" } } }, "n_7259c29d446d6841": { "inputs": { "companyRecords": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "companyRecords" } ] }, "updatedRecords": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "updatedRecords" } ] }, "appendedRecords": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "appendedRecords" } ] }, "headerCellsExpected": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "headerCellsExpected" } ] }, "updateCellsExpected": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "updateCellsExpected" } ] }, "hasHeader": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasHeader" } ] }, "hasUpdates": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasUpdates" } ] }, "hasAppends": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasAppends" } ] }, "queryCount": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "queryCount" } ] }, "headerCells": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_414d849bfba64f65", "output": "totalUpdatedCells" } ] }, "updateCells": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_13da5e4c75cffc4a", "output": "totalUpdatedCells" } ] }, "appendRows": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_c1ab53382db1db57", "output": "updatedRows" } ] } }, "name": "Confirm sheet writes", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": true, "handle": "companyRecords" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": true, "handle": "updatedRecords" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": true, "handle": "appendedRecords" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": true, "handle": "headerCellsExpected" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": true, "handle": "updateCellsExpected" }, { "jsonSchema": { "type": "boolean" }, "nullable": true, "handle": "hasHeader" }, { "jsonSchema": { "type": "boolean" }, "nullable": true, "handle": "hasUpdates" }, { "jsonSchema": { "type": "boolean" }, "nullable": true, "handle": "hasAppends" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "queryCount" }, { "jsonSchema": { "type": "integer", "description": "The total number of cells updated across all ranges." }, "nullable": true, "handle": "headerCells" }, { "jsonSchema": { "type": "integer", "description": "The total number of cells updated across all ranges." }, "nullable": true, "handle": "updateCells" }, { "jsonSchema": { "type": "integer", "description": "The number of rows that were updated." }, "nullable": true, "handle": "appendRows" } ], "outputs": [ { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "queries" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "companyRecords" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "rowsUpdated" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "rowsAppended" } ], "name": "Confirm sheet writes", "moduleId": "n_4ac21f133827bad8", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_fc9a9b16a2195ed7": { "inputs": { "source": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "state" } ] }, "key": { "kind": "value", "value": "runId" } }, "name": "Use the active Actor run", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "source" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "key" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1, "description": "The Apify actor run identifier." }, "nullable": false, "handle": "value" } ], "name": "Use the active Actor run", "moduleId": "n_8c25843aea140548", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_56a215b83e4f675a": { "inputs": { "source": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_65f5473fdbfd17ee", "output": "state" } ] }, "key": { "kind": "value", "value": "datasetId" } }, "name": "Use the completed dataset", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "source" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "key" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1, "description": "The Apify dataset identifier." }, "nullable": false, "handle": "value" } ], "name": "Use the completed dataset", "moduleId": "n_8320f3216d624926", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_896df6aea7b2780a": { "inputs": { "source": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "request" } ] }, "key": { "kind": "value", "value": "headerData" } }, "name": "Prepare registry headers", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "source" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "key" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "range": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to write to." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to write into the range." }, "majorDimension": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The major dimension of the values array." } }, "required": [ "range", "values" ], "additionalProperties": false, "description": "A batch values update item." }, "minItems": 1, "description": "The list of value ranges to update." }, "nullable": false, "handle": "value" } ], "name": "Prepare registry headers", "moduleId": "n_1f90b240a529974f", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_69fcdede6a4706dc": { "inputs": { "source": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "request" } ] }, "key": { "kind": "value", "value": "updateData" }, "headerRequired": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasHeader" } ] }, "headerExpected": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "headerCellsExpected" } ] }, "headerActual": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_414d849bfba64f65", "output": "totalUpdatedCells" } ] } }, "name": "Prepare matched cells", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "source" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "key" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "headerRequired" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "headerExpected" }, { "jsonSchema": { "type": "integer", "description": "The total number of cells updated across all ranges." }, "nullable": true, "handle": "headerActual" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "range": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to write to." }, "values": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to write into the range." }, "majorDimension": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The major dimension of the values array." } }, "required": [ "range", "values" ], "additionalProperties": false, "description": "A batch values update item." }, "minItems": 1, "description": "The list of value ranges to update." }, "nullable": false, "handle": "value" } ], "name": "Prepare matched cells", "moduleId": "n_54ce535343b3954f", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_2d276b77537a9f3f": { "inputs": { "source": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "request" } ] }, "key": { "kind": "value", "value": "appendValues" }, "headerRequired": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasHeader" } ] }, "headerExpected": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "headerCellsExpected" } ] }, "headerActual": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_414d849bfba64f65", "output": "totalUpdatedCells" } ] }, "updateRequired": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "hasUpdates" } ] }, "updateExpected": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_822ee0b4642f5646", "output": "updateCellsExpected" } ] }, "updateActual": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_13da5e4c75cffc4a", "output": "totalUpdatedCells" } ] } }, "name": "Prepare new company rows", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "source" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "key" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "headerRequired" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "headerExpected" }, { "jsonSchema": { "type": "integer", "description": "The total number of cells updated across all ranges." }, "nullable": true, "handle": "headerActual" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "updateRequired" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "updateExpected" }, { "jsonSchema": { "type": "integer", "description": "The total number of cells updated across all ranges." }, "nullable": true, "handle": "updateActual" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data to append." }, "nullable": false, "handle": "value" } ], "name": "Prepare new company rows", "moduleId": "n_01a6cab2afe49611", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_0ac5303141469f76": { "name": "Enrichment receipt", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "queries" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "companyRecords" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "rowsUpdated" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "rowsAppended" } ], "outputMappings": { "queries": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7259c29d446d6841", "output": "queries" } ] }, "companyRecords": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7259c29d446d6841", "output": "companyRecords" } ] }, "rowsUpdated": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7259c29d446d6841", "output": "rowsUpdated" } ] }, "rowsAppended": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7259c29d446d6841", "output": "rowsAppended" } ] } } } }, "edges": [ { "source": "n_e1bd8eb1e7fb33d5", "target": "n_95fde90442dfc60c" }, { "source": "n_95fde90442dfc60c", "target": "n_6e6090a524f26cf4" }, { "source": "n_6e6090a524f26cf4", "target": "n_65f5473fdbfd17ee" }, { "source": "n_65f5473fdbfd17ee", "target": "n_a00476ebc6ad1010" }, { "source": "n_a00476ebc6ad1010", "target": "n_6d2a64f3cbdc8024", "sourceHandle": "start" }, { "source": "n_a00476ebc6ad1010", "target": "n_fc9a9b16a2195ed7", "sourceHandle": "poll" }, { "source": "n_fc9a9b16a2195ed7", "target": "n_af5e00af0baaf14a" }, { "source": "n_a00476ebc6ad1010", "target": "n_56a215b83e4f675a", "sourceHandle": "items" }, { "source": "n_56a215b83e4f675a", "target": "n_57f6785465fd0400" }, { "source": "n_6d2a64f3cbdc8024", "target": "n_65f5473fdbfd17ee" }, { "source": "n_af5e00af0baaf14a", "target": "n_65f5473fdbfd17ee" }, { "source": "n_57f6785465fd0400", "target": "n_65f5473fdbfd17ee" }, { "source": "n_a00476ebc6ad1010", "target": "n_c4de0fb4dab890f8", "sourceHandle": "otherwise" }, { "source": "n_c4de0fb4dab890f8", "target": "n_34e5fbac72fdd53c", "sourceHandle": "otherwise" }, { "source": "n_c4de0fb4dab890f8", "target": "n_7259c29d446d6841", "sourceHandle": "empty" }, { "source": "n_34e5fbac72fdd53c", "target": "n_822ee0b4642f5646" }, { "source": "n_822ee0b4642f5646", "target": "n_9d006702f777d15a" }, { "source": "n_9d006702f777d15a", "target": "n_896df6aea7b2780a", "sourceHandle": "yes" }, { "source": "n_896df6aea7b2780a", "target": "n_414d849bfba64f65" }, { "source": "n_9d006702f777d15a", "target": "n_6ad12b1d06e077e5", "sourceHandle": "otherwise" }, { "source": "n_414d849bfba64f65", "target": "n_6ad12b1d06e077e5" }, { "source": "n_6ad12b1d06e077e5", "target": "n_69fcdede6a4706dc", "sourceHandle": "yes" }, { "source": "n_69fcdede6a4706dc", "target": "n_13da5e4c75cffc4a" }, { "source": "n_6ad12b1d06e077e5", "target": "n_57ba183173098e8e", "sourceHandle": "otherwise" }, { "source": "n_13da5e4c75cffc4a", "target": "n_57ba183173098e8e" }, { "source": "n_57ba183173098e8e", "target": "n_2d276b77537a9f3f", "sourceHandle": "yes" }, { "source": "n_2d276b77537a9f3f", "target": "n_c1ab53382db1db57" }, { "source": "n_57ba183173098e8e", "target": "n_7259c29d446d6841", "sourceHandle": "otherwise" }, { "source": "n_c1ab53382db1db57", "target": "n_7259c29d446d6841" }, { "source": "n_7259c29d446d6841", "target": "n_0ac5303141469f76" } ] } }, "modules": { "n_f2a40318ccdb6777": { "name": "Prepare every company query", "imports": [], "source": "export default function prepareRegistryQueries({values}) {\n if(!Array.isArray(values))throw new Error('Sheet values must be a matrix.');\n if(!values.length)return {jobs:[],hasJobs:false};\n const headers=values[0];if(!Array.isArray(headers)||headers.some(h=>typeof h!=='string'||!h)||new Set(headers).size!==headers.length)throw new Error('Use unique, contiguous text headers.');\n const key=headers.indexOf('company');if(key<0)throw new Error('The sheet needs a company column.');\n const jobs=[];for(let i=1;iv==null||v===''))continue;const raw=row[key],company=typeof raw==='number'&&Number.isFinite(raw)?String(raw):raw;if(typeof company!=='string'||!company.trim())throw new Error('Each company row needs a name or registration number.');jobs.push({company});}\n return {jobs,hasJobs:jobs.length>0};\n}\n" }, "n_cfc0805e15b70e0b": { "name": "Collect registry results", "imports": [], "source": "export default function collectRegistryCompanies({jobs,previousState,startedRun,polledRun,items}) {\n const fields={company:'name',registrationNumber:'registrationNumber',vatNumber:'vatNumber',country:'countryName',registry:'registry',status:'status',incorporatedAt:'incorporatedAt',address:'address',city:'city',website:'website',registryUrl:'registryUrl'};\n const state=previousState??{index:0,records:[],stage:'new'};if(!Array.isArray(jobs)||!Array.isArray(state.records)||!Number.isInteger(state.index))throw new Error('Invalid registry collection state.');\n const finishJob=()=>{state.index++;state.stage='new';delete state.runId;delete state.datasetId;delete state.pollStartedAt;delete state.pollLimitMs;delete state.timeoutChecked;delete state.offset;};\n if(state.stage==='start'){\n if(!startedRun||typeof startedRun.id!=='string'||!startedRun.id)throw new Error('Actor start returned no run ID.');\n state.runId=startedRun.id;state.pollStartedAt=Date.now();state.pollLimitMs=86400000;state.timeoutChecked=false;state.stage='poll';\n }else if(state.stage==='poll'){\n if(!polledRun||polledRun.id!==state.runId||typeof polledRun.status!=='string'||!polledRun.status)throw new Error('The polled Actor run does not match the started run.');\n if(['SUCCEEDED','FAILED','TIMED-OUT','ABORTED'].includes(polledRun.status)){\n if(polledRun.status!=='SUCCEEDED')throw new Error('Actor did not succeed: '+polledRun.status);\n if(typeof polledRun.defaultDatasetId!=='string'||!polledRun.defaultDatasetId)throw new Error('Successful Actor returned no dataset ID.');\n state.datasetId=polledRun.defaultDatasetId;state.offset=0;state.stage='items';\n }else{\n if(!state.timeoutChecked){const secs=Number(polledRun.options?.timeoutSecs);if(Number.isFinite(secs)&&secs>0)state.pollLimitMs=secs*1000+300000;state.timeoutChecked=true;}\n if(Date.now()-state.pollStartedAt>state.pollLimitMs)throw new Error('Timed out waiting for Actor completion.');\n }\n }else if(state.stage==='items'){\n if(!Array.isArray(items)||items.length>1000)throw new Error('Invalid dataset page.');\n for(const item of items){if(!item||typeof item!=='object'||Array.isArray(item)||typeof item.name!=='string'||!item.name)throw new Error('Company result needs a nonempty name.');const record={};for(const[k,source]of Object.entries(fields)){const value=item[source];record[k]=value==null?null:typeof value==='object'?JSON.stringify(value):String(value);}state.records.push(record);}\n state.offset+=items.length;if(items.length<1000)finishJob();\n }\n let action=state.stage;if(state.stage==='new'){if(state.index>=jobs.length)action='complete';else{state.stage='start';action='start';}}\n return {state,action,input:{queries:state.index0,queryCount:jobs.length};\n}\n" }, "n_6165833c952a90a4": { "name": "Plan registry sheet writes", "imports": [], "source": "export default function planRegistryWrites({values,records,sheetName}) {\n if(!Array.isArray(values)||!Array.isArray(records)||typeof sheetName!=='string'||!sheetName)throw new Error('Invalid sheet write inputs.');\n const columns=['company','registrationNumber','vatNumber','country','registry','status','incorporatedAt','address','city','website','registryUrl'];\n const headers=values[0]??[];if(headers.some(h=>typeof h!=='string'||!h)||new Set(headers).size!==headers.length)throw new Error('Use unique, contiguous text headers.');if(!headers.includes('company'))throw new Error('The target sheet needs a company column.');\n const finalHeaders=[...headers,...columns.filter(k=>!headers.includes(k))],key=headers.indexOf('company'),sheet=\"'\"+sheetName.replaceAll(\"'\",\"''\")+\"'\",column=n=>{let s='';for(n++;n;n=Math.floor((n-1)/26))s=String.fromCharCode(65+(n-1)%26)+s;return s;};\n const existing=new Map();for(let i=1;irecord[h]??''));}\n return {headerCellsExpected:finalHeaders.length,updateCellsExpected:updateData.length,request:{...(headerData.length?{headerData}:{}),...(updateData.length?{updateData}:{}),...(appendValues.length?{appendValues}:{})},hasHeader:headerData.length>0,hasUpdates:updateData.length>0,hasAppends:appendValues.length>0,updatedRecords,appendedRecords:appendValues.length,companyRecords:records.length,appendRange:sheet+'!A1:'+column(finalHeaders.length-1)+'1'};\n}\n" }, "n_4ac21f133827bad8": { "name": "Confirm sheet writes", "imports": [], "source": "export default function registryReceipt({queryCount,companyRecords,updatedRecords,appendedRecords,hasHeader,hasUpdates,hasAppends,headerCellsExpected,updateCellsExpected,headerCells,updateCells,appendRows}) {\n if(companyRecords==null)return {queries:queryCount,companyRecords:0,rowsUpdated:0,rowsAppended:0};\n if(hasHeader&&headerCells!==headerCellsExpected)throw new Error('Header write receipt does not match the request.');\n if(hasUpdates&&updateCells!==updateCellsExpected)throw new Error('Cell update receipt does not match the request.');\n if(hasAppends&&appendRows!==appendedRecords)throw new Error('Append receipt does not match the request.');\n return {queries:queryCount,companyRecords,rowsUpdated:updatedRecords,rowsAppended:appendedRecords};\n}\n" }, "n_8c25843aea140548": { "name": "Use the active Actor run", "imports": [], "source": "export default function prepareRegistryRequest({source,key,headerRequired,headerExpected,headerActual,updateRequired,updateExpected,updateActual}) {\n // Validate a completed stage before allowing a later mutation to start.\n if(headerRequired&&headerActual!==headerExpected)throw new Error('Header write receipt does not match the request.');\n if(updateRequired&&updateActual!==updateExpected)throw new Error('Cell update receipt does not match the request.');\n if(!source||typeof source!=='object'||Array.isArray(source)||typeof key!=='string')throw new Error('Invalid registry request context.');\n const value=source[key];if(value==null||(typeof value==='string'&&!value)||(Array.isArray(value)&&!value.length))throw new Error('The selected registry request has no '+key+'.');\n return {value};\n}\n" }, "n_8320f3216d624926": { "name": "Use the completed dataset", "imports": [], "source": "export default function prepareRegistryRequest({source,key,headerRequired,headerExpected,headerActual,updateRequired,updateExpected,updateActual}) {\n // Validate a completed stage before allowing a later mutation to start.\n if(headerRequired&&headerActual!==headerExpected)throw new Error('Header write receipt does not match the request.');\n if(updateRequired&&updateActual!==updateExpected)throw new Error('Cell update receipt does not match the request.');\n if(!source||typeof source!=='object'||Array.isArray(source)||typeof key!=='string')throw new Error('Invalid registry request context.');\n const value=source[key];if(value==null||(typeof value==='string'&&!value)||(Array.isArray(value)&&!value.length))throw new Error('The selected registry request has no '+key+'.');\n return {value};\n}\n" }, "n_1f90b240a529974f": { "name": "Prepare registry headers", "imports": [], "source": "export default function prepareRegistryRequest({source,key,headerRequired,headerExpected,headerActual,updateRequired,updateExpected,updateActual}) {\n // Validate a completed stage before allowing a later mutation to start.\n if(headerRequired&&headerActual!==headerExpected)throw new Error('Header write receipt does not match the request.');\n if(updateRequired&&updateActual!==updateExpected)throw new Error('Cell update receipt does not match the request.');\n if(!source||typeof source!=='object'||Array.isArray(source)||typeof key!=='string')throw new Error('Invalid registry request context.');\n const value=source[key];if(value==null||(typeof value==='string'&&!value)||(Array.isArray(value)&&!value.length))throw new Error('The selected registry request has no '+key+'.');\n return {value};\n}\n" }, "n_54ce535343b3954f": { "name": "Prepare matched cells", "imports": [], "source": "export default function prepareRegistryRequest({source,key,headerRequired,headerExpected,headerActual,updateRequired,updateExpected,updateActual}) {\n // Validate a completed stage before allowing a later mutation to start.\n if(headerRequired&&headerActual!==headerExpected)throw new Error('Header write receipt does not match the request.');\n if(updateRequired&&updateActual!==updateExpected)throw new Error('Cell update receipt does not match the request.');\n if(!source||typeof source!=='object'||Array.isArray(source)||typeof key!=='string')throw new Error('Invalid registry request context.');\n const value=source[key];if(value==null||(typeof value==='string'&&!value)||(Array.isArray(value)&&!value.length))throw new Error('The selected registry request has no '+key+'.');\n return {value};\n}\n" }, "n_01a6cab2afe49611": { "name": "Prepare new company rows", "imports": [], "source": "export default function prepareRegistryRequest({source,key,headerRequired,headerExpected,headerActual,updateRequired,updateExpected,updateActual}) {\n // Validate a completed stage before allowing a later mutation to start.\n if(headerRequired&&headerActual!==headerExpected)throw new Error('Header write receipt does not match the request.');\n if(updateRequired&&updateActual!==updateExpected)throw new Error('Cell update receipt does not match the request.');\n if(!source||typeof source!=='object'||Array.isArray(source)||typeof key!=='string')throw new Error('Invalid registry request context.');\n const value=source[key];if(value==null||(typeof value==='string'&&!value)||(Array.isArray(value)&&!value.length))throw new Error('The selected registry request has no '+key+'.');\n return {value};\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }