I’m building a workflow in n8n (v1.100.1, Cloud) that reads a list of Reddit posts from a Google Sheet and posts a unique comment to each one in a loop.
The Goal:
The workflow should iterate through each row in my Google Sheet, post the specified comment to the corresponding Post ID, wait for a set period, and then move on to the next row until the list is complete.
The Problem:
The workflow runs successfully for the first item only. I can go to Reddit and see that the comment has been successfully posted. However, the Create a comment in a post node in n8n then throws the following error, which breaks the loop and prevents it from processing the rest of the items:
TypeError: Cannot read properties of undefined (reading 'things')
Because the node errors out (even after a successful action), the workflow doesn’t proceed to the Wait node or the next loop iteration.
What I’ve Tried:
Error Handling: Setting the node’s “On Error” setting to “Continue” allows the loop to finish, but it feels like a workaround, not a solution to the underlying error.
Post ID Format: I have confirmed I am using the correct “Fullname” for the Post ID (e.g., 2919299, not the URL or short ID.
Permissions: My Reddit API credentials have the submit, read, and identity scopes. I can post manually from the same account without issue.
My Question:
- Why would the n8n Reddit node successfully execute its primary function (posting the comment) but then fail to process the successful response from Reddit’s API?
- What is the correct way to structure this final part of the workflow to ensure the loop completes reliably for all items?
- What node should I add? What should I set it to?
Workflow & Node Configuration
Here is a simplified overview of the final section of my workflow and the JSON for the relevant nodes.
Visual Overview:
1.). Loop Over Items (SplitInBatches Node)
This node is configured to process each row from the Google Sheet one at a time.
JSON:
{
"parameters": {
"batchSize": 1,
"options": {
"reset": false
}
},
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [1540, 1960]
}
- Get row(s) in sheet (Google Sheets Node)
This node fetches the list of posts and comments to be made.
Output Data Example (one item):
JSON:
[
{
"row_number": 6,
"Comment": "EXAMPLE COMMENT",
"Post Text": "EXAMPLE POST TEXT",
"Subreddit": "n8n",
"Title": "EXAMPLE TITLE",
"Upvotes": 45,
"URL": "https://www.reddit.com",
"ID": "EXAMPLE ID"
}
- Create a comment in a post (Reddit Node) – THIS IS THE FAILING NODE
This node takes the data for a single row from the loop and attempts to post the comment.
Node JSON:
{
"parameters": {
"resource": "postComment",
"postId": "={{ $('Loop Over Items').item.json.ID }}",
"commentText": "={{ $('Loop Over Items').item.json.Comment }}"
},
"name": "Create a comment in a post",
"type": "n8n-nodes-base.reddit",
"typeVersion": 1,
"position": [2100, 1980],
"credentials": {
"redditlink": {
"id": "EXAMPLE ID",
"name": "Reddit account"
}
}
- Wait Node
This node is intended to pause the workflow for a set amount of time between each comment to avoid spam filters.
{
"parameters": {
"amount": 30,
"unit": "seconds"
},
"name": "Wait",
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [2300, 1980]
}
Error Details
Here is the full error returned by the “Create a comment in a post” node after it has already posted the comment successfully.
{
"errorMessage": "Cannot read properties of undefined (reading 'things')",
}
Any insight into why this might be happening or a more robust way to structure this loop would be greatly appreciated. Thank you!