Skip to content

Reddit#

Use the Reddit node to automate work in Reddit, and integrate Reddit with other applications. Ensemble has built-in support for a wide range of Reddit features, including getting profiles, and users, retrieving post comments and subreddit, as well as submitting, getting, and deleting posts.

On this page, you'll find a list of operations the Reddit node supports and links to more resources.

Credentials

Refer to Reddit credentials for guidance on setting up authentication.

Basic Operations#

  • Post
    • Submit a post to a subreddit
    • Delete a post from a subreddit
    • Get a post from a subreddit
    • Get all posts from a subreddit
    • Search posts in a subreddit or in all of Reddit.
  • Post Comment
    • Create a top-level comment in a post
    • Retrieve all comments in a post
    • Remove a comment from a post
    • Write a reply to a comment in a post
  • Profile
    • Get
  • Subreddit
    • Retrieve background information about a subreddit.
    • Retrieve information about subreddits from all of Reddit.
  • User
    • Get

Example Usage#

This Pathway allows you to create a post a Reddit and add a comment to that post. This example usage Pathway uses the following nodes. - Start - Reddit

1. Start node#

The Start node exists by default when you create a new workflow.

2. Reddit node (create: post)#

This node will create a post under the subreddit Ensemble. If you want to create a post under a different subreddit, enter the name of that subreddit instead.

  1. First of all, you'll have to enter credentials for the Reddit node. You can find out how to do that here.
  2. Enter Ensemble in the Subreddit field.
  3. Enter a title in the Title field.
  4. Enter the content of the post in the Text field.
  5. Click on Execute Node to run the node.

3. Reddit1 node (get: post)#

This node will retrieve the post that we created using the previous node.

  1. Select the credentials you entered in the previous node.
  2. Select 'Get' from the Operation dropdown list.
  3. Click on the gears icon next to the Subreddit field and click on Add Expression.
  4. Select the following in the Variable Selector section: Nodes > Reddit > Parameters > subreddit. You can also add the following expression: {{$node["Reddit"].parameter["subreddit"]}}.
  5. Click on the gears icon next to the Post ID field and click on Add Expression.
  6. Select the following in the Variable Selector section: Current Node > Input Data > JSON > id. You can also add the following expression: {{$json["id"]}}.
  7. Click on Execute Node to run the node.

4. Reddit node (create: postComment)#

This node will add a comment to the post that we created earlier.

  1. Select the credentials you entered in the previous node.
  2. Select 'Post Comment' from the Resource dropdown list.
  3. Click on the gears icon next to the Post ID field and click on Add Expression.
  4. Select the following in the Variable Selector section: Current Node > Input Data > JSON > id. You can also add the following expression: {{$json["id"]}}.
  5. Enter your comment in the Comment Text field.
  6. Click on Execute Node to run the node.