Hi, I noticed that when searching the CRM, using the following filter is no longer working/returns zero results when I have verified that there is a match?
(The email IS in the property “hs_additional_emails” when I search on the primary email address. )
{
“filterGroups”: [
{
“filters”: [
{
“value”: “REDACTED”,
“propertyName”: “hs_additional_emails”,
“operator”: “CONTAINS_TOKEN”
}
]
},
{
“filters”: [
{
“propertyName”: “email”,
“operator”: “EQ”,
“value”: “REDACTED”
}
]
}
],
“properties”: [
“firstname”,
“lastname”
]
}
Hello @jamien01
hs_additional_emails" property has been deprecated or is no longer supported by HubSpot. You may want to confirm this by checking the HubSpot documentation or reaching out to their support team.
Alternatively, you could try using the “OR” operator in your filter to search for the email in both the “hs_additional_emails” and “email” properties. Here is an example of what the updated filter would look like
{
"filterGroups": [
{
"filters": [
{
"value": "REDACTED",
"propertyName": "hs_additional_emails",
"operator": "CONTAINS_TOKEN"
},
{
"propertyName": "email",
"operator": "EQ",
"value": "REDACTED"
},
{
"operator": "OR"
}
]
}
],
"properties": [
"firstname",
"lastname"
]
}
This should return results that match either the primary email address or the additional emails.
Thanks for you reply.
Not sure if you have a typo or not but if I replace the “CONTAINS TOKEN” filter with “EQ”, using the “hs_additional_emails” property, it works.
And it still works when there are more than one additional email. Go figure.
I will of course check if that field will be removed at some stage.
Final:
{
“filterGroups”: [
{
“filters”: [
{
“value”: “REDACTED”,
“propertyName”: “email”,
“operator”: “EQ”
}
]
},
{
“filters”: [
{
“value”: “REDACTED”,
“propertyName”: “hs_additional_emails”,
“operator”: “EQ”
}
]
}
],
“properties”: [
“firstname”,
“lastname”,
“hs_additional_emails”
]
}