Hey all,
I’m an engineer that just joined the team at beehiiv, the email newsletter platform. I’ve taken over development for our Zapier app and am working to make some major updates to it in the coming weeks. I’m new to Zapier development, but not new to Javascript in general.
I’m struggling to find a format that allows for the intended use of how a user would input custom fields. We allow for multiple custom fields to be passed on create subscriber and update subscriber requests in our API and they need both the id and the value.
To simplify the user experience, I made a Zapier trigger that will fetch the custom fields on a user’s account dynamically and allow them to select by name, rather than needing to know the custom field ID. This works as intended.
Here’s how I’ve done that in code. This is the input field:
{
key: "custom_fields",
children:
{
key: "field_name",
label: "Field Name",
helpText: "Select the name of the custom field.",
dynamic: "list_customfields.id.name",
required: false
},
{
key: "field_value",
label: "Field Value",
helpText: "Enter the value for the custom field.",
type: "string",
required: false
}
],
label: "Custom Fields",
required: false,
altersDynamicFields: true
}
However, because list and children are mutually exclusive in Zapier’s schema, I’m struggling to figure out how I can allow for multiple custom fields to be entered. On our current Make integration, users can make a new item for each custom field. I’ve tried list by itself and it doesn’t work as intended. Also allowsMultiples doesn’t work either.
Is there a way I’m not thinking about to allow for the functionality I’m seeking?