Quick overview
This workflow turns a niche description into timely content ideas by planning Google Trends seed keywords with Google Gemini, fetching rising searches via Apify’s Google Trends actor, and delivering ranked ideas in an n8n results page or weekly summary, with optional Google Sheets, Slack, or Telegram outputs.
How it works
- Starts from an n8n Form (one free-form question, or a CSV with one row per niche), a Monday schedule that reads niches from Google Sheets, or a manual test run.
- Google Gemini reads each request and plans about 8 Google Trends search terms. It keeps the person's topics when people really search them, rewrites vague ones, drops off-niche ones and adds more.
- The Apify Google Trends node fetches rising related searches and topics for those terms. Niches with the same country and time range share calls.
- A Code node removes bot and prompt-like junk, merges variants and ranks by growth. On weekly runs it skips ideas sent in the last 8 weeks.
- Gemini scores each rising search for relevance and writes full ideas: title, hook, angle, format, the likely reason it's rising and a fact-check list.
- If an AI step fails, the run keeps going: planning falls back to the person's own words, and ideas fall back to a list of rising searches, each with a note saying why.
- Form runs get a results page. Scheduled runs get one Google Sheets row per idea plus a Slack or Telegram summary.
Setup
- Install the Apify node if n8n asks. It's a verified community node; on n8n Cloud the instance owner may need to allow verified community nodes first.
- In the Google Trends node, create an Apify credential. On n8n Cloud, sign in with Apify. On self-hosted n8n, set Authentication to API Key and paste your Apify token.
- In the Gemini model node, create a Google Gemini credential with a free key from Google AI Studio. The same node is used for planning and for writing ideas.
- Click ▶ on Run it now, then open Weekly summary to read the ideas.
- For the form, publish the workflow and share the Form node's Production URL.
- Optional, for the weekly run: pick your spreadsheet in Read keyword sheet (tab Keywords) and Add to Google Sheet (tab Ideas), turn Add to Google Sheet on, and connect Slack or Telegram.
Requirements
- n8n with the verified Apify community node (tested on n8n 2.44)
- An Apify account
- A Google Gemini API key (the free tier works), or any chat model supported by n8n
- Optional: Google Sheets, Slack or Telegram credentials
Customization
- Change ideas per niche, minimum relevance, search terms per niche, default country and time range in the Defaults node
- Use OpenAI, Anthropic or Ollama by replacing the Gemini model node (it feeds both AI steps)
- Edit the instructions in Prepare AI request for video scripts, newsletter sections or product ideas
- Replace Google Sheets with Notion or Airtable: every idea is one flat row with fixed columns
- Add another input, such as a webhook, with one small adapter that outputs the same rows into Defaults
Additional info
Step-by-step guide, troubleshooting and a CSV template for bulk runs: https://github.com/lakshay-jainn/n8n-niche-trend-content-planner. Tested on n8n 2.44.6 (self-hosted) with live data. No credentials or pinned data are included. Google Trends growth is relative: +3,600% means fast growth, not big volume.