AutomationFlowsAI & RAG › Generate Social Media Hashtags From Twitter & Youtube Trends with Mistral AI

Generate Social Media Hashtags From Twitter & Youtube Trends with Mistral AI

ByResilNext @rnair1996 on n8n.io

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Cron / scheduled trigger★★★★☆ complexityAI-powered15 nodesN8N Nodes Crawl And ScrapeGoogle SheetsOutput Parser StructuredLm Chat Mistral CloudAgent
AI & RAG Trigger: Cron / scheduled Nodes: 15 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Agent → Google Sheets 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
{
  "nodes": [
    {
      "id": "ca4cb366-5e3c-4bb1-a219-11f0a3684089",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        760,
        200
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "45cf94ce-c524-45c6-96cd-7a95ba14ca1c",
      "name": "daily trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -380,
        220
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "49ca40cd-2af0-4023-9398-fcc5f5c44bdc",
      "name": "extract twitter trends",
      "type": "n8n-nodes-crawl-and-scrape.crawleeNode",
      "position": [
        120,
        120
      ],
      "parameters": {
        "url": "https://trends24.in/",
        "operation": "extractHtml"
      },
      "typeVersion": 1
    },
    {
      "id": "aaf1d402-6524-4c2e-ba77-cf4c778c6de4",
      "name": "extract YouTube trends",
      "type": "n8n-nodes-crawl-and-scrape.crawleeNode",
      "position": [
        120,
        340
      ],
      "parameters": {
        "url": "https://youtube.trends24.in/",
        "operation": "extractHtml"
      },
      "typeVersion": 1
    },
    {
      "id": "f01f50bf-f46b-485c-9ec7-9abf263a37db",
      "name": "Google Sheets2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1700,
        220
      ],
      "parameters": {
        "columns": {
          "value": {
            "hastag ": "={{ $json.output.hashtag }}"
          },
          "schema": [
            {
              "id": "hastag ",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "hastag ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "hastag "
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1A9EHzMz88dlmBZm1ooQasWb4sU3OTv2tuMtuu1yBAyw/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1A9EHzMz88dlmBZm1ooQasWb4sU3OTv2tuMtuu1yBAyw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1A9EHzMz88dlmBZm1ooQasWb4sU3OTv2tuMtuu1yBAyw/edit?usp=drivesdk",
          "cachedResultName": "Hastag"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "da2fddc5-46b7-4049-ad42-b5d401bbda48",
      "name": "Loop Over Items2",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1480,
        200
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "ff8fc176-6006-43f4-bdbc-4968e2d93c11",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1280,
        420
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\n\t\"hashtag\": [\"\", \"\", \"\"]\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "d434e4a8-fb22-41d9-a208-0eacf97d1177",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 360,
        "height": 600,
        "content": "extract twitter and youtube trends from https://trends24.in/  by   using crawl and scrape community node scrape the websites "
      },
      "typeVersion": 1
    },
    {
      "id": "b70c5ae9-2a99-401a-a9d5-9e54008aa593",
      "name": "Mistral Cloud Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        1080,
        420
      ],
      "parameters": {
        "model": "mistral-small-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "da6240e4-6d9e-45cf-bf16-05ec1717aa52",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        0
      ],
      "parameters": {
        "width": 480,
        "height": 580,
        "content": "filters hashtags out of scraper output"
      },
      "typeVersion": 1
    },
    {
      "id": "68a52f28-77e6-4b5f-8864-f6880f29f9f6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        0
      ],
      "parameters": {
        "width": 540,
        "height": 560,
        "content": "generate hashtag related to topic we gave based on current trends "
      },
      "typeVersion": 1
    },
    {
      "id": "99f60b2d-eef3-41d4-af91-85dc4639ad99",
      "name": "filter twitter trends",
      "type": "n8n-nodes-base.html",
      "position": [
        420,
        120
      ],
      "parameters": {
        "options": {
          "cleanUpText": true
        },
        "operation": "extractHtmlContent",
        "dataPropertyName": "data.html",
        "extractionValues": {
          "values": [
            {
              "key": "trends",
              "cssSelector": ".trend-card__list li a",
              "returnArray": true,
              "returnValue": "html"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2b598d9a-89bb-4a1f-b63b-e328d88a411e",
      "name": "filter YouTube trends",
      "type": "n8n-nodes-base.html",
      "position": [
        420,
        340
      ],
      "parameters": {
        "options": {
          "cleanUpText": true
        },
        "operation": "extractHtmlContent",
        "dataPropertyName": "data.html",
        "extractionValues": {
          "values": [
            {
              "key": "trends",
              "cssSelector": ".keywords-list li",
              "returnArray": true,
              "returnValue": "html"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "af274fcf-7358-4f24-a3df-c9ea6f694268",
      "name": "get only top 100 trends",
      "type": "n8n-nodes-base.code",
      "position": [
        600,
        120
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  item.json.trends = item.json.trends.slice(0, 100);\n  return item;\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "cb29b201-b2be-462b-88d0-4fbd6a94feb3",
      "name": "hashtag generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1100,
        200
      ],
      "parameters": {
        "text": "={{ $('Merge').item.json.trends }},{{ $('Merge').item.json.trends }}",
        "options": {
          "systemMessage": "=You are a professional hashtag trend strategist.\n\nYour task is to take the following list of trending hashtags and keywords and generate ONE new hashtag that is either:\n\n1. A variation of an existing hashtag,\n2. A mashup of two related trends,\n3. Or a smart, brand-safe hashtag inspired by the same themes, communities, or languages used in the list.\n4. if  no related trends make one of your own\nKeep the hashtag short, all lowercase, no spaces, and catchy. Do not use special characters beyond the #. Avoid copying any exact hashtag from the list.\n\nhastag should be related to this:\n{{ $json.keywords }}\n\nTrending List:\ngive as user query\n\nReturn only a single new hashtag in this format:\n{\n  \"new_hashtag\": \"#exampletag\"\n}\n\n\n\n\n\n\n\n\n\n\n\n\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "hashtag generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "daily trigger": {
      "main": [
        [
          {
            "node": "extract twitter trends",
            "type": "main",
            "index": 0
          },
          {
            "node": "extract YouTube trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets2": {
      "main": [
        [
          {
            "node": "Loop Over Items2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items2": {
      "main": [
        [],
        [
          {
            "node": "Google Sheets2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "hashtag generator": {
      "main": [
        [
          {
            "node": "Loop Over Items2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "filter YouTube trends": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "filter twitter trends": {
      "main": [
        [
          {
            "node": "get only top 100 trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract YouTube trends": {
      "main": [
        [
          {
            "node": "filter YouTube trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract twitter trends": {
      "main": [
        [
          {
            "node": "filter twitter trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get only top 100 trends": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "hashtag generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "hashtag generator",
            "type": "ai_outputParser",
            "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 contains community nodes that are only compatible with the self-hosted version of n8n.

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

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

This advanced workflow automates the entire job search and preparation process, moving beyond simple notifications to provide AI-driven career intelligence.

Lm Chat Mistral Cloud, Gmail, Output Parser Structured +4
AI & RAG

If you teach on Udemy at any meaningful scale, you already know the problem: 80% of student messages are variations of the same handful of questions, but every one of them needs a thoughtful reply to

N8N Nodes Globals, HTTP Request, Google Sheets +8
AI & RAG

⚠️ DISCLAIMER: This workflow uses the AnySite LinkedIn community node, which is only available on self-hosted n8n instances. It will not work on n8n.cloud.

OpenAI Chat, Output Parser Structured, Google Sheets +6
AI & RAG

This n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform

Agent, OpenAI Chat, Airtable Tool +7
AI & RAG

This workflow is designed for: Content creators and marketers E-commerce and product-based businesses Agencies producing social media visuals and videos Automation builders looking for AI-powered crea

HTTP Request, Edit Image, Google Drive +7