AutomationFlowsMarketing & Ads › Automated Social Media Lead Processing with AI Summaries, Slack Alerts & Jira Ticketing

Automated Social Media Lead Processing with AI Summaries, Slack Alerts & Jira Ticketing

Automated Social Media Lead Processing with AI Summaries, Slack Alerts & Jira Ticketing. Uses slack, jira, stickyNote, scheduleTrigger. Webhook trigger; 18 nodes.

Webhook trigger★★★★☆ complexityAI-powered18 nodesSlackJiraGoogle SheetsOpen Ai
Marketing & Ads Trigger: Webhook Nodes: 18 Complexity: ★★★★☆ AI nodes: yes

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": "4Crun3FuXGo24zWQ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Social Media Lead Processing with AI Summaries, Slack Alerts & Jira Ticketing",
  "tags": [],
  "nodes": [
    {
      "id": "581d4b37-0c13-4f8b-b959-c78cf7f3bb39",
      "name": "Send a Summary",
      "type": "n8n-nodes-base.slack",
      "position": [
        2432,
        192
      ],
      "parameters": {
        "text": "=\ud83d\udce9 *New Marketing Lead (Social Media)*\n\n\ud83d\udc64 {{ $('Data Formatting').item.json.username }}\n\ud83d\udcac {{ $('Data Formatting').item.json.summary }}\n\ud83d\udd52 {{ $('Data Formatting').item.json.receivedAt }}\n",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09S57E2JQ2",
          "cachedResultName": "n8n"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "d918957a-c5d0-4be2-a613-ef4f52b3b870",
      "name": "Get DM",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1232,
        192
      ],
      "parameters": {
        "path": "marketing-lead",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "716de499-2e70-48f2-a941-6c8dca5d3941",
      "name": "Create Task",
      "type": "n8n-nodes-base.jira",
      "position": [
        2240,
        192
      ],
      "parameters": {
        "project": {
          "__rl": true,
          "mode": "list",
          "value": "10000",
          "cachedResultName": "n8n sample project"
        },
        "summary": "=New lead from: {{ $json.username }}",
        "issueType": {
          "__rl": true,
          "mode": "list",
          "value": "10004",
          "cachedResultName": "Story"
        },
        "additionalFields": {
          "description": "=AI Summary: {{$json.summary}}  \nReceived At:{{ $json.timestamp }} \nCategory:{{ $json.category }}"
        }
      },
      "credentials": {
        "jiraSoftwareCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "30a7f5b9-263f-4dda-bfef-3d0c7c46da80",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        -192
      ],
      "parameters": {
        "width": 432,
        "height": 688,
        "content": "## How It Works:\n\nThis workflow collects messages coming from social media or your website and checks if they are related to things like ads, promotions, collaborations, or partnership requests. If the message matches these topics, the workflow sends it to OpenAI to understand the lead better and create a clean summary. The information is then saved in Google Sheets for record-keeping.\nAt the same time, a task is automatically created in Jira so your team can follow up, and a notification is sent to Slack to alert your team instantly.\nThere is also a daily and weekly schedule that reviews all collected leads and prepares summary reports to keep your team updated.\n\n## Setup Steps:\n\n**1.** Connect all accounts: Webhook (your form or social media bot), OpenAI, Google Sheets, Jira, and Slack.\n**2.** Update your Webhook to ensure messages are sent correctly into this workflow.\n**3.** Edit the keywords list if you want to track more types of messages.\n**4.** Add your OpenAI API key and keep the model version updated.\n**5.** Connect your Google Sheet and check that the column names match the workflow fields.\n**6.** Set up your Jira project and map the required fields (summary, description, assignee).\n**7.** Choose your Slack channel for notifications.\n**8.** Activate the scheduler for daily and weekly reports."
      },
      "typeVersion": 1
    },
    {
      "id": "8da14fa6-95e3-4f78-a969-88d9cb7f58df",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        80
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "This node listens for new social media messages and starts the workflow whenever a new DM arrives."
      },
      "typeVersion": 1
    },
    {
      "id": "fd00bd44-ef3d-46c9-a3d4-7ef1cb1b5546",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2176,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 256,
        "content": "This node automatically creates a follow-up task in Jira for your team using the cleaned message and summary.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ad8f08d4-d820-4177-8e73-2e47e5a2cfdd",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2416,
        80
      ],
      "parameters": {
        "color": 7,
        "height": 256,
        "content": "This node sends a simple lead notification to Slack so your team instantly knows a new lead has arrived."
      },
      "typeVersion": 1
    },
    {
      "id": "209db459-3f58-4ce2-aead-8a3216478746",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        64
      ],
      "parameters": {
        "color": 7,
        "width": 784,
        "height": 288,
        "content": "## Lead Cleaning and Saving Process\nThese steps check the message for important keywords, use AI to understand what the lead wants, pull out the useful details, and then save everything into your Google Sheet."
      },
      "typeVersion": 1
    },
    {
      "id": "53f17fe4-ba1d-4507-957d-8fcd906a5da5",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1168,
        752
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6802f214-4d2e-499d-8e79-0d29887e9a85",
      "name": "Store Lead",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2048,
        192
      ],
      "parameters": {
        "columns": {
          "value": {
            "source": "={{ $json.source }}",
            "category": "={{ $json.category }}",
            "username": "={{ $json.username }}",
            "recievdAt": "{{ new Date().toISOString() }}"
          },
          "schema": [
            {
              "id": "username",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "username",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "source",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "source",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "summary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "recievdAt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "recievdAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "timestamp",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14Arf4sTeFXzyKlpDzdibzqYGP2hvmQY6wtjlI1-ruZs/edit#gid=0",
          "cachedResultName": "DM Lead Lg"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "14Arf4sTeFXzyKlpDzdibzqYGP2hvmQY6wtjlI1-ruZs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14Arf4sTeFXzyKlpDzdibzqYGP2hvmQY6wtjlI1-ruZs/edit?usp=drivesdk",
          "cachedResultName": "Untitled spreadsheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c86a093c-828a-41dc-95e8-52a19bc8fd54",
      "name": "AI Lead Classifier",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1552,
        192
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "GPT-4.1"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "content": "=Return a JSON object with two fields:\n\n1. summary \u2013 a one-sentence summary of the marketing inquiry.\n2. category \u2013 one of the following: Sales, Support, Partnership, Influencer Inquiry, General Lead.\n\nMessage:\n{{ $('Lead Keyword Filter').item.json.message }}\n\nRespond ONLY in JSON format like this:\n{\n  \"summary\": \"...\",\n  \"category\": \"...\"\n}\n"
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e08aa7fd-e5c1-492c-9797-d32d0701d100",
      "name": "AI Output Parser",
      "type": "n8n-nodes-base.code",
      "position": [
        1856,
        192
      ],
      "parameters": {
        "jsCode": "// Output array\nconst results = [];\n\nfor (let i = 0; i < items.length; i++) {\n  \n  // Parse AI JSON from current item\n  const ai = JSON.parse(items[i].json.output[0].content[0].text);\n\n  // Build merged result\n  results.push({\n    username: $item(i).$node[\"Lead Keyword Filter\"].json.username,\n    source: $item(i).$node[\"Lead Keyword Filter\"].json.source,\n    summary: ai.summary,\n    category: ai.category,\n    timestamp: new Date().toISOString()\n  });\n}\n\nreturn results;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "d23e3222-c73a-471f-89bc-2b14a385cf96",
      "name": "Report Data Formatter",
      "type": "n8n-nodes-base.code",
      "position": [
        1824,
        752
      ],
      "parameters": {
        "jsCode": "const leads = items.map(i => i.json);\n\nreturn [\n  {\n    json: {\n      totalLeads: leads.length,\n      bySource: leads.reduce((acc, lead) => {\n        acc[lead.source] = (acc[lead.source] || 0) + 1;\n        return acc;\n      }, {}),\n      byCategory: leads.reduce((acc, lead) => {\n        acc[lead.category] = (acc[lead.category] || 0) + 1;\n        return acc;\n      }, {}),\n      exampleLeads: leads.slice(0, 5) // first 5 example leads\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "a4b95746-dc15-4ce9-8831-02d5a3dbed05",
      "name": "Lead Keyword Filter",
      "type": "n8n-nodes-base.code",
      "position": [
        1408,
        192
      ],
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n// Get the full array of incoming data from the webhook body\nconst input = $input.first().json.body;\n\n// Ensure input is an array\nif (!Array.isArray(input)) {\n  return [];\n}\n\n// Keywords to match\nconst keywords = [\n  \"social media\",\n  \"send info\",\n  \"ad request\",\n  \"promo request\",\n  \"collaboration\",\n  \"partnership\",\n  \"work together\"\n];\n\n// Filter leads that mention ANY keyword\nconst filteredLeads = input.filter(item => {\n  if (!item.message) return false;\n\n  const msg = item.message.toLowerCase();\n  return keywords.some(keyword => msg.includes(keyword.toLowerCase()));\n});\n\n// Map the filtered leads to clean objects\nconst leads = filteredLeads.map(item => ({\n  json: {\n    username: item.username || null,\n    source: item.source || \"unknown\",\n    message: item.message || \"\",\n    receivedAt: new Date().toISOString(),\n  },\n}));\n\n// Return the filtered and cleaned leads\nreturn leads;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "449ba0f4-2741-4a03-9faf-324c65ad9998",
      "name": "Extrect Lead Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1392,
        752
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14Arf4sTeFXzyKlpDzdibzqYGP2hvmQY6wtjlI1-ruZs/edit#gid=0",
          "cachedResultName": "DM Lead Lg"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "14Arf4sTeFXzyKlpDzdibzqYGP2hvmQY6wtjlI1-ruZs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14Arf4sTeFXzyKlpDzdibzqYGP2hvmQY6wtjlI1-ruZs/edit?usp=drivesdk",
          "cachedResultName": "Untitled spreadsheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "4e21fb0c-59c2-4495-a9b9-942beeec9c7b",
      "name": "Weekly lead Filter",
      "type": "n8n-nodes-base.code",
      "position": [
        1600,
        752
      ],
      "parameters": {
        "jsCode": "const itemsOut = [];\nconst now = new Date();\n\n// normalize today's date to midnight\nconst todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate());\nconst todayEnd = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);\n\nfor (const item of items) {\n  const lead = item.json;\n\n  // Try both timestamp fields\n  const leadDate = new Date(lead.timestamp || lead.recievdAt);\n\n  // If lead date is today\n  if (leadDate >= todayStart && leadDate < todayEnd) {\n    itemsOut.push(item);\n  }\n}\n\nreturn itemsOut;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "365d9eee-f1d8-451b-ac32-adf4a6440447",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        544
      ],
      "parameters": {
        "color": 7,
        "width": 1200,
        "height": 368,
        "content": "**Schedule Trigger:** Triggers the weekly reporting workflow on a schedule.\n\n**Extrect Lead Data:** Fetches all logged leads from the Google Sheet for reporting.\n\n**Weekly lead Filter:** Filters the sheet data to include  leads from a Week.\n\n**Report Data Formatter:** Calculates total leads, category counts, source counts, and sample data.\n\n**Weekly Report Slack:** Sends the weekly report to Slack.\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "07bc5dc1-1656-4d55-a9b4-bd19b0b923d4",
      "name": "Weekly Report Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2032,
        752
      ],
      "parameters": {
        "text": "=\ud83d\udcca Weekly Lead Report\n\n\ud83d\udcc5 Period: Last 7 Days\n\nTotal Leads: {{ $json.totalLeads }}\n\nBy Source:\n{{JSON.stringify($json.bySource)}}\n\nBy Category:\n{{JSON.stringify($json.byCategory)}}\n\n",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09S57E2JQ2",
          "cachedResultName": "n8n"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "71249f9c-cdf3-4617-ae3b-f569ae69fea1",
  "connections": {
    "Get DM": {
      "main": [
        [
          {
            "node": "Lead Keyword Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Lead": {
      "main": [
        [
          {
            "node": "Create Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Task": {
      "main": [
        [
          {
            "node": "Send a Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Output Parser": {
      "main": [
        [
          {
            "node": "Store Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Extrect Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extrect Lead Data": {
      "main": [
        [
          {
            "node": "Weekly lead Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Lead Classifier": {
      "main": [
        [
          {
            "node": "AI Output Parser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly lead Filter": {
      "main": [
        [
          {
            "node": "Report Data Formatter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lead Keyword Filter": {
      "main": [
        [
          {
            "node": "AI Lead Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Report Data Formatter": {
      "main": [
        [
          {
            "node": "Weekly Report Slack",
            "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.

About this workflow

Automated Social Media Lead Processing with AI Summaries, Slack Alerts & Jira Ticketing. Uses slack, jira, stickyNote, scheduleTrigger. Webhook trigger; 18 nodes.

Source: https://github.com/weblineindia/n8n-Process-social-media-leads-with-GPT-4.1-summaries-Google-Sheets-Jira-Slack/blob/main/main.json — original creator credit. Request a take-down →

More Marketing & Ads workflows → · Browse all categories →