{ "kind": "open-flow-workflow", "version": 1, "name": "German Synonym Lookup", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_e7ef29c85c8426bd": { "name": "Run synonym lookup", "kind": "start", "inputDefs": [] }, "n_aec93da4019a0fdb": { "inputs": { "url": { "kind": "value", "value": "https://www.openthesaurus.de/synonyme/search" }, "query.q": { "kind": "value", "value": "Hallo" }, "query.format": { "kind": "value", "value": "application/json" }, "header.User-Agent": { "kind": "value", "value": "https://openflow.run" } }, "name": "Look up German synonyms", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" }, { "jsonSchema": { "anyOf": [ { "type": [ "string", "number", "boolean" ] }, { "type": "array", "items": { "type": [ "string", "number", "boolean" ] } } ] }, "nullable": true, "handle": "query.q" }, { "jsonSchema": { "anyOf": [ { "type": [ "string", "number", "boolean" ] }, { "type": "array", "items": { "type": [ "string", "number", "boolean" ] } } ] }, "nullable": true, "handle": "query.format" }, { "jsonSchema": { "type": "string" }, "nullable": true, "handle": "header.User-Agent" } ], "outputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": { "type": "string" } }, "nullable": false, "handle": "headers" } ], "name": "Look up German synonyms", "executor": { "method": "GET", "query": { "mode": "fields", "names": [ "q", "format" ] }, "headers": { "mode": "fields", "names": [ "User-Agent" ] }, "bodyFormat": "none", "authentication": { "type": "none" }, "responseFormat": "json", "statusPolicy": "success", "kind": "http-request" } } }, "n_a383dbc5c21799c2": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_aec93da4019a0fdb", "output": "body" } ] } }, "name": "Read synonym groups", "kind": "task", "task": { "inputs": [ { "jsonSchema": {}, "nullable": true, "handle": "body" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "synsets" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "count" } ], "name": "Read synonym groups", "moduleId": "n_c34ea55ff7683a36", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_d9e3927522a169e9": { "name": "Synonym groups", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "synsets" }, { "jsonSchema": { "type": "integer", "minimum": 0 }, "nullable": false, "handle": "count" } ], "outputMappings": { "synsets": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a383dbc5c21799c2", "output": "synsets" } ] }, "count": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a383dbc5c21799c2", "output": "count" } ] } } } }, "edges": [ { "source": "n_e7ef29c85c8426bd", "target": "n_aec93da4019a0fdb" }, { "source": "n_aec93da4019a0fdb", "target": "n_a383dbc5c21799c2" }, { "source": "n_a383dbc5c21799c2", "target": "n_d9e3927522a169e9" } ] } }, "modules": { "n_c34ea55ff7683a36": { "name": "Read synonym groups", "imports": [], "source": "export default function synonymResult({ body }) {\n if (!body || typeof body !== 'object' || !Array.isArray(body.synsets) || body.synsets.some((group) => !group || typeof group !== 'object' || Array.isArray(group))) throw new Error('OpenThesaurus returned an invalid synonym-group response');\n return { synsets: body.synsets, count: body.synsets.length };\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }