Issue with Reddit Node in n8n Workflow: Cannot Read Properties of Undefined (reading 'things')

I’m encountering an error in my n8n workflow while executing the Reddit1 node (createPostComment). The error message states:

Cannot read properties of undefined (reading ‘things’)

Workflow Context:

  • The workflow starts with a Schedule Trigger and fetches Reddit posts using the Reddit node (getAll: post).
  • After sorting and processing the data through multiple Code nodes, it loops over items and sends an HTTP request.
  • The response is formatted and sent to Telegram.
  • Depending on the response, the workflow takes different paths, one of which leads to the Reddit1 node for posting a comment.

Troubleshooting Done:

  • I verified that previous nodes are executing without errors.
  • The Reddit1 node is supposed to use data from an earlier node.
  • It seems like the expected data structure is missing or incorrect.

Questions:

  1. What does this error typically indicate in n8n when working with the Reddit node?
  2. Is this related to missing authentication, incorrect data structure, or a Reddit API limitation?
  3. How can I debug this issue further to ensure the Reddit1 node gets the expected input?

Any help or insights would be greatly appreciated!

Hello and welcome to the community!

Referencing earlier nodes directly, esp. within a loop can be tricky.

Could you share your workflow using the </> button? It will create a pair of triple backticks to paste the workflow json between them so that the workflow will be rendered straight in your post.

Pinning example data in the node you refer to will be helpful as well.

how did you solve this?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.