- Login to Reddit account
- Search for posts related to ‘AI Agent’ key word
- Save the results in a csv file
- Add comments in these retrieved posts
Once the installation is complete, at the end you will get a local host URL, open it in the browser,
Run this above URL in your browser and it will lead to following page, where you can set up your account,
Fill in the required details,
Next popup will come, get paid features sent to your email for a free license key,
Lets start with understanding the concepts:
- Nodes: Nodes are the building blocks of a workflow. There are two types of node operations,
- Trigger Nodes: Triggers start a workflow in response to specific events or conditions in your services. In short, they tell n8n when and how to start the workflow.
- Action Nodes: They perform specific tasks. Examples include manipulating data, calling an API, etc.
- Building workflow: Let’s create a workflow to search for posts related to ‘AI Agents’ on Reddit, store the links in a google sheet, then add comments in those posts.
Add the first step,
As a first step, lets select Trigger Manually, by selecting the first option from right side bar,
Search for Reddit and select it, the result will be multiple common actions of Reddit as below, then select, ‘Search for a post’,
We will now do the setup of parameters,
In the first drop down option, select Create a new credential. This is to establish reddit connection, so we can login and retrieve results.
Setup reddit connection, by following the steps from docs
Click on connect my account and a popup will appear, then, give access to your reddit account. Once the connection is established, go to the main canvas, test your workflow as,
Click on the Reddit node, to view the result of 10 reddit posts (as we setup 10 limit) that matches ‘AI Agents’ keyword, the result can be viewed in json as,
Select the option, Convert JSON data to file, and then convert to CSV,
Test this node and we then can get output file in csv which can be downloaded from OUTPUT as,
Now, for a simpler demonstration of adding comments to the reddit posts retrieved before, I will discard the 'Convert to File' node.
Create a node by following the same steps previously explained for adding Reddit node.
Next, Drag and drop the ‘’id’’ field from INPUT to the Post ID field (red box in below image), and specify the comment text to post in the reddit.
After executing Node Reddit1, you can see the output, and also check your reddit profile to view the comments that are posted,