I've identified the issue - the problem is in the Switch node's connection configuration. The current structure is incorrect for n8n's workflow connections. Here's the fixed JSON:
{
"meta": {
"instanceId": "your-instance-id"
},
"nodes": [
... (your nodes array remains the same) ...
],
"connections": {
"Telegram Trigger": {
"main": [
[
{
"node": "Get State",
"type": "main",
"index": 0
}
]
]
},
"Get State": {
"main": [
[
{
"node": "Switch State",
"type": "main",
"index": 0
}
]
]
},
"Switch State": {
"main": [
[ // Output 0 (state = "")
{
"node": "Ask Location",
"type": "main",
"index": 0
}
],
[ // Output 1 (state = "awaiting_location")
{
"node": "Set Location",
"type": "main",
"index": 0
}
],
[ // Output 2 (state = "awaiting_job_title")
{
"node": "Set Job Title",
"type": "main",
"index": 0
}
],
[ // Output 3 (state = "awaiting_gender")
{
"node": "Set Gender & Complete",
"type": "main",
"index": 0
}
],
[ // Output 4 (state = "complete")
{
"node": "Get Complete State",
"type": "main",
"index": 0
}
]
]
},
... (rest of your connections remain the same) ...
},
"active": false,
"settings": {},
"id": "Personnel Search Agent"
}
Key fixes made:
- Fixed the Switch State connections structure - each output branch must be in its own array
- Removed the trailing
ù character at the end of the JSON
- Added proper formatting for the Switch node's outputs
Before importing, you still need to:
- Replace
"your-instance-id"
- Replace
"YOUR_TELEGRAM_CREDENTIALS" (in all Telegram nodes)
- Replace
"[SCRAPING_API_ENDPOINT]"
- Ensure your Telegram credentials are set up in n8n first
The Switch node should now have 5 separate outputs corresponding to your 5 state conditions, which will fix the propertyValues[itemName] is not iterable error.