Kickbox Email Verification Custom Code Error

Hello all,
I have been trying to follow Jack Coldrick’s instructions for linking Kickbox and Hubspot to automatically verify email addresses using workflows and custom codes. Unfortunately, when testing the custom code, I keep getting the error message “not defined in code” even though I took the code from Jack and my Data Outputs were defined by me. Am I missing something or where is the error? Thanks a lot in advance!

Best regards

Fabian

Hi @Fabian_040 , Hard to know 100% without seeing the full code what the issue might be but I have a few thoughts:

1. You may want to just double-check that the variables are being assigned correctly by logging them to the console. When you are using data-validated properties like enumeration and boolean, you just want to make sure that the results match the options available or the type required.

2. When I define the callback output fields, I don’t wrap them in quotes. Although I’m not sure this is the problem, as I have tested it both ways and it works fine. But in any case, presuming you are using Node this is what the documentation dictates as the correct syntax for the callback:

callback ({
 outputFields: {
 role:role,
 free:free,
 disposable:disposable,
 sendex: sendex,
 result: result,
 reason: reason
 }
})

If this still doesn’t help perhaps send the full code sample across, a link to the guide you are trying to follow and a sample of the console results and I can have a look.