Zapier Action Fields - Making One of Two Inputs Mandatory

I’m building a custom Zapier integration and running into an issue with field validation. I need to create a setup where users must provide either a username OR a mobile number, but they don’t have to fill both fields.

Right now I can’t figure out how to make this work. If I mark both fields as required, Zapier forces users to complete both inputs which isn’t what I want. I’ve been searching through Zapier’s developer docs but haven’t found anything about conditional requirements.

Has anyone dealt with this type of either/or field validation before? Any suggestions on how to implement this would be really helpful.

Thanks in advance!

Had this same issue when building client integrations. Make both fields optional in your input schema, then handle validation in your perform function. If both are empty, throw an error like “Either username or mobile number is required”. This gives you full control over validation rules and keeps the UX clean. Key thing - validate after submission, not at the field level using Zapier’s built-in validation.

hey! i had that issue too. what i did was check the inputs in the perform function - if both username and mobile are empty, just send an error msg. zapier allows u to customize that part!

Here’s a better approach than what most people try. Make both fields optional in your schema, but add helpText explaining that you need at least one. Then handle the validation in bundle.perform - just check if one field has a value. This beats the confusing UX where users see two required fields but only need to fill one. Plus you can give clearer error messages about which field combinations actually work.

Been there, done that. The perform function validation works but gets messy with complex workflows and multiple conditional fields.

I switched to automation platforms with built-in conditional logic. When users hit validation roadblocks, I migrate their workflows to something more flexible.

You can set up conditional validation rules without custom code. Define the logic once - username exists? Skip mobile validation. Mobile exists? Skip username validation. Both empty? Error.

This beats maintaining validation code and gives users a smoother experience. You can handle complex scenarios later without rebuilding your integration.

Check out Latenode for conditional workflow logic: https://latenode.com

ugh this drove me crazy for weeks! ended up with a simple fix - just add helper text under both fields saying “fill at least one” and validate it in your code. way easier than fighting zapier’s field requirements. works great and users understand immediately.