{ "kind": "open-flow-workflow", "version": 1, "name": "Find LinkedIn Profiles for Sheet Rows", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_db1e2a8ef1012cdc": { "name": "Run manually", "kind": "start", "inputDefs": [] }, "n_c84bec21755f85a3": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_SPREADSHEET_ID" }, "range": { "kind": "value", "value": "'Sheet1'!A:ZZZ" }, "majorDimension": { "kind": "value", "value": "ROWS" } }, "name": "Read people from the sheet", "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 people from the sheet", "executor": { "kind": "connector", "action": "googlesheets.values_get" } } }, "n_d8be5a0802856d6b": { "inputs": { "values": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_c84bec21755f85a3", "output": "values" } ] }, "sheet": { "kind": "value", "value": "Sheet1" } }, "name": "Identify sheet rows", "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": "string" }, "nullable": false, "handle": "sheet" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "rows" } ], "name": "Identify sheet rows", "moduleId": "n_6454f6c7a07014a1", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_8bed1c520ad93440": { "inputs": { "rows": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_d8be5a0802856d6b", "output": "rows" } ] }, "previous": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8bed1c520ad93440", "output": "state" } ] } }, "name": "Select the next person", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "rows" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previous" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "person" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "range" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "name": "Select the next person", "moduleId": "n_0eb6e020a25153dd", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_efd88d6a1ec92243": { "inputs": {}, "name": "More people?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_8bed1c520ad93440", "output": "more" } }, "operator": "isTrue" } ] } ] } ] }, "n_cb95b592db448b1b": { "inputs": { "url": { "kind": "value", "value": "https://api.airtop.ai/api/v1/sessions" }, "body": { "kind": "value", "value": {} }, "auth.token": { "kind": "unset" } }, "name": "Create an Airtop session", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "auth.token" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Create an Airtop session", "executor": { "method": "POST", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "json", "authentication": { "type": "bearer" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_a1c347ae7cd3286e": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_cb95b592db448b1b", "output": "body" } ] } }, "name": "Check the session", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "windowUrl" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "terminateUrl" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "ready" } ], "name": "Check the session", "moduleId": "n_f796d3696739c314", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_78a47c946a2f90d9": { "inputs": {}, "name": "Session ready?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_a1c347ae7cd3286e", "output": "ready" } }, "operator": "isTrue" } ] } ] } ] }, "n_5aebcc74d0a97ef9": { "inputs": {}, "name": "Wait for the browser", "kind": "wait", "inputDefinitions": [], "prompt": "Wait for the browser", "autoContinue": { "kind": "after", "durationMs": 5000 } }, "n_b5223ca263a1a90a": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a1c347ae7cd3286e", "output": "terminateUrl" } ] }, "auth.token": { "kind": "unset" } }, "name": "Check browser readiness", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "auth.token" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Check browser readiness", "executor": { "method": "GET", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "none", "authentication": { "type": "bearer" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_16e5397eed4680a4": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b5223ca263a1a90a", "output": "body" } ] }, "previous": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_16e5397eed4680a4", "output": "state" } ] }, "sessionUrl": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a1c347ae7cd3286e", "output": "terminateUrl" } ] } }, "name": "Evaluate browser readiness", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previous" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "sessionUrl" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "ready" } ], "name": "Evaluate browser readiness", "moduleId": "n_14a673ad34ed03b1", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a7daae2e6884a260": { "inputs": {}, "name": "Browser ready?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_16e5397eed4680a4", "output": "ready" } }, "operator": "isTrue" } ] } ] } ] }, "n_2a9d9b04d7e65ebd": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8bed1c520ad93440", "output": "url" } ] } }, "name": "Prepare the search URL", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Prepare the search URL", "moduleId": "n_d5ca8ca2b74568da", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_676acbf02eddcf00": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a1c347ae7cd3286e", "output": "windowUrl" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_2a9d9b04d7e65ebd", "output": "body" } ] }, "auth.token": { "kind": "unset" } }, "name": "Open the search results", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "auth.token" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Open the search results", "executor": { "method": "POST", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "json", "authentication": { "type": "bearer" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_1739867ac431bf4f": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_676acbf02eddcf00", "output": "body" } ] }, "terminateUrl": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a1c347ae7cd3286e", "output": "terminateUrl" } ] }, "person": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8bed1c520ad93440", "output": "person" } ] } }, "name": "Prepare the profile query", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "terminateUrl" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "person" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "query" } ], "name": "Prepare the profile query", "moduleId": "n_fba8a488c33bad31", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_22dc7eaf18dee324": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1739867ac431bf4f", "output": "url" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1739867ac431bf4f", "output": "query" } ] }, "auth.token": { "kind": "unset" } }, "name": "Find the profile", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "auth.token" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Find the profile", "executor": { "method": "POST", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "json", "authentication": { "type": "bearer" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_03c6e692e1ae8707": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_22dc7eaf18dee324", "output": "body" } ] } }, "name": "Check the profile URL", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" } ], "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 write into the range." }, "nullable": false, "handle": "values" } ], "name": "Check the profile URL", "moduleId": "n_358dd138a6619fcb", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_0c58029c830b04d1": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a1c347ae7cd3286e", "output": "terminateUrl" } ] }, "auth.token": { "kind": "unset" } }, "name": "Close the Airtop session", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "auth.token" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Close the Airtop session", "executor": { "method": "DELETE", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "none", "authentication": { "type": "bearer" }, "responseFormat": "text", "statusPolicy": "success", "kind": "http-request" } } }, "n_8e3ae885d122f1bc": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_SPREADSHEET_ID" }, "range": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8bed1c520ad93440", "output": "range" } ] }, "values": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_03c6e692e1ae8707", "output": "values" } ] }, "valueInputOption": { "kind": "value", "value": "RAW" } }, "name": "Update the profile cell", "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 write to.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to write to." }, "nullable": false, "handle": "range" }, { "description": "The data to write into 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 to write into the range." }, "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 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 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 }, { "description": "Whether to auto-expand the sheet to fit the written data.", "jsonSchema": { "type": "boolean", "description": "Whether to auto-expand the sheet to fit the written data." }, "nullable": true, "handle": "autoExpandSheet", "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" } ], "name": "Update the profile cell", "executor": { "kind": "connector", "action": "googlesheets.values_update" } } } }, "edges": [ { "source": "n_db1e2a8ef1012cdc", "target": "n_c84bec21755f85a3" }, { "source": "n_c84bec21755f85a3", "target": "n_d8be5a0802856d6b" }, { "source": "n_d8be5a0802856d6b", "target": "n_8bed1c520ad93440" }, { "source": "n_8bed1c520ad93440", "target": "n_efd88d6a1ec92243" }, { "source": "n_efd88d6a1ec92243", "target": "n_cb95b592db448b1b", "sourceHandle": "yes" }, { "source": "n_cb95b592db448b1b", "target": "n_a1c347ae7cd3286e" }, { "source": "n_a1c347ae7cd3286e", "target": "n_78a47c946a2f90d9" }, { "source": "n_78a47c946a2f90d9", "target": "n_2a9d9b04d7e65ebd", "sourceHandle": "yes" }, { "source": "n_78a47c946a2f90d9", "target": "n_5aebcc74d0a97ef9", "sourceHandle": "otherwise" }, { "source": "n_5aebcc74d0a97ef9", "target": "n_b5223ca263a1a90a", "sourceHandle": "continue" }, { "source": "n_b5223ca263a1a90a", "target": "n_16e5397eed4680a4" }, { "source": "n_16e5397eed4680a4", "target": "n_a7daae2e6884a260" }, { "source": "n_a7daae2e6884a260", "target": "n_2a9d9b04d7e65ebd", "sourceHandle": "yes" }, { "source": "n_a7daae2e6884a260", "target": "n_5aebcc74d0a97ef9", "sourceHandle": "otherwise" }, { "source": "n_2a9d9b04d7e65ebd", "target": "n_676acbf02eddcf00" }, { "source": "n_676acbf02eddcf00", "target": "n_1739867ac431bf4f" }, { "source": "n_1739867ac431bf4f", "target": "n_22dc7eaf18dee324" }, { "source": "n_22dc7eaf18dee324", "target": "n_03c6e692e1ae8707" }, { "source": "n_03c6e692e1ae8707", "target": "n_0c58029c830b04d1" }, { "source": "n_0c58029c830b04d1", "target": "n_8e3ae885d122f1bc" }, { "source": "n_8e3ae885d122f1bc", "target": "n_8bed1c520ad93440" } ] } }, "modules": { "n_6454f6c7a07014a1": { "name": "Identify sheet rows", "imports": [], "source": "export default function plan({values,sheet}){if(!Array.isArray(values)||!values.length) return {rows:[]};const h=values[0],p=h.indexOf('Person Info'),u=h.indexOf('Linkedin URL');if(p<0||u<0||h.lastIndexOf('Person Info')!==p||h.lastIndexOf('Linkedin URL')!==u)throw Error('Sheet requires unique Person Info and Linkedin URL headers');let n=u+1,col='';while(n){n--;col=String.fromCharCode(65+n%26)+col;n=Math.floor(n/26)}const tab=\"'\"+sheet.replaceAll(\"'\",\"''\")+\"'\";return {rows:values.slice(1).map((r,i)=>({person:String(r[p]??''),range:`${tab}!${col}${i+2}`})).filter(x=>x.person.trim())};}\n" }, "n_0eb6e020a25153dd": { "name": "Select the next person", "imports": [], "source": "export default function next({rows,previous}){const index=(previous?.index??-1)+1;if(index>=rows.length)return{state:{index},more:false,person:'',range:'A1',url:'https://www.google.com/'};const r=rows[index];return{state:{index},more:true,person:r.person,range:r.range,url:'https://www.google.com/search?q='+encodeURIComponent(r.person)};}\n" }, "n_f796d3696739c314": { "name": "Check the session", "imports": [], "source": "export default function session({body}){const x=body?.data;if(!x||typeof x.id!=='string'||!/^[-a-z0-9]+$/i.test(x.id)||body.errors?.length)throw Error('Invalid Airtop session');const base='https://api.airtop.ai/api/v1/sessions/'+encodeURIComponent(x.id);if(!['initializing','running','active'].includes(x.status))throw Error('Invalid Airtop session state');return {windowUrl:base+'/windows',terminateUrl:base,ready:x.status==='running'||x.status==='active'};}\n" }, "n_14a673ad34ed03b1": { "name": "Evaluate browser readiness", "imports": [], "source": "export default function poll({body,previous,sessionUrl}){const count=(previous?.sessionUrl===sessionUrl?previous.count:0)+1;if(body?.errors?.length||!['initializing','running','active'].includes(body?.data?.status))throw Error('Invalid Airtop session status');if(count>=60&&body.data.status==='initializing')throw Error('Airtop session did not become ready');return{state:{count,sessionUrl},ready:body.data.status!=='initializing'};}\n" }, "n_d5ca8ca2b74568da": { "name": "Prepare the search URL", "imports": [], "source": "export default function run({url}) { return {body:{url}}; }" }, "n_fba8a488c33bad31": { "name": "Prepare the profile query", "imports": [], "source": "export default function query({body,terminateUrl,person}){const id=body?.data?.windowId;if(typeof id!=='string'||!/^[-a-z0-9]+$/i.test(id)||body.errors?.length)throw Error('Invalid Airtop window');return{url:terminateUrl+'/windows/'+encodeURIComponent(id)+'/page-query',query:{prompt:`This is Google Search results. the first results should be the Linkedin Page of ${person}\\nReturn the Linkedin URL and nothing else.\\nIf you cannot find the Linkedin URL, return an empty string.\\nA valid Linkedin profile URL starts with \"https://www.linkedin.com/in/\"`}};}\n" }, "n_358dd138a6619fcb": { "name": "Check the profile URL", "imports": [], "source": "export default function result({body}){if(body?.errors?.length||typeof body?.data?.modelResponse!=='string')throw Error('Invalid Airtop response');const s=body.data.modelResponse.trim();if(s&&!/^https:\\/\\/www\\.linkedin\\.com\\/in\\/[^\\s]+$/i.test(s))throw Error('Airtop did not return a LinkedIn profile URL');return {values:[[s]]};}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }