ETReddit

Consume the Reddit API

Actions13

Overview

This node allows you to retrieve information about a specific Reddit user by interacting with the Reddit API. It supports fetching various types of user-related data, such as profile details, comments, posts, and more. This is useful for workflows that need to analyze user activity, monitor engagement, or collect user-generated content from Reddit.

Practical examples:

  • Fetching a user's profile information for enrichment in a CRM.
  • Collecting all comments made by a user for sentiment analysis.
  • Monitoring submissions from a particular user for moderation or research purposes.

Properties

Name Type Meaning
Username String Reddit ID of the user to retrieve.
Details Options Specifies which type of user data to fetch: About, Comments, Gilded, Overview, Submitted.
Return All Boolean Whether to return all results or only up to a given limit (applies to list-type details).
Limit Number Maximum number of results to return (used when "Return All" is false for list-type details).

Output

The output will be a JSON object or an array of objects depending on the selected "Details" option:

  • About: Returns a single JSON object containing the user's profile information.
  • Comments, Gilded, Overview, Submitted: Returns an array of JSON objects, each representing a comment, gilded post, overview item, or submitted post by the user. The structure of these objects follows Reddit's API response format for the respective endpoints.

If binary data is ever returned (unlikely for this operation), it would represent raw Reddit API responses or media, but this operation primarily outputs structured JSON.

Dependencies

  • Reddit API: Requires access to Reddit's public API.
  • Credentials: May require OAuth2 credentials (redditOAuth2Api) if accessing private or rate-limited endpoints.
  • n8n Configuration: Ensure the Reddit OAuth2 credential is set up in n8n if needed.

Troubleshooting

  • Invalid Username: If the specified username does not exist, the node may return an error or an empty result. Double-check the spelling of the Reddit ID.
  • API Rate Limits: Reddit enforces rate limits; excessive requests may result in errors. Consider using "Limit" and "Return All" judiciously.
  • Authentication Errors: If required credentials are missing or invalid, authentication errors will occur. Ensure the correct Reddit OAuth2 credentials are configured in n8n.
  • Common Error Messages:
    • 401 Unauthorized: Check your Reddit credentials.
    • 404 Not Found: The user does not exist or the endpoint is incorrect.
    • 429 Too Many Requests: You have hit Reddit's rate limit; try again later.

Links and References

Discussion