We have a Zapier trigger, which uses a dynamic inputField for choosing the correct counterpart in our software. When setting up a Zap, the user always sees a dialog containing the dynamic dropdown. if there is only one value available in the dropdown (99% of all usages), the dialog should be skipped. Is there a way to achieve this?
operation: {
inputFields: [
{
key: 'blockid',
type: 'string',
label: 'Select Trigger',
helpText: 'Pick the trigger in your Ultradox automation.',
dynamic: 'blockid.id.title'
}
],
...
David here, from the Zapier Platform team.
That might be possible, but it's not a common use case. Instead of listing the input field as an object in the array, you could instead put a function there. The function could perform whatever request is used to determine how many options there will be and then either return an array of fields or []
, depending.
The big kicker here is that bundle.inputData
will not have have a blockid
value if the user doesn't provide one. Instead, you'll have to do that request again in your perform
method and supply it yourself.
Hope this helps. Let me know if you've got any other questions!