Reddit問題のAI自動化

上級

これはSocial Media, Multimodal AI分野の自動化ワークフローで、20個のノードを含みます。主にIf, Set, Merge, Reddit, GoogleSheetsなどのノードを使用。 Google GeminiとSheetsを使ってRedditの問題を検出し、自動のに解決策へのコメントを投稿する

前提条件
  • Google Sheets API認証情報
  • Google Gemini API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "BEji2e0zxDfm2TCt",
  "meta": {
    "instanceId": "f678cb66f902ee934e7c819f39c2d7d59eee478ead5d09104fa91cfa2f204413",
    "templateCredsSetupCompleted": true
  },
  "name": "AI automation for Reddit Problems",
  "tags": [],
  "nodes": [
    {
      "id": "35fec5df-e393-4d93-b2b5-cc244e34c7fd",
      "name": "ワークフロー実行時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -3328,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "756450ba-a661-4a3f-a7cf-062c1d97d35f",
      "name": "AIエージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2352,
        192
      ],
      "parameters": {
        "text": "=Define weather the reddit post is talking about the problems faced by the users of AI Automation or they need a solution on how they want  bew features in AI Automation. the post should mention a specific problem faced by the users.\n\nReddit Post:  {{ $json.selftext }}\n\nIs this post is about a problem that users are facing about AI Automation or they need new features, Just answer with Yes or No.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "933d79ab-cabf-4a4c-8e23-e795ee59e92e",
      "name": "Google Gemini チャットモデル",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -2320,
        368
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "3d1ee156-858b-477f-a1f9-92cb89ff04d2",
      "name": "マージ",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2064,
        208
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "includeUnpaired": true
        },
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "eb9a9ebb-0352-4968-9b5d-70c91d05df0c",
      "name": "AIエージェント1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1584,
        192
      ],
      "parameters": {
        "text": "=Based on the reddit post, suggest  a plan or a solution on how i fix the issues  the users are facing with Sora 2.\n\nReddit Post: {{ $json.selftext }}\n\nProvide a concise solution on how we can fix the problems in slack based on the reddit post. \nExplain the solution",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "8c17f645-76ed-4806-ad95-77a4ca5352e9",
      "name": "Google Gemini チャットモデル1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1344,
        304
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash"
      },
      "typeVersion": 1
    },
    {
      "id": "b6de179b-ff6d-4d3a-a175-b0aa7754e499",
      "name": "マージ1",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1264,
        176
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "clashHandling": {
            "values": {
              "resolveClash": "preferInput1"
            }
          }
        },
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "c8affa4e-c19e-40ec-b16c-84a123886e5d",
      "name": "投稿へのコメント作成",
      "type": "n8n-nodes-base.reddit",
      "position": [
        -864,
        176
      ],
      "parameters": {
        "postId": "={{ $json.Bio }}",
        "resource": "postComment",
        "commentText": "={{ $json['Full Name'] }}"
      },
      "typeVersion": 1
    },
    {
      "id": "8a69784f-8906-4e0c-b950-e8bcf2e09a99",
      "name": "シートに行を追加",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1056,
        176
      ],
      "parameters": {
        "columns": {
          "value": {
            "Bio": "={{ $json.created }}",
            "username": "={{ $json.selftext }}",
            "Full Name": "={{ $json.output }}",
            "Profile ID,": "={{ $json.title }}",
            "Follower Count": "={{ $json.subreddit_id }}"
          },
          "schema": [
            {
              "id": "username",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "username",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Full Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Full Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Profile ID,",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Profile ID,",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Follower Count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Follower Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Bio",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Bio",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Follower Count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Follower Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1703783376,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ic80xnSBq5RsNC5CDUEuaEoze4PDzhL9IPS0jj8z45I/edit#gid=1703783376",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ic80xnSBq5RsNC5CDUEuaEoze4PDzhL9IPS0jj8z45I",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ic80xnSBq5RsNC5CDUEuaEoze4PDzhL9IPS0jj8z45I/edit?usp=drivesdk",
          "cachedResultName": "Untitled spreadsheet"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "5fd3bc9a-5782-4433-86ff-da5b26ac6b90",
      "name": "投稿検索",
      "type": "n8n-nodes-base.reddit",
      "position": [
        -2976,
        208
      ],
      "parameters": {
        "limit": 10,
        "keyword": "Why i stopped using",
        "operation": "search",
        "subreddit": "n8n",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "25b867fb-60cd-4515-bc31-ef0cd676dda2",
      "name": "条件分岐",
      "type": "n8n-nodes-base.if",
      "position": [
        -2768,
        208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "751771bf-3129-4806-a686-11d98ecfce3e",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.ups }}",
              "rightValue": 2
            },
            {
              "id": "cda8f6cf-9c1f-49bd-afb0-6b404a9d054d",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.selftext }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a0b43120-0737-426a-a3c4-84e25d95fc04",
      "name": "値設定",
      "type": "n8n-nodes-base.set",
      "position": [
        -2528,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "7fc31f22-be37-4195-a26a-40054f74001b",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "da1b8bf9-c1a8-4c6b-b85d-379c91b45241",
              "name": "selftext",
              "type": "string",
              "value": "={{ $json.selftext }}"
            },
            {
              "id": "fea02618-7f96-474c-bcb5-a3e24508ecdb",
              "name": "ups",
              "type": "number",
              "value": "={{ $json.ups }}"
            },
            {
              "id": "b3c743d2-8e5a-48d9-a835-d53d178fb4da",
              "name": "created",
              "type": "number",
              "value": "={{ $('Post Searching').item.json.created }}"
            },
            {
              "id": "75c7a180-6451-4a07-aa09-4d54019c3257",
              "name": "url",
              "type": "string",
              "value": "={{ $json.url }}"
            },
            {
              "id": "a314d8bd-aa43-4b3a-bb35-acd777979939",
              "name": "subreddit_id",
              "type": "string",
              "value": "={{ $json.subreddit_id }}"
            },
            {
              "id": "87e595d0-e201-4b3f-a75b-396aa4202fd9",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "dc1e2c07-9cbd-4cfd-ba6a-c86c67aabe4c",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3472,
        -64
      ],
      "parameters": {
        "width": 440,
        "height": 592,
        "content": "## Manual Trigger (Template Demo)\nThis workflow starts with a **Manual Trigger** so reviewers can run it immediately from the Editor via **Execute workflow**.\n\nIn your own automations you can replace this with a **Schedule Trigger** or a **Webhook**. For the template, keeping it manual makes it easier to test the downstream Reddit search and AI steps without extra setup.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4e5dc346-052c-4dfb-9bc3-7095cc1322df",
      "name": "条件分岐2",
      "type": "n8n-nodes-base.if",
      "position": [
        -1872,
        208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a80000e7-0860-41f4-a64f-087c176ca5a3",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.output }}",
              "rightValue": "Yes"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f48bffbe-c4de-4072-a2e0-dc5e5dcc5f0c",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3024,
        -64
      ],
      "parameters": {
        "color": 6,
        "width": 640,
        "height": 584,
        "content": "## Search & Filter Reddit Posts (Data Source)\n**Post Searching (Reddit)** looks for posts in r/n8n with the keyword **“Why i stopped using”**. \n\n**If Condition** then filters results to avoid noise:\n- `ups >= 2` → keeps posts with at least two upvotes (signals relevance).\n- `selftext not empty` → ignores link-only or empty posts.\n\nThese constraints make the AI analysis more reliable by focusing on substantive posts that actually describe problems.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "aae71a32-f119-4536-ae33-7b4f568ee7dc",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2368,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 584,
        "content": "## Problem Classifier (AI Analyzer)\n**Value setup (Set)** normalizes useful fields from the Reddit item (`title`, `selftext`, `ups`, `created`, etc.).\n\n**AI Agent** (LLM) is prompted to answer **Yes/No** to: \n“Is this post about a user problem with AI automation (vs. a feature request)?”\n\nThe **Google Gemini Chat Model** provides the language model for the agent.\n**Merge** simply passes through the AI result along with the original item so we can branch next.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5a23ac83-1cbf-470c-a31f-9b78cfb49c83",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 1008,
        "height": 544,
        "content": "## Solution Generator (AI)\n**If Condition 2** checks the classifier's output:\n- When `$json.output` **contains \"Yes\"**, the post is treated as a real problem.\n\nFor qualifying posts, **AI Agent1** generates a concise, actionable plan to address the problem (prompt references the Reddit `selftext`).\nThe **Google Gemini Chat Model1** supplies the model (`gemini-2.0-flash`) for fast, low-latency responses.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "6717c8a9-d983-4f8a-889a-2fb1a2057c02",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        496
      ],
      "parameters": {
        "width": 1008,
        "height": 264,
        "content": "## Store Results & (Optionally) Reply\n**Merge1** combines the original Reddit fields with the AI-generated solution (prefers input1 on clashes).\n\n**Append row in sheet (Google Sheets)** archives key fields so you can review solutions later. \n- Mapped columns: `Full Name` ← AI output (solution text), `username` ← `selftext`, `Profile ID` ← `title`, etc.\n- Update the target Spreadsheet ID and sheet name to your own doc.\n\n**Create a comment in a post (Reddit)** demonstrates posting back. \n- Update `postId` and `commentText` mappings to your desired fields (e.g., use the Reddit `id` as `postId` and the AI output as the comment text).\n- Keep this **disabled** until you have tested safely.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "77196185-7cf5-499e-baa1-6acff8328ff6",
      "name": "付箋 - 認証情報",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3472,
        544
      ],
      "parameters": {
        "color": 6,
        "width": 1096,
        "height": 200,
        "content": "## Credentials & Safety\n- **Reddit (OAuth)**: Required by *Post Searching* and *Create a comment in a post*.\n- **Google Sheets**: Needed by *Append row in sheet*.\n- **Google Gemini**: Needed by both AI Agent nodes (set your model and project).\n\n**Tip:** Test with read-only actions first. Keep the reply node disabled until you verify outputs. Consider rate limits and community rules before posting automatically.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0b3851c9-5cb8-46ef-838d-5271ee4e8991",
      "name": "付箋 - 再利用方法",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        544
      ],
      "parameters": {
        "color": 6,
        "width": 704,
        "height": 208,
        "content": "## How to Reuse / Customize\n1) Change the subreddit and keyword in **Post Searching** to target your audience.\n2) Adjust the **If** thresholds (e.g., `ups >= 5`) to control quality.\n3) Refine the **classifier prompt** to match your product or domain.\n4) Edit the **solution prompt** to match your support tone and policies.\n5) Map the **Google Sheets** fields to your own schema.\n6) When ready, point **postId** to the Reddit post ID and **commentText** to the AI solution to reply automatically.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "488ed89a-1f72-4aac-9f75-08d59d1ccbd0",
  "connections": {
    "3d1ee156-858b-477f-a1f9-92cb89ff04d2": {
      "main": [
        [
          {
            "node": "4e5dc346-052c-4dfb-9bc3-7095cc1322df",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b6de179b-ff6d-4d3a-a175-b0aa7754e499": {
      "main": [
        [
          {
            "node": "8a69784f-8906-4e0c-b950-e8bcf2e09a99",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "756450ba-a661-4a3f-a7cf-062c1d97d35f": {
      "main": [
        [
          {
            "node": "3d1ee156-858b-477f-a1f9-92cb89ff04d2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "eb9a9ebb-0352-4968-9b5d-70c91d05df0c": {
      "main": [
        [
          {
            "node": "b6de179b-ff6d-4d3a-a175-b0aa7754e499",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a0b43120-0737-426a-a3c4-84e25d95fc04": {
      "main": [
        [
          {
            "node": "756450ba-a661-4a3f-a7cf-062c1d97d35f",
            "type": "main",
            "index": 0
          },
          {
            "node": "3d1ee156-858b-477f-a1f9-92cb89ff04d2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "25b867fb-60cd-4515-bc31-ef0cd676dda2": {
      "main": [
        [
          {
            "node": "a0b43120-0737-426a-a3c4-84e25d95fc04",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4e5dc346-052c-4dfb-9bc3-7095cc1322df": {
      "main": [
        [
          {
            "node": "eb9a9ebb-0352-4968-9b5d-70c91d05df0c",
            "type": "main",
            "index": 0
          },
          {
            "node": "b6de179b-ff6d-4d3a-a175-b0aa7754e499",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "5fd3bc9a-5782-4433-86ff-da5b26ac6b90": {
      "main": [
        [
          {
            "node": "25b867fb-60cd-4515-bc31-ef0cd676dda2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8a69784f-8906-4e0c-b950-e8bcf2e09a99": {
      "main": [
        [
          {
            "node": "c8affa4e-c19e-40ec-b16c-84a123886e5d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "933d79ab-cabf-4a4c-8e23-e795ee59e92e": {
      "ai_languageModel": [
        [
          {
            "node": "756450ba-a661-4a3f-a7cf-062c1d97d35f",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "8c17f645-76ed-4806-ad95-77a4ca5352e9": {
      "ai_languageModel": [
        [
          {
            "node": "eb9a9ebb-0352-4968-9b5d-70c91d05df0c",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "35fec5df-e393-4d93-b2b5-cc244e34c7fd": {
      "main": [
        [
          {
            "node": "5fd3bc9a-5782-4433-86ff-da5b26ac6b90",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - ソーシャルメディア, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
上級
ノード数20
カテゴリー2
ノードタイプ9
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34