GTM Stack

How can I handle empty values in Clay when sending data to Attio via API?

February 2026

1 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 nested array structures like [{ "value": "..." }].

February 2026

Add your take

Have experience with the tools discussed here? Share your honest opinion.