{ "kind": "open-flow-workflow", "version": 1, "name": "Asana Task Creator", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_1b4129391151183e": { "name": "Enter task details", "kind": "start", "inputDefs": [ { "jsonSchema": { "type": "string", "minLength": 1, "description": "The task name." }, "nullable": false, "handle": "name" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The workspace gid for a task created without a project." }, "nullable": false, "handle": "workspaceId" } ] }, "n_68169b6b33798dd6": { "inputs": { "name": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1b4129391151183e", "output": "name" } ] }, "workspaceId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1b4129391151183e", "output": "workspaceId" } ] } }, "name": "Create Asana task", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string", "minLength": 1, "description": "The task name." }, "nullable": false, "handle": "name" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The workspace gid for a task created without a project." }, "nullable": false, "handle": "workspaceId" } ], "outputs": [ { "jsonSchema": { "type": "object", "properties": { "gid": { "type": "string", "description": "The task gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The task name." }, "resource_subtype": { "type": "string", "description": "The task subtype." }, "completed": { "type": "boolean", "description": "Whether the task is completed." }, "notes": { "type": "string", "description": "The task notes." }, "due_on": { "type": [ "string", "null" ], "description": "The task due date." }, "due_at": { "type": [ "string", "null" ], "description": "The task due date-time." }, "start_on": { "type": [ "string", "null" ], "description": "The task start date." }, "start_at": { "type": [ "string", "null" ], "description": "The task start date-time." }, "created_at": { "type": "string", "description": "The task creation timestamp." }, "modified_at": { "type": "string", "description": "The task update timestamp." }, "completed_at": { "type": [ "string", "null" ], "description": "The task completion timestamp." }, "permalink_url": { "type": "string", "description": "The task permalink URL." }, "approval_status": { "type": "string", "description": "The task approval status." }, "assignee": { "type": [ "object", "null" ], "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana user." }, "workspace": { "type": "object", "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana workspace." }, "parent": { "type": [ "object", "null" ], "properties": { "gid": { "type": "string", "description": "The task gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The task name." }, "resource_subtype": { "type": "string", "enum": [ "default_task", "milestone", "approval", "custom" ], "description": "The task subtype." } }, "additionalProperties": true, "description": "A compact Asana task." }, "projects": { "type": "array", "items": { "type": "object", "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana project." }, "description": "Projects linked to the task." }, "memberships": { "type": "array", "items": { "type": "object", "properties": { "project": { "type": "object", "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana project." }, "section": { "type": "object", "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana project section." } }, "additionalProperties": true, "description": "A task membership." }, "description": "Memberships returned by Asana." }, "custom_fields": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A custom field value." }, "description": "A custom field response object." }, "description": "Custom fields returned by Asana." } }, "additionalProperties": true, "description": "An Asana task." }, "nullable": false, "handle": "task" } ], "name": "Create Asana task", "moduleId": "n_d939c81cec9b785d", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [ { "action": "asana.create_task" } ] } ] } }, "n_40190a887f9692ee": { "name": "Created task", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "object", "properties": { "gid": { "type": "string", "description": "The task gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The task name." }, "resource_subtype": { "type": "string", "description": "The task subtype." }, "completed": { "type": "boolean", "description": "Whether the task is completed." }, "notes": { "type": "string", "description": "The task notes." }, "due_on": { "type": [ "string", "null" ], "description": "The task due date." }, "due_at": { "type": [ "string", "null" ], "description": "The task due date-time." }, "start_on": { "type": [ "string", "null" ], "description": "The task start date." }, "start_at": { "type": [ "string", "null" ], "description": "The task start date-time." }, "created_at": { "type": "string", "description": "The task creation timestamp." }, "modified_at": { "type": "string", "description": "The task update timestamp." }, "completed_at": { "type": [ "string", "null" ], "description": "The task completion timestamp." }, "permalink_url": { "type": "string", "description": "The task permalink URL." }, "approval_status": { "type": "string", "description": "The task approval status." }, "assignee": { "type": [ "object", "null" ], "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana user." }, "workspace": { "type": "object", "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana workspace." }, "parent": { "type": [ "object", "null" ], "properties": { "gid": { "type": "string", "description": "The task gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The task name." }, "resource_subtype": { "type": "string", "enum": [ "default_task", "milestone", "approval", "custom" ], "description": "The task subtype." } }, "additionalProperties": true, "description": "A compact Asana task." }, "projects": { "type": "array", "items": { "type": "object", "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana project." }, "description": "Projects linked to the task." }, "memberships": { "type": "array", "items": { "type": "object", "properties": { "project": { "type": "object", "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana project." }, "section": { "type": "object", "properties": { "gid": { "type": "string", "description": "The resource gid." }, "resource_type": { "type": "string", "description": "The resource type." }, "name": { "type": "string", "description": "The resource name." } }, "additionalProperties": true, "description": "A compact Asana project section." } }, "additionalProperties": true, "description": "A task membership." }, "description": "Memberships returned by Asana." }, "custom_fields": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A custom field value." }, "description": "A custom field response object." }, "description": "Custom fields returned by Asana." } }, "additionalProperties": true, "description": "An Asana task." }, "nullable": false, "handle": "task" } ], "outputMappings": { "task": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_68169b6b33798dd6", "output": "task" } ] } } } }, "edges": [ { "source": "n_1b4129391151183e", "target": "n_68169b6b33798dd6" }, { "source": "n_68169b6b33798dd6", "target": "n_40190a887f9692ee" } ] } }, "modules": { "n_d939c81cec9b785d": { "name": "Create Asana task", "imports": [], "source": "export default async function createTask({ name, workspaceId }, context) {\n const result = await context.actions.call('asana.create_task', { name, workspaceId });\n if (!result?.task || typeof result.task.gid !== 'string' || !result.task.gid || typeof result.task.name !== 'string') throw new Error('Asana returned an invalid created task record');\n return result;\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }