Handling Missing or Null Fields
Real APIs don't always return every field. Sometimes a field is optional, and if the data doesn't have it, the field is absent or null.
Example response where the user doesn't have a phone number:
{
"id": 123,
"name": "Bob",
"email": "bob@example.com",
"phone": null
}
If your next step tries to use phone and it's null, your workflow might crash or behave unexpectedly. Solution: use a fallback value.
In Make:
{{if(item.phone; item.phone; "No phone number provided")}}
In n8n, use the expression editor:
{{ $json.phone || "No phone number provided" }}
This says: "If phone exists, use it. Otherwise, use this fallback."