Create Asana project from template

Describe the problem/error/question

I’m trying to create a new Asana project from a template after the trigger on Pipedrive (Deal set to WON) gets activated. This doesn’t work as intended. I’ve been trying out multiple ways using JSON for Header and Body.

What is the error message (if any)?

Bad request - please check your parameters
requested_dates: [0]: value: Day cannot be null

My workflow

Share the output returned by the last node

{
“errorMessage”: “Bad request - please check your parameters”,
“errorDescription”: “requested_dates: [0]: value: Day cannot be null”,
“errorDetails”: {
“rawErrorMessage”: [
“400 - "{\"errors\":[{\"message\":\"requested_dates: [0]: value: Day cannot be null\",\"help\":\"For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors\\\“}]}\”
],
“httpCode”: “400”
},
“n8nDetails”: {
“nodeName”: “HTTP Request”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “22.7.2025, 10:54:13”,
“n8nVersion”: “1.102.4 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Bad request - please check your parameters”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:780:15)“,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1212:9)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2153:11"
]
}
}

Information on your n8n setup

  • n8n version: 1.102.4
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Kubernetes (Docker)
  • Operating system: Linux

Dear @FZ1991 Hope everything is fine with you.

Can you please share your workflow again. In the proper way so that we can have a lot into it.

Here’s how to share your workflow: Share your workflow

1 Like

Hi @kuldip_parmar, thanks for your reply!

I just shared the workflow in my original post. You should be able to look into it now.

Hello @FZ1991, welcome to community.
After I’m looking from Asana Project Docs, it’s because you’re set it wrong with the ‘value’ in your json body requests.

New n8n version doesn’t use .toISOString() method anymore, instead it is using .toIso() (maybe for simplifying).
So, for your case, you can use {{ $now.toISO().split('T')[0] }} instead of {{$now.toISOString().split('T')[0]}}

1 Like

Dear @FZ1991 , in the HTTP module, inside value you are using due date as

{$now.toISOString().split(‘T’)[0]}}

Which is good but sometime platform like Asana don’t accept those date and time frame. As for the solution

Solution : {{$now.toISOString()}}

Use it and let me know whether it will work or not.

Make sure to use Value : {{$now.toISOString()}}

Happy to help.

(If this solves out the problem then please mark it as solution.)

1 Like

Hello @kuldip_parmar, as the new version, .toISOString() isn’t available anymore in n8n. Instead, it needed to call .toISO() method.
See image below

This is if we use .toISOString()

And this if we use .toISO()

3 Likes

Dear @cutecatcode Thank you so much for this reminder.

Buddy @FZ1991 please check out this solution, it will surely going to solve out your problem…

1 Like

Thanks guys @cutecatcode & @kuldip_parmar!

I tried making it work with @cutecatcode’s suggestion and got another error message which I could fix afterwards by adding a couple of additional parameters to the Body JSON.

This is how it looks like now – works perfectly :rocket:

{
  "data": {
    "name": "{{ $json.deal_name }}: Onboarding",
    "team": "1109268864630958",
    "privacy_setting": "public_to_workspace",
    "is_strict": true,
    "requested_dates": [
      {
        "gid": "1",
        "value": "{{ $now.toISO().split('T')[0] }}"
      }
    ],
    "requested_roles": [
      {
        "gid": "1",
        "value": "688362882426932"
      }
    ]
  }
}
1 Like

You’re welcome, bud! Have a nice day!

2 Likes