Generate Social Media Hashtags from Twitter & YouTube Trends with Mistral AI

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

Description
This workflow automatically collects daily trending topics from Twitter and YouTube, filters them for relevance, and uses an AI model (such as Mistral Cloud or another OpenAI-compatible API) to generate engaging social media hashtags. The final results, including source platform and date, are saved into a connected Google Sheet for easy access, tracking, or team collaboration.

Ideal for content creators, marketers, and social media managers, this automation eliminates the manual effort of trend research and hashtag writing by combining real-time scraping with LLM-powered generation. The result is a scalable, daily strategy tool to stay aligned with what’s trending across major platforms.

How It Works

Daily Trigger
Starts the workflow automatically on a daily schedule.

Trend Scraping
Scrapes current trending content from Twitter and YouTube using the Crawl and Scrape community node.

Filtering & Slicing
Removes irrelevant or duplicate entries and limits each platform’s list to top-performing trends.

Merge Trends
Combines Twitter and YouTube trends into a single dataset.

AI Hashtag Generation
Sends each trend topic to an AI model to generate relevant hashtags.

Output to Google Sheets
Loops through AI results and writes them to a Google Sheet, including trend, platform, hashtags, and timestamp.

Setup Instructions
Estimated time: 10–15 minutes

Prerequisites
A self-hosted instance of n8n (required for community nodes)
API key for Mistral Cloud or any OpenAI-compatible LLM
Google Sheets account connected via OAuth2 credentials
Twitter and YouTube trend URLs (or scraping logic for target regions)

Template Image:

Example: Crawl and Scrape Node for Twitter Trends You can use the following configuration in the Crawl and Scrape node to extract Twitter trends from Trends24)

{ "parameters": { "url": "https://trends24.in/", "selectors": [ { "label": "Twitter Trends", "selector": ".trend-card__list li a", "type": "text" } ] }, "name": "Scrape Twitter Trends", "type": "n8n-nodes-crawl-and-scrape.crawlAndScrape", "typeVersion": 1, "position": [300, 200] }

Google Sheet Column Format
Column A: Generated Hashtags

0
Downloads
0
Views
8.94
Quality Score
intermediate
Complexity
Author:Rajeet Nair(View Original →)
Created:8/13/2025
Updated:8/25/2025

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments