{ "kind": "open-flow-workflow", "version": 1, "name": "Get a Facebook Profile First and Last Name", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_06e03385e15c158a": { "name": "Run profile lookup", "kind": "start", "inputDefs": [] }, "n_118e4cc3a9276398": { "inputs": { "endpoint": { "kind": "value", "value": "/me" }, "query": { "kind": "value", "value": { "fields": "last_name,first_name" } } }, "name": "Read the profile", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "endpoint" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": [ "string", "number", "boolean", "null" ] } }, "nullable": true, "handle": "query" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" }, { "jsonSchema": { "const": "base64" }, "nullable": true, "handle": "bodyEncoding" } ], "name": "Read the profile", "executor": { "providerId": "meta", "method": "GET", "query": { "mode": "object", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "none", "kind": "connector-proxy" } } }, "n_10ea9215faad7717": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_118e4cc3a9276398", "output": "body" } ] }, "statusCode": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_118e4cc3a9276398", "output": "statusCode" } ] } }, "name": "Check the response", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "profile" } ], "name": "Check the response", "moduleId": "n_63674912b1168687", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_cbec7681e1ef55a5": { "name": "Profile", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "profile" } ], "outputMappings": { "profile": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_10ea9215faad7717", "output": "profile" } ] } } } }, "edges": [ { "source": "n_06e03385e15c158a", "target": "n_118e4cc3a9276398" }, { "source": "n_118e4cc3a9276398", "target": "n_10ea9215faad7717" }, { "source": "n_10ea9215faad7717", "target": "n_cbec7681e1ef55a5" } ] } }, "modules": { "n_63674912b1168687": { "name": "Check the response", "imports": [], "source": "export default function result({body,statusCode}){if(statusCode!==200||!body||typeof body!=='object'||Array.isArray(body)||body.error)throw Error('Facebook profile lookup failed');return{profile:body}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }