{ "kind": "open-flow-workflow", "version": 1, "name": "Identify a Vero User", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_c2475c4b7ca2475d": { "name": "Enter the user ID", "kind": "start", "inputDefs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "id" } ] }, "n_a05998da8fe716d8": { "inputs": { "id": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_c2475c4b7ca2475d", "output": "id" } ] }, "token": { "kind": "unset" } }, "name": "Identify the Vero user", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "id" }, { "jsonSchema": { "type": "string" }, "nullable": true, "handle": "token" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "result" } ], "name": "Identify the Vero user", "moduleId": "n_3ed7dfd740653447", "capabilities": [ { "kind": "http", "hosts": [ "api.getvero.com" ] } ] } }, "n_c64fd09954ab53ed": { "name": "Vero response", "kind": "outputs", "outputDefs": [ { "jsonSchema": {}, "nullable": true, "handle": "result" } ], "outputMappings": { "result": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a05998da8fe716d8", "output": "result" } ] } } } }, "edges": [ { "source": "n_c2475c4b7ca2475d", "target": "n_a05998da8fe716d8" }, { "source": "n_a05998da8fe716d8", "target": "n_c64fd09954ab53ed" } ] } }, "modules": { "n_3ed7dfd740653447": { "name": "Identify the Vero user", "imports": [], "source": "export default async function identify({id,token},context){if(typeof token!=='string'||!token)throw Error('Configure the Vero token');const response=await context.fetch('https://api.getvero.com/api/v2/users/track',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({auth_token:token,id})});if(!response.ok)throw Error('Vero identify request failed');return {result:await response.json()};}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }