@djangelic
- i tried by changing the combine option to ANY but it didnt solve the issue.
- i am giving below the code of the workflow so that it helps in debugging it:
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-140,
500
]
},
{
"parameters": {
"resource": "contact",
"operation": "getRecentlyCreatedUpdated",
"limit": 50,
"filters": {}
},
"name": "Hubspot",
"type": "n8n-nodes-base.hubspot",
"typeVersion": 1,
"position": [
280,
160
],
"credentials": {
"hubspotApi": {
"id": "98",
"name": "Saandhy Hubspot account"
}
}
},
{
"parameters": {
"conditions": {
"dateTime": [],
"number": [
{
"value1": "={{$node[\"Hubspot\"].json[\"properties\"][\"createdate\"][\"value\"]}}",
"operation": "larger",
"value2": "={{$json[\"lasttenunix\"]}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1040,
140
]
},
{
"parameters": {
"action": "calculate",
"value": "={{$json[\"current time\"]}}",
"operation": "subtract",
"duration": 30,
"timeUnit": "hours",
"dataPropertyName": "lasttenmins",
"options": {}
},
"name": "Date & Time",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [
700,
100
]
},
{
"parameters": {
"values": {
"boolean": [],
"number": [
{
"name": "current time",
"value": "={{new Date().getTime()}}"
}
]
},
"options": {
"dotNotation": true
}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
500,
180
]
},
{
"parameters": {
"value": "={{$json[\"lasttenmins\"]}}",
"dataPropertyName": "lasttenunix",
"toFormat": "x",
"options": {}
},
"name": "Date & Time2",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [
860,
0
]
},
{
"parameters": {
"authentication": "basicAuth",
"requestMethod": "POST",
"url": "https://api.interakt.ai/v1/public/track/users/",
"jsonParameters": true,
"options": {
"batchInterval": 2,
"batchSize": 10
},
"bodyParametersJson": "={\n\"phoneNumber\": \"{{$json[\"phone\"]}}\",\n\"traits\": {\"name\": \"{{$node[\"Hubspot1\"].json[\"properties\"][\"firstname\"][\"value\"]}} {{$node[\"Hubspot1\"].json[\"properties\"][\"lastname\"][\"value\"]}}\",\"email\":\"{{$node[\"Hubspot1\"].json[\"properties\"][\"email\"][\"value\"]}}\"}}",
"headerParametersJson": "="
},
"name": "HTTP Request5",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1400,
660
],
"credentials": {
"httpBasicAuth": {
"id": "72",
"name": "Conversations.ai Interakt"
}
},
"continueOnFail": true
},
{
"parameters": {
"resource": "contact",
"operation": "get",
"contactId": "={{$node[\"Hubspot\"].json[\"identity-profiles\"][0][\"vid\"]}}",
"additionalFields": {}
},
"name": "Hubspot1",
"type": "n8n-nodes-base.hubspot",
"typeVersion": 1,
"position": [
720,
420
],
"credentials": {
"hubspotApi": {
"id": "98",
"name": "Saandhy Hubspot account"
}
}
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 3,
"unit": "minutes"
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
60,
180
]
},
{
"parameters": {
"authentication": "basicAuth",
"requestMethod": "POST",
"url": "https://api.interakt.ai/v1/public/track/events/",
"jsonParameters": true,
"options": {
"batchInterval": 2,
"batchSize": 10
},
"bodyParametersJson": "={\n\"phoneNumber\": \"{{$json[\"phone\"]}}\",\n\"event\": \"Lead Created\",\n\"traits\": {\"name\": \"{{$node[\"Hubspot1\"].json[\"properties\"][\"firstname\"][\"value\"]}} {{$node[\"Hubspot1\"].json[\"properties\"][\"lastname\"][\"value\"]}}\",\"email\":\"{{$node[\"Hubspot1\"].json[\"properties\"][\"email\"][\"value\"]}}\"}}",
"headerParametersJson": "="
},
"name": "HTTP Request4",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1640,
620
],
"credentials": {
"httpBasicAuth": {
"id": "72",
"name": "Conversations.ai Interakt"
}
},
"continueOnFail": true
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "phone",
"value": "={{$node[\"Hubspot1\"].json[\"properties\"][\"phone\"][\"value\"].startsWith(\"+91\") ? $node[\"Hubspot1\"].json[\"properties\"][\"phone\"][\"value\"].slice(3) : $json[\"phone\"]}}"
}
]
},
"options": {}
},
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1180,
380
],
"continueOnFail": true
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$node[\"Hubspot1\"].json[\"properties\"][\"phone\"][\"value\"]}}",
"operation": "startsWith",
"value2": "+91"
}
]
},
"combineOperation": "any"
},
"name": "IF2",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
940,
380
],
"continueOnFail": true
},
{
"parameters": {
"authentication": "basicAuth",
"requestMethod": "POST",
"url": "https://api.interakt.ai/v1/public/track/users/",
"jsonParameters": true,
"options": {
"batchInterval": 2,
"batchSize": 10
},
"bodyParametersJson": "={\n\"phoneNumber\": \"{{$json[\"phone\"]}}\",\n\"traits\": {\"name\": \"{{$node[\"Hubspot1\"].json[\"properties\"][\"firstname\"][\"value\"]}} {{$node[\"Hubspot1\"].json[\"properties\"][\"lastname\"][\"value\"]}}\", \"email\":\"{{$node[\"Hubspot1\"].json[\"properties\"][\"email\"][\"value\"]}}\"}}",
"headerParametersJson": "="
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1540,
400
],
"credentials": {
"httpBasicAuth": {
"id": "72",
"name": "Conversations.ai Interakt"
}
},
"continueOnFail": true
},
{
"parameters": {
"authentication": "basicAuth",
"requestMethod": "POST",
"url": "https://api.interakt.ai/v1/public/track/events/",
"jsonParameters": true,
"options": {
"batchInterval": 2,
"batchSize": 10
},
"bodyParametersJson": "={\n\"phoneNumber\": \"{{$node[\"Set1\"].json[\"phone\"]}}\",\n\"event\": \"Lead Created\",\n\"traits\": {\"name\": \"{{$node[\"Hubspot1\"].json[\"properties\"][\"firstname\"][\"value\"]}} {{$node[\"Hubspot1\"].json[\"properties\"][\"lastname\"][\"value\"]}}\",\"email\":\"{{$node[\"Hubspot1\"].json[\"properties\"][\"email\"][\"value\"]}}\"}}",
"headerParametersJson": "="
},
"name": "HTTP Request6",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1780,
380
],
"credentials": {
"httpBasicAuth": {
"id": "72",
"name": "Conversations.ai Interakt"
}
},
"continueOnFail": true
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "phone",
"value": "={{$node[\"Hubspot1\"].json[\"properties\"][\"phone\"][\"value\"]}}"
}
]
},
"options": {}
},
"name": "Set2",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1160,
600
],
"continueOnFail": true
}
],
"connections": {
"Hubspot": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Hubspot1",
"type": "main",
"index": 0
}
]
]
},
"Date & Time": {
"main": [
[
{
"node": "Date & Time2",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Date & Time",
"type": "main",
"index": 0
}
]
]
},
"Date & Time2": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request5": {
"main": [
[
{
"node": "HTTP Request4",
"type": "main",
"index": 0
}
]
]
},
"Hubspot1": {
"main": [
[
{
"node": "IF2",
"type": "main",
"index": 0
}
]
]
},
"Cron": {
"main": [
[
{
"node": "Hubspot",
"type": "main",
"index": 0
}
]
]
},
"Set1": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"IF2": {
"main": [
[
{
"node": "Set1",
"type": "main",
"index": 0
}
],
[
{
"node": "Set2",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "HTTP Request6",
"type": "main",
"index": 0
}
]
]
},
"Set2": {
"main": [
[
{
"node": "HTTP Request5",
"type": "main",
"index": 0
}
]
]
}
}
}```