Clay's HTTP API doesn't support Handlebars-style logic like {{#if}} in JSON bodies. The best solution is to create a formula column that dynamically constructs your entire JSON body, conditionally including key-value pairs only when the values exist (completely omitting fields like "employeeCount" when empty rather than sending null values). You can then use this formula's output as your HTTP API body. Alternatively, use conditional run formulas to only execute the API when required fields contain data, preventing validation errors entirely. The "Remove empty values" toggle doesn't work with nested array structures like [{ "value": "..." }].
How can I handle empty values in Clay when sending data to Attio via API?
April 2026
Quick Answer
Clay's HTTP API doesn't support Handlebars-style logic like {{#if}} in JSON bodies. The best solution is to create a formula column that dynamically constructs your entire JSON body, conditionally including key-value pairs only when the values exist (completely omitting fields like "employeeCount" when empty rather than sending null values). You can then use this formula's output as your HTTP API body. Alternatively, use conditional run formulas to only execute the API when required fields contain data, preventing validation errors entirely. The "Remove empty values" toggle doesn't work with n
○
Up to date
1 months ago1 Answer
GTM StackCommunity Insight