{ "kind": "open-flow-workflow", "version": 1, "name": "Check Email Deliverability with Uproc", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_03f2d7c6ed14eb3c": { "name": "Enter an email address", "kind": "start", "inputDefs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "email" } ] }, "n_5d97201ffe20d6b3": { "inputs": { "email": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_03f2d7c6ed14eb3c", "output": "email" } ] } }, "name": "Prepare email lookup", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "email" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Prepare email lookup", "moduleId": "n_e28b3360978759d4", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_b8d77e7b2b3470d8": { "inputs": { "url": { "kind": "value", "value": "https://api.uproc.io/api/v2/process" }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_5d97201ffe20d6b3", "output": "body" } ] }, "auth.username": { "kind": "unset" }, "auth.password": { "kind": "unset" } }, "name": "Check the email recipient", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "auth.username" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "auth.password" } ], "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 the email recipient", "executor": { "method": "POST", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "json", "authentication": { "type": "basic" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_cc2bc496ef6929f3": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b8d77e7b2b3470d8", "output": "body" } ] } }, "name": "Check deliverability", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "results" } ], "name": "Check deliverability", "moduleId": "n_480eed487752e0af", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_30554375749891fc": { "name": "Email results", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "results" } ], "outputMappings": { "results": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_cc2bc496ef6929f3", "output": "results" } ] } } } }, "edges": [ { "source": "n_03f2d7c6ed14eb3c", "target": "n_5d97201ffe20d6b3" }, { "source": "n_5d97201ffe20d6b3", "target": "n_b8d77e7b2b3470d8" }, { "source": "n_b8d77e7b2b3470d8", "target": "n_cc2bc496ef6929f3" }, { "source": "n_cc2bc496ef6929f3", "target": "n_30554375749891fc" } ] } }, "modules": { "n_e28b3360978759d4": { "name": "Prepare email lookup", "imports": [], "source": "export default function prepare({email}) { if(typeof email!=='string'||!email)throw Error('Enter an email address');return{body:{processor:'check-email-exists',params:{email}}}; }\n" }, "n_480eed487752e0af": { "name": "Check deliverability", "imports": [], "source": "export default function results({body}){const rows=Array.isArray(body)?body:[body];return{results:rows.map(response=>({response,deliverable:response?.message?.response==='deliverable'}))}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }