Skip to main content

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?

Hi @JacobWolf,

Looking at the API documentation, you are on the right track. The “custom_fields” expect the values in a line item format which you have specified via the “children” property. You do not need to specify a “list” or “Allows Multiple”.

You can test this out by sending line item values to the custom fields. You can create line items in a Zap following the process here and use that to test this action. In a live Zap, there are apps that can return line item values that can be sent to these custom fields and they should work as intended.

I hope that helps.

Cheers,


Reply