I use Hubspot Trigger to 1) get all contacts from google and 2) filter google contacts by contactId I get from Trigger. But the IF node does not find the match. In a “manual” test automation without Hubspot Trigger Node it works fine, but not in combination with the trigger. Any ideas whats wrong here?
{
"nodes": [
{
"parameters": {
"appId": "236187",
"event": "contact.propertyChange",
"property": "nei",
"additionalFields": {}
},
"name": "Hubspot Trigger",
"type": "n8n-nodes-base.hubspotTrigger",
"typeVersion": 1,
"position": [
550,
330
],
"webhookId": "d8b2dcec-c72f-4fd7-83dd-cde55e496124",
"credentials": {
"hubspotDeveloperApi": "HubSpot Test Trigger Google Contacts"
}
},
{
"parameters": {
"operation": "getAll",
"returnAll": true,
"fields": [
"*"
],
"options": {}
},
"name": "Google Contacts",
"type": "n8n-nodes-base.googleContacts",
"typeVersion": 1,
"position": [
830,
340
],
"credentials": {
"googleContactsOAuth2Api": "Google Contacts "
}
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$node[\"Hubspot Trigger\"].json[\"contactId\"]}}",
"value2": "={{$node[\"Google Contacts\"].json[\"userDefined\"][0][\"value\"]}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1100,
350
]
}
],
"connections": {
"Hubspot Trigger": {
"main": [
[
{
"node": "Google Contacts",
"type": "main",
"index": 0
}
]
]
},
"Google Contacts": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
}
}
}
This is the Hubspot Id I receive from the trigger
{{$node["Hubspot Trigger"].json["contactId"]}}
These are the Hubspot Ids from in Google contacts custom field
{{$node["Google Contacts"].json["userDefined"][0]["value"]}}