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.
- First of all, you'll have to enter credentials for the Reddit node. You can find out how to do that here.
- Enter
Ensemble
in the Subreddit field. - Enter a title in the Title field.
- Enter the content of the post in the Text field.
- 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.
- Select the credentials you entered in the previous node.
- Select 'Get' from the Operation dropdown list.
- Click on the gears icon next to the Subreddit field and click on Add Expression.
- Select the following in the Variable Selector section: Nodes > Reddit > Parameters > subreddit. You can also add the following expression:
{{$node["Reddit"].parameter["subreddit"]}}
. - Click on the gears icon next to the Post ID field and click on Add Expression.
- Select the following in the Variable Selector section: Current Node > Input Data > JSON > id. You can also add the following expression:
{{$json["id"]}}
. - 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.
- Select the credentials you entered in the previous node.
- Select 'Post Comment' from the Resource dropdown list.
- Click on the gears icon next to the Post ID field and click on Add Expression.
- Select the following in the Variable Selector section: Current Node > Input Data > JSON > id. You can also add the following expression:
{{$json["id"]}}
. - Enter your comment in the Comment Text field.
- Click on Execute Node to run the node.