cleanInputData. This flag allows you to tell Zapier whether it should automatically remove empty values, including null, [] (empty arrays), and {} (empty objects), from bundle.inputData before passing it to your perform* functions.
By default, the cleanInputData flag defaults to true, which matches the behavior of all versions prior to v18. Starting with v18, we encourage you to explicitly set this flag to false, either globally in App.flags or per trigger/action in the operation object. For example:
When cleanInputData is true
When cleanInputData is true, Zapier removes any empty values recursively from bundle.inputData before passing it to your perform* (including perform, performList, performGet, etc) functions. For example, given the following input data:
bundle.inputData passed to your perform function would be:
When cleanInputData is false
When cleanInputData is false, Zapier preserves all empty values in bundle.inputData. Using the same example input data above, the resulting bundle.inputData would be:
perform function would then need to handle these empty values appropriately.
We recommend setting cleanInputData to false and handling empty values explicitly in your code. This approach provides greater control for developers and avoids unexpected behavior, especially when dealing with nested input data (e.g., line items).
If your
perform* functions didn’t previously handle empty values, setting cleanInputData to false may break your code! Make sure to test your triggers or actions before rolling out this change to users.