{
  "id": "FaAWJev77XnoSI6s",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Monitor Reddit for sales opportunities and create Asana tasks",
  "tags": [],
  "nodes": [
    {
      "id": "0ea531ab-ec68-45d6-b5ad-3eabbdb4dfa6",
      "name": "Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2992,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 596,
        "height": 560,
        "content": "## \ud83c\udfaf Reddit Sales Opportunity Monitor\n\n**What it does:**  \nAutomatically scans Reddit every 2 hours to identify potential sales opportunities using AI analysis\n\n**How it works:**  \n1. Searches Google for Reddit posts matching target keywords  \n2. AI analyzes each post for buying intent and problem-solving needs  \n3. Filters and routes by intent level (high/medium/low)  \n4. Creates Asana tasks for qualified leads  \n5. Sends real-time Google Chat alerts to your team\n\n**Requirements:**  \n\u2022 SerpApi (Google search)  \n\u2022 OpenAI API (GPT-4o)  \n\u2022 Asana workspace  \n\u2022 Google Chat space\n\n**Setup:**  \nUpdate search query, Asana workspace ID, and Google Chat space IDs before running"
      },
      "typeVersion": 1
    },
    {
      "id": "0f194d60-e2ac-45a9-ae9e-22faa6356f49",
      "name": "Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3024,
        704
      ],
      "parameters": {
        "width": 592,
        "height": 416,
        "content": "## \ud83d\udce1 Data Collection\nScheduled search every 2 hours \u2192 Fetches Reddit posts via Google \u2192 Splits results for individual processing"
      },
      "typeVersion": 1
    },
    {
      "id": "65fe4bef-924a-4c64-89ff-53b2a4ec5c6d",
      "name": "Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3728,
        720
      ],
      "parameters": {
        "width": 960,
        "height": 504,
        "content": "## \ud83e\udde0 AI Analysis & Filtering\nAI evaluates each post for sales intent \u2192 Filters out non-opportunities \u2192 Extracts structured lead data"
      },
      "typeVersion": 1
    },
    {
      "id": "20e9cade-9510-4580-bb41-86c9fe9833f2",
      "name": "Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4720,
        672
      ],
      "parameters": {
        "width": 260,
        "height": 668,
        "content": "## \ud83d\udd00 Intent-Based Routing\nRoutes qualified leads by intent level: high \u2192 medium \u2192 low"
      },
      "typeVersion": 1
    },
    {
      "id": "79992e5c-2c9a-48ee-bcad-03754525078a",
      "name": "Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4976,
        656
      ],
      "parameters": {
        "width": 444,
        "height": 668,
        "content": "## \u2705 Actions & Notifications\nCreates Asana tasks for each intent level \u2192 Sends Google Chat alerts to notify team"
      },
      "typeVersion": 1
    },
    {
      "id": "07e4d778-fa5a-43b0-b880-cacbaae2a157",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2976,
        1424
      ],
      "parameters": {
        "width": 672,
        "height": 336,
        "content": "## \ud83d\udea8 Error Handling\nCatches workflow failures \u2192 Sends email alerts with error details"
      },
      "typeVersion": 1
    },
    {
      "id": "20833be3-dcdc-4979-9eff-19f86bfc9edc",
      "name": "Every 2 Hours",
      "type": "n8n-nodes-base.cron",
      "position": [
        3104,
        896
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "fab81217-f782-4414-9755-efb465df0101",
      "name": "Filter Valid Opportunities",
      "type": "n8n-nodes-base.if",
      "position": [
        4352,
        896
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "is_opportunity_check",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.output.is_opportunity }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7205545c-6c38-411e-879e-d165fb283514",
      "name": "Extract Lead Data",
      "type": "n8n-nodes-base.set",
      "position": [
        4576,
        896
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5c96296b-7937-427b-993c-5f844e033d87",
              "name": "is_opportunity",
              "type": "string",
              "value": "={{ $json.output.is_opportunity }}"
            },
            {
              "id": "9d17e7ec-e06f-4bac-b18e-a682df15b645",
              "name": "intent_level",
              "type": "string",
              "value": "={{ $json.output.intent_level }}"
            },
            {
              "id": "6f93fdf4-9312-4702-8f5c-cce597732366",
              "name": "problem_summary",
              "type": "string",
              "value": "={{ $json.output.problem_summary }}"
            },
            {
              "id": "88114d15-afd4-4209-8a60-7eff302d4076",
              "name": "recommended_action",
              "type": "string",
              "value": "={{ $json.output.recommended_action }}"
            },
            {
              "id": "78ada7dc-18cc-47f6-a4bc-8b34536616b4",
              "name": "confidence_score",
              "type": "string",
              "value": "={{ $json.output.confidence_score }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "73584207-fa8e-4748-9f23-6ba83c744579",
      "name": "Alert High Intent Lead",
      "type": "n8n-nodes-base.googleChat",
      "position": [
        5248,
        768
      ],
      "parameters": {
        "spaceId": "=",
        "messageUi": {
          "text": "={{ $json.intent_level }}"
        },
        "authentication": "oAuth2",
        "additionalFields": {}
      },
      "credentials": {
        "googleChatOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d361e951-f0f5-4b47-bab7-925423c32fa8",
      "name": "Create High Intent Task",
      "type": "n8n-nodes-base.asana",
      "position": [
        5040,
        768
      ],
      "parameters": {
        "name": "=Reddit Lead: {{ $json.intent_level }}",
        "workspace": "1212551193156936",
        "authentication": "oAuth2",
        "otherProperties": {
          "notes": "=**Source:** \n{{ $json.problem_summary }}\n**Author:** \n\n**Score:** \n{{ $json.confidence_score }}\n---\n\n**AI Analysis:**\n\n**Intent Level:** \n{{ $json.intent_level }}\n**Confidence:**{{ $json.confidence_score }} %\n\n**Problem Summary:**\n{{ $json.problem_summary }}\n"
        }
      },
      "credentials": {
        "asanaOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fcbacd0c-e4fe-4a71-925c-994bbe8fea59",
      "name": "Search Reddit Posts",
      "type": "n8n-nodes-serpapi.serpApi",
      "position": [
        3328,
        896
      ],
      "parameters": {
        "q": "site:reddit.com (\"looking for\" OR \"need help with\" OR \"any tool for\" OR \"recommend software\")",
        "location": "India",
        "requestOptions": {},
        "additionalFields": {}
      },
      "credentials": {
        "serpApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "75381826-4f9e-4309-bc07-83e9b30447fa",
      "name": "Split Search Results",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        3552,
        896
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "organic_results"
      },
      "typeVersion": 1
    },
    {
      "id": "3ef7e5d0-1138-4a48-bcc9-269910c8d6ba",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        3760,
        896
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "0fd89372-03a0-49b2-a1f9-af6133145dd1",
      "name": "AI Lead Analyzer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4048,
        896
      ],
      "parameters": {
        "options": {
          "systemMessage": "=You are an expert sales opportunity analyst. Analyze the following Reddit post and determine if it represents a legitimate sales opportunity.\n\n**POST CONTENT:**\n{{ $json.snippet }}\n\n**YOUR TASK:**\n1. Determine if this is a real sales opportunity (true/false)\n2. Assess the intent level: \"high\", \"medium\", or \"low\"\n   - **High**: Actively looking for solutions, asking for recommendations, has budget signals\n   - **Medium**: Exploring options, has a problem but no urgency\n   - **Low**: Casual mention, theoretical discussion, or off-topic\n3. Summarize the core problem in 1-2 sentences\n4. Suggest a specific next action (e.g., \"Reply with product demo\", \"Share case study\")\n5. Assign a confidence score (0-100) based on clarity and buying signals\n\n**IMPORTANT:**\n- Only mark as opportunity if there's clear problem-solving or buying intent\n- Be conservative with \"high\" intent - reserve for clear buying signals\n- Return \"is_opportunity: false\" for general discussions, memes, or off-topic content\n\nOutput your analysis in the structured JSON format."
        },
        "hasOutputParser": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "b20e8fad-9d5e-457c-b139-9cad83f16fda",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        4176,
        1072
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "f7c35091-07e5-43cc-ad22-dbcdf55fb973",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        4000,
        1088
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {
          "temperature": 0.3
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d74e4639-a790-4e19-8bdb-cb3460d54d3f",
      "name": "Route by Intent Level",
      "type": "n8n-nodes-base.switch",
      "position": [
        4800,
        896
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "",
                    "rightValue": ""
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.1
    },
    {
      "id": "4f1d897a-4860-4041-bc7c-09f14511d3df",
      "name": "Alert Medium Intent Lead",
      "type": "n8n-nodes-base.googleChat",
      "position": [
        5248,
        960
      ],
      "parameters": {
        "spaceId": "=",
        "messageUi": {
          "text": "={{ $json.intent_level }}"
        },
        "authentication": "oAuth2",
        "additionalFields": {}
      },
      "credentials": {
        "googleChatOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "469c2286-9348-47c6-b013-a3921c773d89",
      "name": "Create Medium Intent Task",
      "type": "n8n-nodes-base.asana",
      "position": [
        5040,
        960
      ],
      "parameters": {
        "name": "=Reddit Lead: {{ $json.intent_level }}",
        "workspace": "1212551193156936",
        "authentication": "oAuth2",
        "otherProperties": {
          "notes": "=**Source:** \n{{ $json.problem_summary }}\n**Author:** \n\n**Score:** \n{{ $json.confidence_score }}\n---\n\n**AI Analysis:**\n\n**Intent Level:** \n{{ $json.intent_level }}\n**Confidence:**{{ $json.confidence_score }} %\n\n**Problem Summary:**\n{{ $json.problem_summary }}\n"
        }
      },
      "credentials": {
        "asanaOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "697d793a-9d20-47e0-988c-eec635618d91",
      "name": "Alert Low Intent Lead",
      "type": "n8n-nodes-base.googleChat",
      "position": [
        5248,
        1152
      ],
      "parameters": {
        "spaceId": "=",
        "messageUi": {
          "text": "={{ $json.intent_level }}"
        },
        "authentication": "oAuth2",
        "additionalFields": {}
      },
      "credentials": {
        "googleChatOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8271e872-eb27-4ff8-81bb-e197f9ca0aec",
      "name": "Create Low Intent Task",
      "type": "n8n-nodes-base.asana",
      "position": [
        5040,
        1152
      ],
      "parameters": {
        "name": "=Reddit Lead: {{ $json.intent_level }}",
        "workspace": "1212551193156936",
        "authentication": "oAuth2",
        "otherProperties": {
          "notes": "=**Source:** \n{{ $json.problem_summary }}\n**Author:** \n\n**Score:** \n{{ $json.confidence_score }}\n---\n\n**AI Analysis:**\n\n**Intent Level:** \n{{ $json.intent_level }}\n**Confidence:**{{ $json.confidence_score }} %\n\n**Problem Summary:**\n{{ $json.problem_summary }}\n"
        }
      },
      "credentials": {
        "asanaOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b5beb872-03f5-42f7-9933-bf404b76f8b8",
      "name": "Workflow Error Handler",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        3072,
        1584
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "20157329-5fe5-4d9f-9f1d-cd6cc22399b3",
      "name": "Send Error Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3392,
        1584
      ],
      "parameters": {
        "message": "=\ud83d\udea8 *Reddit Workflow Error*\n\n*Error Node:* {{ $json.node.name }}\n*Error Message:* {{ $json.error.message }}\n*Timestamp:* {{ $now.toISO() }}\n\nPlease investigate immediately.",
        "options": {},
        "emailType": "text"
      },
      "typeVersion": 2.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ef226b5a-c209-4c9b-9c68-7859d6f9f85d",
  "connections": {
    "Every 2 Hours": {
      "main": [
        [
          {
            "node": "Search Reddit Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "AI Lead Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Lead Analyzer": {
      "main": [
        [
          {
            "node": "Filter Valid Opportunities",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Lead Data": {
      "main": [
        [
          {
            "node": "Route by Intent Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Lead Analyzer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Search Reddit Posts": {
      "main": [
        [
          {
            "node": "Split Search Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Search Results": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Intent Level": {
      "main": [
        [
          {
            "node": "Create High Intent Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Low Intent Task": {
      "main": [
        [
          {
            "node": "Alert Low Intent Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Error Handler": {
      "main": [
        [
          {
            "node": "Send Error Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create High Intent Task": {
      "main": [
        [
          {
            "node": "Alert High Intent Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Lead Analyzer",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Create Medium Intent Task": {
      "main": [
        [
          {
            "node": "Alert Medium Intent Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Opportunities": {
      "main": [
        [
          {
            "node": "Extract Lead Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}