{ "kind": "open-flow-workflow", "version": 1, "name": "Create, Update, and Read a Taiga Issue", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_0ea4b456af540ed5": { "name": "Create an issue", "kind": "start", "inputDefs": [] }, "n_a3475c5b7455443e": { "inputs": { "project": { "kind": "value", "value": 0 }, "subject": { "kind": "value", "value": "n8n-docs" } }, "name": "Configure the issue", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "project" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "subject" } ], "outputs": [ { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "project" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The item subject." }, "nullable": false, "handle": "subject" } ], "name": "Configure the issue", "moduleId": "n_be62e33eb47244e5", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_c14b42849a7e6cf2": { "inputs": { "project": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a3475c5b7455443e", "output": "project" } ] }, "subject": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a3475c5b7455443e", "output": "subject" } ] } }, "name": "Create the issue", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "project" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The item subject." }, "nullable": false, "handle": "subject" } ], "outputs": [ { "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Taiga resource record returned by the instance." }, "nullable": false, "handle": "issue" } ], "name": "Create the issue", "moduleId": "n_100ede5a6d297961", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [ { "action": "taiga.create_issue" } ] } ] } }, "n_ebd9444244364bd9": { "inputs": { "issue": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_c14b42849a7e6cf2", "output": "issue" } ] } }, "name": "Use the created issue ID", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Taiga resource record returned by the instance." }, "nullable": false, "handle": "issue" } ], "outputs": [ { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "id" } ], "name": "Use the created issue ID", "moduleId": "n_174e63f9b06858e9", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_8604029af6646dfb": { "inputs": { "issueId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ebd9444244364bd9", "output": "id" } ] } }, "name": "Read the current version", "kind": "task", "task": { "inputs": [ { "description": "The numeric Taiga resource ID.", "jsonSchema": { "type": "integer", "minimum": 1, "description": "The numeric Taiga resource ID." }, "nullable": false, "handle": "issueId" } ], "outputs": [ { "description": "A Taiga resource record returned by the instance.", "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Taiga resource record returned by the instance." }, "nullable": false, "handle": "issue" } ], "name": "Read the current version", "executor": { "kind": "connector", "action": "taiga.get_issue" } } }, "n_a99fcebfc1f19f7c": { "inputs": { "issue": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8604029af6646dfb", "output": "issue" } ] }, "expectedId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ebd9444244364bd9", "output": "id" } ] }, "description": { "kind": "value", "value": "This ticket is for the documentation for the Taiga node" } }, "name": "Prepare the description update", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Taiga resource record returned by the instance." }, "nullable": false, "handle": "issue" }, { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "expectedId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "description" } ], "outputs": [ { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "id" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "version" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "description" } ], "name": "Prepare the description update", "moduleId": "n_4cb1058118f05aa9", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_3cb6d87e7ba289ea": { "inputs": { "issueId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a99fcebfc1f19f7c", "output": "id" } ] }, "version": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a99fcebfc1f19f7c", "output": "version" } ] }, "description": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a99fcebfc1f19f7c", "output": "description" } ] } }, "name": "Update the description", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "issueId" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "version" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "description" } ], "outputs": [ { "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Taiga resource record returned by the instance." }, "nullable": false, "handle": "issue" } ], "name": "Update the description", "moduleId": "n_8fbc8f246fec4c89", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [ { "action": "taiga.update_issue" } ] } ] } }, "n_ea7b806c188d76c2": { "inputs": { "issue": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_3cb6d87e7ba289ea", "output": "issue" } ] }, "expectedId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a99fcebfc1f19f7c", "output": "id" } ] } }, "name": "Confirm the issue update", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Taiga resource record returned by the instance." }, "nullable": false, "handle": "issue" }, { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "expectedId" } ], "outputs": [ { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "id" } ], "name": "Confirm the issue update", "moduleId": "n_1b2beff668fd0a8b", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_565435c6f309f6ca": { "inputs": { "issueId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ea7b806c188d76c2", "output": "id" } ] } }, "name": "Read the same issue", "kind": "task", "task": { "inputs": [ { "description": "The numeric Taiga resource ID.", "jsonSchema": { "type": "integer", "minimum": 1, "description": "The numeric Taiga resource ID." }, "nullable": false, "handle": "issueId" } ], "outputs": [ { "description": "A Taiga resource record returned by the instance.", "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Taiga resource record returned by the instance." }, "nullable": false, "handle": "issue" } ], "name": "Read the same issue", "executor": { "kind": "connector", "action": "taiga.get_issue" } } }, "n_2b81b69c1f43fda6": { "name": "Taiga issue", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A Taiga resource record returned by the instance." }, "nullable": false, "handle": "issue" } ], "outputMappings": { "issue": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_565435c6f309f6ca", "output": "issue" } ] } } } }, "edges": [ { "source": "n_0ea4b456af540ed5", "target": "n_a3475c5b7455443e" }, { "source": "n_a3475c5b7455443e", "target": "n_c14b42849a7e6cf2" }, { "source": "n_c14b42849a7e6cf2", "target": "n_ebd9444244364bd9" }, { "source": "n_ebd9444244364bd9", "target": "n_8604029af6646dfb" }, { "source": "n_8604029af6646dfb", "target": "n_a99fcebfc1f19f7c" }, { "source": "n_a99fcebfc1f19f7c", "target": "n_3cb6d87e7ba289ea" }, { "source": "n_3cb6d87e7ba289ea", "target": "n_ea7b806c188d76c2" }, { "source": "n_ea7b806c188d76c2", "target": "n_565435c6f309f6ca" }, { "source": "n_565435c6f309f6ca", "target": "n_2b81b69c1f43fda6" } ] } }, "modules": { "n_be62e33eb47244e5": { "name": "Configure the issue", "imports": [], "source": "export default function configure({ project, subject }) {if(!Number.isSafeInteger(project)||project<=0)throw Error('Enter your Taiga project ID');if(typeof subject!=='string'||!subject.trim())throw Error('Enter a subject');return{project,subject}}\n" }, "n_100ede5a6d297961": { "name": "Create the issue", "imports": [], "source": "export default async function createIssue({project,subject},context){return await context.actions.call('taiga.create_issue',{project,subject});}\n" }, "n_174e63f9b06858e9": { "name": "Use the created issue ID", "imports": [], "source": "export default function createdId({ issue }) {if(!Number.isSafeInteger(issue.id)||issue.id<=0)throw Error('Missing issue ID');return{id:issue.id}}\n" }, "n_4cb1058118f05aa9": { "name": "Prepare the description update", "imports": [], "source": "export default function issueId({issue,expectedId,description}){if(issue.id!==expectedId||!Number.isSafeInteger(issue.version))throw Error('Unexpected issue ID or version');return{id:expectedId,version:issue.version,description}}\n" }, "n_8fbc8f246fec4c89": { "name": "Update the description", "imports": [], "source": "export default async function updateIssue({issueId,version,description},context){return await context.actions.call('taiga.update_issue',{issueId,version,description});}\n" }, "n_1b2beff668fd0a8b": { "name": "Confirm the issue update", "imports": [], "source": "export default function confirm({issue,expectedId}){if(issue.id!==expectedId)throw Error('Unexpected issue ID');return{id:expectedId}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }