I’m working on an n8n automation (version 1.100.1 on Cloud) that reads data from Google Sheets and creates comments on Reddit posts automatically using a loop structure.
What I’m trying to do:
My workflow should go through each row in a Google Sheet, create a comment on the specified Reddit post, pause for a bit, then continue to the next row until all comments are posted.
The issue I’m facing:
Everything works perfectly for the first comment. I can see it posted on Reddit successfully. But then the Reddit comment creation node throws this error and stops the whole process:
TypeError: Cannot read properties of undefined (reading 'things')
The weird part is that the comment actually gets created on Reddit, but n8n still shows an error and won’t continue to the next item in the loop.
What I’ve already tried:
- Setting the error handling to “Continue” which lets the loop finish, but this seems like a hack.
- Double checked my Post ID format (using the correct fullname like 2919299).
- Verified my Reddit API permissions include submit, read, and identity scopes.
My questions:
- Why does the Reddit node work but then fail when processing the response?
- How should I properly set up this loop to handle all items reliably?
- What additional nodes or settings might help?
Current workflow setup:
- Batch Processing Node - handles one sheet row at a time
{
"parameters": {
"batchSize": 1,
"options": {
"reset": false
}
},
"name": "Process Items",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3
}
- Sheet Reader Node - gets the comment data
Sample output:
[
{
"row_id": 8,
"reply_text": "Sample reply content",
"original_content": "Sample post content",
"community": "automation",
"post_title": "Sample Title",
"score": 23,
"link": "https://reddit.com",
"post_id": "SAMPLE123"
}
]
- Reddit Comment Node - this is where it fails
{
"parameters": {
"resource": "postComment",
"postId": "={{ $('Process Items').item.json.post_id }}",
"commentText": "={{ $('Process Items').item.json.reply_text }}"
},
"name": "Add Reddit Comment",
"type": "n8n-nodes-base.reddit",
"typeVersion": 1
}
- Delay Node - pauses between comments
{
"parameters": {
"amount": 45,
"unit": "seconds"
},
"name": "Pause",
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1
}
The full error shows:
{
"errorMessage": "Cannot read properties of undefined (reading 'things')"
}
Any ideas on what might be causing this or how to make the loop more reliable? Thanks for any help!