ASANA get all tasks

Hi there I am building an AI agent and I have been struggling to integrate with Asana.

I tried to integrate with the “Create Task” node but couldn’t find an easy way to assign a task name so I reverted to using Asana’s email forwarding feature instead.

But now I really need to fetch the existing tasks in my asana account for the AI agent to work with and no matter what I do this tool keeps failing, can you please tell me what I’m doing wrong ?

1tJu6NJihnnLibQs

Error body:

n8n version

1.88.0 (Cloud)

Time

23/04/2025, 18:12:23

Error cause

{ “message”: “Bad request - please check your parameters”, “timestamp”: 1745424743420, “name”: “NodeApiError”, “description”: “Must specify exactly one of project, tag, section, user task list, or assignee + workspace”, “context”: {}, “cause”: { “message”: "400 - {"errors":[{"message":"Must specify exactly one of project, tag, section, user task list, or assignee + workspace","help":"For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors\“}]}”, “name”: “AxiosError”, “stack”: “AxiosError: Request failed with status code 400\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:599:11)\n at IncomingMessage.emit (node:events:536:35)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/Axios.js:45:41)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at invokeAxios (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:173:16)\n at proxyRequestToAxios (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:513:26)\n at Object.request (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:1145:50)\n at SupplyDataContext.requestOAuth2 (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:792:12)\n at SupplyDataContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:958:20)\n at SupplyDataContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:1147:20)\n at SupplyDataContext.asanaApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Asana/GenericFunctions.js:53:10)\n at SupplyDataContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Asana/Asana.node.js:1963:30)\n at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/get-input-connection-data.js:15:28\n at DynamicStructuredTool.func (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/create-node-as-tool.js:78:35)\n at DynamicStructuredTool.call (/usr/local/lib/node_modules/n8n/node_modules/@langchain/core/dist/tools/index.cjs:113:22)\n at /usr/local/lib/node_modules/n8n/node_modules/langchain/dist/agents/executor.cjs:486:27\n at async Promise.all (index 0)\n at AgentExecutor._call (/usr/local/lib/node_modules/n8n/node_modules/langchain/dist/agents/executor.cjs:478:30)\n at AgentExecutor.invoke (/usr/local/lib/node_modules/n8n/node_modules/langchain/dist/chains/base.cjs:58:28)\n at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js:241:24)\n at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/agents/Agent/Agent.node.js:430:14)\n at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:681:27)\n at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:915:51\n at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1246:20”, “code”: “ERR_BAD_REQUEST”, “status”: 400 } }

Hi Blllel_Ridelle

Make sure the account you used in your Asana account credentials has access to the project/tasks you are trying to search.

The error indicates that you need to specify one or more filters to narrow down the results.

Examples of valid filters include:

Project Name or ID: Filters tasks from a specific project.

Workspace Name or ID: Filters tasks for a workspace.

Assignee: Searches for tasks assigned to a specific user.

Tag: Searches for tasks with a specific tag.

In your screenshot:

The Project Name or ID field is set to the value “N8N Test”. Make sure that:
The project name “N8N Test” matches exactly what is in your Asana, or Use the project ID instead of the name (check out how to get the ID on “developers.asana.com

Remove the Workspace Name or ID field.
Use only the Project Name or ID filter. Make sure that:
The project name is correct.

After adjusting the parameters correctly, run the node again. If it still returns empty:
Verify that the tasks in the specified project, workspace or tag actually exist.

Let me know if this was enough, if anything, let me know.

1 Like

Thank you for your help, your advice did the trick!

1 Like

Hello, could you kindly mark my previous post as the solution (blue box with check mark) so that this ongoing discussion does not distract others who want to find out the answer to the original question? Thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.