I’m working on an n8n automation (version 1.100.1, Cloud) that pulls data from Google Sheets and automatically posts comments on Reddit posts using a loop structure.
What I’m trying to do:
My workflow reads through rows in a Google Sheet, grabs comment text and post IDs, then posts each comment to the matching Reddit post. After posting, it should wait a bit and move to the next row.
The issue:
The comment actually gets posted to Reddit just fine - I can see it there. But right after that, the Reddit node crashes with this error:
TypeError: Cannot read properties of undefined (reading 'things')
This breaks my loop and stops it from processing the remaining items in my sheet.
What I’ve tested:
- Setting the node to “Continue on Error” lets the loop finish, but this feels like a band-aid fix
- Double-checked my post ID format (using the correct fullname format like 2919299)
- API permissions look good (submit, read, identity scopes are all set)
My main questions:
- Why does the Reddit node work correctly but then fail when processing the API response?
- How should I properly structure this workflow so the loop runs smoothly for all items?
- What additional nodes or settings would help make this more reliable?
Current workflow setup:
- Batch Processor Node - handles one sheet row at a time
{
"parameters": {
"batchSize": 1,
"options": {
"reset": false
}
},
"name": "Batch Processor",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [1600, 2000]
}
- Sheet Reader Node - gets the comment data
Sample output:
[
{
"row_number": 3,
"Comment": "TEST COMMENT TEXT",
"Post Content": "SAMPLE POST CONTENT",
"Subreddit": "automation",
"Title": "SAMPLE TITLE",
"Score": 23,
"Link": "https://reddit.com",
"PostID": "SAMPLE_ID"
}
]
- Comment Poster Node - this is where it fails
{
"parameters": {
"resource": "postComment",
"postId": "={{ $('Batch Processor').item.json.PostID }}",
"commentText": "={{ $('Batch Processor').item.json.Comment }}"
},
"name": "Comment Poster",
"type": "n8n-nodes-base.reddit",
"typeVersion": 1,
"position": [2000, 2020]
}
- Delay Node - prevents spam detection
{
"parameters": {
"amount": 45,
"unit": "seconds"
},
"name": "Delay",
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [2200, 2020]
}
Any suggestions on how to fix this or make the workflow more stable would be awesome!