{ "kind": "open-flow-workflow", "version": 1, "name": "Scheduled Scrappey Page Fetch", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_56b722b293e3bf28": { "name": "Daily at midnight UTC", "kind": "cron", "cronTimes": [ { "type": "cron", "expression": "0 0 * * *", "timezone": "UTC" } ] }, "n_8e2e44f415f67610": { "inputs": { "url": { "kind": "value", "value": "https://example.com" } }, "name": "Configure the page URL", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Configure the page URL", "moduleId": "n_60acdf0f4dd55f94", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_5ffcb0a09ab9544e": { "inputs": { "url": { "kind": "value", "value": "https://publisher.scrappey.com/api/v1" }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8e2e44f415f67610", "output": "body" } ] }, "auth.token": { "kind": "unset" } }, "name": "Fetch the page with Scrappey", "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": "Fetch the page with Scrappey", "executor": { "method": "POST", "query": { "mode": "fields", "names": [] }, "headers": { "mode": "fields", "names": [] }, "bodyFormat": "json", "authentication": { "type": "apiKey", "name": "key", "in": "query" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_7e9c4be5d5292092": { "name": "Scrappey response", "kind": "outputs", "outputDefs": [ { "jsonSchema": {}, "nullable": true, "handle": "response" } ], "outputMappings": { "response": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_5ffcb0a09ab9544e", "output": "body" } ] } } } }, "edges": [ { "source": "n_56b722b293e3bf28", "target": "n_8e2e44f415f67610" }, { "source": "n_8e2e44f415f67610", "target": "n_5ffcb0a09ab9544e" }, { "source": "n_5ffcb0a09ab9544e", "target": "n_7e9c4be5d5292092" } ] } }, "modules": { "n_60acdf0f4dd55f94": { "name": "Configure the page URL", "imports": [], "source": "export default function setup({url}) {\n if (typeof url !== 'string' || !/^https?:\\/\\/[^\\/?#@\\s]+(?:[\\/?#][^\\s]*)?$/i.test(url) || url.includes('YOUR_')) throw Error('Configure an HTTP or HTTPS page URL without credentials');\n return {body:{cmd:'request.get',url}};\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }