I’m working on a custom Zapier integration using their command line interface. I keep getting duplicate input fields that show up twice in my donation creation trigger.
For example, I see both “Donation Amount” and “Amount” appearing as separate fields, even though I only defined one in my operation.inputFields configuration. The “Donation Amount” field seems to be the correct one since it pulls the right data from my API response.
I already tried removing the inputFields from operation.inputFields but the duplicates keep appearing. I also experimented with removing the noun property because I noticed “Donation” gets added as a prefix to all the duplicate fields.
Here’s my basic setup in the donation creates file:
const createDonation = {
key: 'donation_create',
noun: 'Donation',
display: {
label: 'Create Donation',
description: 'Creates a new donation record'
},
operation: {
inputFields: [
{
key: 'amount',
label: 'Donation Amount',
type: 'number',
required: true
},
{
key: 'project_id',
label: 'Project ID',
type: 'string'
}
]
}
};
My API returns data like this:
{
"amount": 100,
"project_id": "proj_123",
"status": "completed"
}
Where should I look to fix these duplicate fields? Thanks for any help!
u could also try checking if other parts of your code are re-declaring the input fields or if there’s a mix-up in your API response. sometimes, those prefixes can cause confusion. make sure everything in the field definitions is in sync.
This sounds like a schema validation issue I ran into during my own integration development. When Zapier processes your operation, it sometimes auto-generates fields based on inconsistencies between your defined schema and the actual API response structure. Double-check that your perform function implementation matches exactly what you’ve declared in inputFields. Also examine if you have any middleware or hooks that might be modifying the field definitions during runtime. Another thing to verify is whether you have duplicate operation keys across different files in your integration - the CLI can merge operations in unexpected ways if there are naming conflicts. Try running zapier validate to see if it catches any schema mismatches that could be causing the duplication.
I encountered something similar when building my first Zapier CLI integration. The issue was that I had leftover field definitions in my sample object that were conflicting with the inputFields. Check your sample property in the operation - if it contains fields that don’t exactly match your inputFields keys, Zapier will sometimes generate additional fields based on the sample data structure. Also verify that you’re not accidentally defining fields in both the inputFields array and somewhere else like outputFields or in a dynamic field function. The CLI can be finicky about field naming consistency across all parts of your operation definition.