Describe the problem/error/question
I’m using Google Workspace API to update user’s details using Patch semantics.
To wipe something I have to specify field and set it to null
, my payload is in Python so I’m setting it to None
This works fine when tested locally but node doesn’t return this specific data at all.
Please share your workflow
Examples with hardcoded state to simplify.
This will return a string “null”, obviously this get’s rejected by API because it’s a date field.
payload = {
"organizations":
[
{
"title": title,
"department": department,
}
],
"relations":
[
{
"value": managerMail,
"type": "manager"
}
],
"customSchemas":
[
{
"Patronum": {
"startDate": hireDate,
"endDate": "null",
},
"Employee_Information": {
"Team": team,
"Sub-team": subTeam,
"Location": location,
"Division": division,
"Employment_Status": status,
}
}
],
}
return payload
If I instead use None
node correctly recognises it as valid semantic and changes colour same as it would for False
payload = {
"organizations":
[
{
"title": title,
"department": department,
}
],
"relations":
[
{
"value": managerMail,
"type": "manager"
}
],
"customSchemas":
[
{
"Patronum": {
"startDate": hireDate,
"endDate": None,
},
"Employee_Information": {
"Team": team,
"Sub-team": subTeam,
"Location": location,
"Division": division,
"Employment_Status": status,
}
}
],
}
As you can see field get’s completely removed from the JSON payload variable.
If we compare JSON output of this node with the JSON output of previous node we can see that n8n can and does handles null
values outside of this example.
Any ideas? am I missing something or is this a bug?
Information on your n8n setup
- n8n version: 1.63.4
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: n8n cloud