AutomationFlowsSocial Media › Reddit API Hub: Manage Posts, Comments & Subreddits via Server-sent Events

Reddit API Hub: Manage Posts, Comments & Subreddits via Server-sent Events

BySimeon @simealdana on n8n.io

This workflow is built for content creators, marketers, Reddit automation enthusiasts, and AI agent developers who want structured, programmable access to Reddit content. If you're researching niche communities, tracking trends, or automating Reddit engagement — this is for you.

Event trigger★★★★★ complexityAI-powered31 nodesMcp TriggerExecute Workflow TriggerRedditTool Workflow
Social Media Trigger: Event Nodes: 31 Complexity: ★★★★★ AI nodes: yes Added:
Reddit API Hub: Manage Posts, Comments & Subreddits via Server-sent Events — n8n workflow card showing Mcp Trigger, Execute Workflow Trigger, Reddit integration

This workflow corresponds to n8n.io template #4266 — we link there as the canonical source.

This workflow follows the Execute Workflow Trigger → Toolworkflow recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "REDACTED",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "MCP_reddit",
  "tags": [],
  "nodes": [
    {
      "id": "REDACTED",
      "name": "MCP Server Trigger",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -120,
        -240
      ],
      "parameters": {
        "path": "REDACTED"
      },
      "typeVersion": 1
    },
    {
      "id": "40451b0c-2111-420b-bb22-59b14d497cd3",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        540,
        240
      ],
      "parameters": {
        "inputSource": "jsonExample",
        "jsonExample": "{\n  \"operation\": \"string\",\n  \"limit\": 100,\n  \"subReddit\": \"string\",\n  \"postPostId\": \"string\",\n  \"postTitle\": \"string\",\n  \"postText\": \"string\",\n  \"filterCategory\": \"hot\",\n  \"filtersKeyword\": \"string\",\n  \"filtersTrendig\": \"string\",\n  \"commentPostId\": \"string\",\n  \"commentText\": \"string\",\n  \"commentCommentId\": \"stirng\",\n  \"commentReplyText\": \"string\"\n}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "3ae445e0-3cb9-4d21-9484-a54b340ba899",
      "name": "create_post",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        -680
      ],
      "parameters": {
        "text": "={{$json.postText}}",
        "title": "={{$json.postTitle}}",
        "subreddit": "={{$json.subReddit}}"
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "14d04035-c71e-4108-84f5-fb2859f86ef6",
      "name": "get_many_posts",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        -520
      ],
      "parameters": {
        "limit": "={{$json.limit}}",
        "filters": {
          "category": "={{$json.filtersCategory}}"
        },
        "operation": "getAll",
        "subreddit": "={{$json.subReddit}}"
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "def4b85a-5c94-40ca-883f-8c8087e7adf3",
      "name": "delete_post",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        -340
      ],
      "parameters": {
        "postId": "={{$json.postPostId}}",
        "operation": "delete"
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "422e5d8e-fe9e-4b33-9608-1921da4e1a0a",
      "name": "get_post_by_id",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        -160
      ],
      "parameters": {
        "postId": "={{$json.postPostId}}",
        "operation": "get",
        "subreddit": "={{$json.subReddit}}"
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c14f7575-d78d-4971-b76a-a06d0a57b1b9",
      "name": "operation_switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        760,
        240
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "post_flow",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "cd565fc9-b8c6-4cfa-97f4-0afaf7dfbb8e",
                    "operator": {
                      "type": "string",
                      "operation": "startsWith"
                    },
                    "leftValue": "={{ $json.operation}}",
                    "rightValue": "post_"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "comment_flow",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6cc1bd32-41cf-4f63-b69b-3a6416de4544",
                    "operator": {
                      "type": "string",
                      "operation": "startsWith"
                    },
                    "leftValue": "={{ $json.operation}}",
                    "rightValue": "comment_"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "subreddit_flow",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "a755d168-4467-42a5-96ed-6648be0722e5",
                    "operator": {
                      "type": "string",
                      "operation": "startsWith"
                    },
                    "leftValue": "={{ $json.operation}}",
                    "rightValue": "=subreddit_"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "c55aafce-5bf8-465b-8c01-a45dffeb7d07",
      "name": "create_comment",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        80
      ],
      "parameters": {
        "postId": "={{$json.commentPostId}}",
        "resource": "postComment",
        "commentText": "={{$json.commentText}}"
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8de60854-fd35-48aa-bb30-a25a5447d2f4",
      "name": "get_many_comments",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        260
      ],
      "parameters": {
        "limit": "={{$json.limit}}",
        "postId": "={{$json.commentPostId}}",
        "resource": "postComment",
        "operation": "getAll",
        "subreddit": "={{$json.subReddit}}"
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "476bb18c-c71c-4d77-b94e-7d87f6a6afac",
      "name": "delete_comment",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        460
      ],
      "parameters": {
        "resource": "postComment",
        "commentId": "={{$json.commentCommentId}}",
        "operation": "delete"
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3ec0391c-d179-4cfa-b25a-455661952c39",
      "name": "reply_comment",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        640
      ],
      "parameters": {
        "resource": "postComment",
        "commentId": "={{$json.commentCommentId}}",
        "operation": "reply",
        "replyText": "={{$json.commentReplyText}}"
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6ce98a36-d6da-4229-951d-fcba8f5a2b6c",
      "name": "post_switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1020,
        -340
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "post_create",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f466ea36-35a0-4c41-9d7f-9ca9a3199ec2",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "post_create"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "post_get_many",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b37861f0-cd89-4fd2-9653-cbc0e4585a44",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "post_get_many"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "post_delete",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "72731a2a-a77b-4b1a-8202-bcb6de1e0c7e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "post_delete"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "post_get_by_id",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "39db435c-6cb9-4677-94d5-0a312452319e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "post_get_by_id"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "post_search",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1478f02b-c057-485f-b83f-7c3d9d8274ea",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "post_search"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "66693e75-0b94-460f-9c86-5d925ec52be2",
      "name": "comment_switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1000,
        220
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "comment_create",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f466ea36-35a0-4c41-9d7f-9ca9a3199ec2",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "comment_create"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "comment_get_many",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b37861f0-cd89-4fd2-9653-cbc0e4585a44",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "comment_get_many"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "comment_delete",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "72731a2a-a77b-4b1a-8202-bcb6de1e0c7e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "comment_delete"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "comment_reply",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "39db435c-6cb9-4677-94d5-0a312452319e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "comment_reply"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "2e1a6a72-59b5-422e-8bde-d1dd837ccfda",
      "name": "get_subreddit_about",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        920
      ],
      "parameters": {
        "resource": "subreddit",
        "subreddit": "={{$json.subReddit}}"
      },
      "typeVersion": 1
    },
    {
      "id": "da324c0c-7f75-4c57-b126-76d24528311e",
      "name": "get_subreddit_rules",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        1280
      ],
      "parameters": {
        "content": "rules",
        "resource": "subreddit",
        "subreddit": "={{$json.subReddit}}"
      },
      "typeVersion": 1
    },
    {
      "id": "04044204-2fe9-4bc1-8eaa-4e2019371f21",
      "name": "subreddit_switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        980,
        1040
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "subreddit_get_about",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "9c50f7b3-d51e-4325-b904-b2dadf20067a",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "=subreddit_get_about"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "subreddit_get_many",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "339d8536-7dfe-4478-b7a8-2d55e0f13028",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "subreddit_get_many"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "subreddit_get_rules",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "21e9d5e4-ccfb-4ba0-82f7-b0d49d86865b",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.operation}}",
                    "rightValue": "subreddit_get_rules"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "26b4d79a-9306-45cf-a8cd-b6ec652d7903",
      "name": "subreddit_get_many",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1300,
        1100
      ],
      "parameters": {
        "limit": "={{ $json.limit }}",
        "filters": {
          "keyword": "={{ $json.filtersKeyword }}",
          "trending": "={{ $json.filtersTrendig.toBoolean() }}"
        },
        "resource": "subreddit",
        "operation": "getAll"
      },
      "typeVersion": 1
    },
    {
      "id": "fa1a3b6f-b01b-48e0-93f8-772310dfd8a7",
      "name": "post_operation",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -180,
        -20
      ],
      "parameters": {
        "name": "post_operation",
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "REDACTED",
          "cachedResultName": "MCP_reddit"
        },
        "description": "Call this tool to fire action on post-operation; the allowed operations are:\n- post_create\nparameters: subReddit, postPostId, postPostText\n- post_delete\nparameters: postPostId\n- post_get_many\nparameters: subReddit, limit, filterCategory\n- post_get_by_id\nparameters: postPostId, subReddit\n- post_search\nparameters: filtersKeyword, subReddit, limit",
        "workflowInputs": {
          "value": {
            "limit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('limit', ``, 'number') }}",
            "postText": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('postText', ``, 'string') }}",
            "operation": "={{ $fromAI('operation', 'Type of Reddit operation to post. Options: post_create, post_delete, post_get_many, post_search, post_get_by_id', 'string') }}",
            "postTitle": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('postTitle', ``, 'string') }}",
            "subReddit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('subReddit', ``, 'string') }}",
            "postPostId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('postPostId', ``, 'string') }}",
            "filterCategory": "={{ $fromAI(\n  'filterCategory',\n  'Category used to filter Reddit posts. Must be one of: \"top\", \"hot\", \"new\", \"rising\". Example: filterCategory: \"hot\"',\n  'string'\n) }}",
            "filtersKeyword": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('filtersKeyword', ``, 'string') }}"
          },
          "schema": [
            {
              "id": "operation",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "operation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "limit",
              "type": "number",
              "display": true,
              "required": false,
              "displayName": "limit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "subReddit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "subReddit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postPostId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "postPostId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postTitle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "postTitle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postText",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "postText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filterCategory",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "filterCategory",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filtersKeyword",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "filtersKeyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filtersTrendig",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "filtersTrendig",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentPostId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "commentPostId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentText",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "commentText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentCommentId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "commentCommentId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentReplyText",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "commentReplyText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "f10780f6-e85a-41dc-849a-85ae4b2289fb",
      "name": "subReddit_operation",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -20,
        -20
      ],
      "parameters": {
        "name": "subReddit_operation",
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "REDACTED",
          "cachedResultName": "MCP_reddit"
        },
        "description": "Call this tool to fire action on subreddit operation; the allowed operations are:\n- subreddit_get_about : get info about subreddit\nparameters: subReddit\n- subreddit_get_many: get many subreddit by filters\nparameters: subReddit, limit, filtersKeyword (optional), filtersTrendig(optional)\n- subreddit_get_rules: get info about subreddit's rules\nparameters: subReddit\n\n",
        "workflowInputs": {
          "value": {
            "limit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('limit', ``, 'number') }}",
            "operation": "={{ $fromAI('operation', 'Type of Reddit operation to subreddit. Options: subreddit_get_about, subreddit_get_many, subreddit_get_rules', 'string') }}",
            "subReddit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('subReddit', ``, 'string') }}",
            "filtersKeyword": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('filtersKeyword', ``, 'string') }}",
            "filtersTrendig": "={{ $fromAI('filtersTrendig', `This is a booleand true or false`, 'string') }}"
          },
          "schema": [
            {
              "id": "operation",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "operation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "limit",
              "type": "number",
              "display": true,
              "required": false,
              "displayName": "limit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "subReddit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "subReddit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postPostId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "postPostId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postTitle",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "postTitle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postText",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "postText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filterCategory",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "filterCategory",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filtersKeyword",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "filtersKeyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filtersTrendig",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "filtersTrendig",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "comment",
              "type": "object",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "comment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "3783630e-9398-4fa1-b486-e541c3df6a17",
      "name": "comment_operation",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        160,
        -20
      ],
      "parameters": {
        "name": "comment_operation",
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "REDACTED",
          "cachedResultName": "MCP_reddit"
        },
        "description": "Call this tool to handle comment operations:\n\n- comment_create\nparameters: commentPostId, commentText\n- comment_get_many \nparameters: subReddit, limit, commentPostId \n- comment_delete \nparameters: commentCommentId\n- comment_reply\nparameters: commentCommentId, commentReplyText",
        "workflowInputs": {
          "value": {
            "limit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('limit', ``, 'number') }}",
            "operation": "={{ $fromAI('operation', 'Type of Reddit operation to comment. Options: comment_create, comment_get_many, comment_delete, comment_reply', 'string') }}",
            "subReddit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('subReddit', ``, 'string') }}",
            "commentText": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('commentText', ``, 'string') }}",
            "commentPostId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('commentPostId', ``, 'string') }}",
            "commentCommentId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('commentCommentId', ``, 'string') }}",
            "commentReplyText": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('commentReplyText', ``, 'string') }}"
          },
          "schema": [
            {
              "id": "operation",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "operation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "limit",
              "type": "number",
              "display": true,
              "required": false,
              "displayName": "limit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "subReddit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "subReddit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postPostId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "postPostId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postTitle",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "postTitle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postText",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "postText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filterCategory",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "filterCategory",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filtersKeyword",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "filtersKeyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filtersTrendig",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "filtersTrendig",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentPostId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "commentPostId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentText",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "commentText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentCommentId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "commentCommentId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentReplyText",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "commentReplyText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "0e9a89f1-e409-4e41-8c64-d898029c096b",
      "name": "search_posts",
      "type": "n8n-nodes-base.reddit",
      "position": [
        1580,
        -240
      ],
      "parameters": {
        "limit": "={{$json.limit}}",
        "keyword": "={{$json.filtersKeyword}}",
        "operation": "search",
        "subreddit": "={{$json.subReddit}}",
        "additionalFields": {}
      },
      "credentials": {
        "redditOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ea367253-a874-4fc2-a156-a22d8ae20386",
      "name": "map_post_get_many",
      "type": "n8n-nodes-base.set",
      "position": [
        1520,
        -520
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n    \"posts\": {{ $('get_many_posts').all().map(item => ({\n        subreddit: item.json.subreddit,\n        selftext: item.json.selftext,\n        author_fullname: item.json.author_fullname,\n        title: item.json.title,\n        total_awards_received: item.json.total_awards_received,\n        link_flair_text: item.json.link_flair_text,\n        score: item.json.score,\n        thumbnail: item.json.thumbnail,\n        created: item.json.created,\n        num_comments: item.json.num_comments,\n        permalink: item.json.permalink \n    })) }}\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "14a4d27e-0f0d-4d57-8e6a-4652563e42b1",
      "name": "map_post_get_search",
      "type": "n8n-nodes-base.set",
      "position": [
        1800,
        -240
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n    \"posts\": {{ $('search_posts').all().map(item => ({\n        subreddit: item.json.subreddit,\n        selftext: item.json.selftext,\n        author_fullname: item.json.author_fullname,\n        title: item.json.title,\n        total_awards_received: item.json.total_awards_received,\n        link_flair_text: item.json.link_flair_text,\n        score: item.json.score,\n        thumbnail: item.json.thumbnail,\n        created: item.json.created,\n        num_comments: item.json.num_comments,\n        permalink: item.json.permalink \n    })) }}\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "62bf710d-2dcd-4a09-b1be-c2481d523d5b",
      "name": "map_comment_get_many",
      "type": "n8n-nodes-base.set",
      "position": [
        1520,
        260
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"comments\": {{ $('get_many_comments').all().map(item => ({\n    subreddit: item.json.subreddit,\n    author: item.json.author,\n    author_is_blocked: item.json.author_is_blocked,\n    body: item.json.body,\n    score: item.json.score,\n    total_awards_received: item.json.total_awards_received,\n    created: item.json.created,\n    permalink: item.json.permalink,\n    replies: item.json.replies\n  })) }}\n}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "7810503f-f56a-40ba-b6bb-5743d40caab8",
      "name": "split_out_get_many_comments",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1740,
        260
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "comments"
      },
      "typeVersion": 1
    },
    {
      "id": "dbf5e1b9-fe70-42a8-9fb7-ab513389200a",
      "name": "posts_split_out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1980,
        -400
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "={{$json.posts}}"
      },
      "typeVersion": 1
    },
    {
      "id": "2fc0abce-cd11-4feb-9f46-123003bae2eb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        -380
      ],
      "parameters": {
        "width": 660,
        "height": 540,
        "content": "## Input and switch to right operation type\nThe MCP server receives a JSON that describes the type of operation that you want to query or perform.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d84e71d4-8d27-48b2-9263-7f82cb4b12bd",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -380
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 380,
        "content": "## Possible operations:\n\n\n- post_create\n- post_delete\n- post_get_many\n- post_get_by_id\n- post_search\n- comment_create\n- comment_delete\n- comment_get_many\n- comment_reply\n- subreddit_get_about\n- subreddit_get_rules\n- subreddit_get_many"
      },
      "typeVersion": 1
    },
    {
      "id": "477eddba-407e-4e03-a16f-b4b8d45da6e9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        -740
      ],
      "parameters": {
        "color": 3,
        "width": 1360,
        "height": 740,
        "content": "## Post CRUD\n"
      },
      "typeVersion": 1
    },
    {
      "id": "18163585-0952-419f-9705-7f58af1e2861",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        40
      ],
      "parameters": {
        "color": 4,
        "width": 1080,
        "height": 760,
        "content": "## Comment CRUD\n"
      },
      "typeVersion": 1
    },
    {
      "id": "37915576-4634-43a2-ad92-f88979491347",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        860
      ],
      "parameters": {
        "color": 6,
        "width": 600,
        "height": 640,
        "content": "## Subreddit read's operation"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "REDACTED",
  "connections": {
    "post_switch": {
      "main": [
        [
          {
            "node": "create_post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "get_many_posts",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "delete_post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "get_post_by_id",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "search_posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "search_posts": {
      "main": [
        [
          {
            "node": "map_post_get_search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "comment_switch": {
      "main": [
        [
          {
            "node": "create_comment",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "get_many_comments",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "delete_comment",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "reply_comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_many_posts": {
      "main": [
        [
          {
            "node": "map_post_get_many",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "post_operation": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "operation_switch": {
      "main": [
        [
          {
            "node": "post_switch",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "comment_switch",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "subreddit_switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "subreddit_switch": {
      "main": [
        [
          {
            "node": "get_subreddit_about",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "subreddit_get_many",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "get_subreddit_rules",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "comment_operation": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_many_comments": {
      "main": [
        [
          {
            "node": "map_comment_get_many",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "map_post_get_many": {
      "main": [
        [
          {
            "node": "posts_split_out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "map_post_get_search": {
      "main": [
        [
          {
            "node": "posts_split_out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "subReddit_operation": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "map_comment_get_many": {
      "main": [
        [
          {
            "node": "split_out_get_many_comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "operation_switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow is built for content creators, marketers, Reddit automation enthusiasts, and AI agent developers who want structured, programmable access to Reddit content. If you're researching niche communities, tracking trends, or automating Reddit engagement — this is for you.

Source: https://n8n.io/workflows/4266/ — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Social Media

Are you a small YT channel looking to grow to 1000 subs ? This workflow has helped me grow to 80 subs via Reddit Marketing. Check out the YT Tutorial.

Google Sheets, Form Trigger, Gmail +5
Social Media

This workflow automatically generates optimal hashtags for your Instagram posts by analyzing captions and fetching real-time engagement data.

OpenAI Chat, Chain Llm, Google Sheets +2
Social Media

Youtube videos are a great source of new and updated information on a variety of cutting edge developments but they''re are not always simple to understand and lengthy videos may take too much time. U

Execute Workflow Trigger, Tool Workflow, HTTP Request +1
Social Media

This workflow is ideal for individuals, marketers, agencies, and brands who want to effortlessly automate the entire blogging and social media process—from idea generation to promotion. Its primary go

Execute Workflow Trigger, Notion, OpenAI Chat +13
Social Media

This workflow is built for creators, solopreneurs, SaaS founders, and agencies looking to automate their social media content process from idea to publication. It combines the power of OpenAI, Google

OpenAI Chat, Tool Workflow, Agent +15