🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Google Trends to LinkedIn, posts logged in Sheets

Lisa Granqvist Partner Workflow Automation Expert

Keeping LinkedIn consistent sounds simple until you’re staring at a blank draft at 10 pm, scrolling for ideas, and realizing you still have to “track it somewhere” afterward.

This is where Google Trends LinkedIn automation helps. Marketing managers feel the pressure to ship content on schedule, founders get pulled into everything else, and agency operators end up rewriting the same “trending topic” post five different ways for clients.

This workflow pulls trends, picks a strong topic, researches it, writes a LinkedIn-ready post, publishes it, and logs the details in Google Sheets so you can prove you’re showing up.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Google Trends to LinkedIn, posts logged in Sheets

The Problem: Trending content is easy to find, hard to ship

Most teams don’t struggle with ideas. They struggle with the grind between “that’s interesting” and “it’s posted.” You spot a trending search, then you open ten tabs, skim headlines, try to form an opinion, draft something that doesn’t sound like a robot, format it for LinkedIn, post it, and then… you forget to log it. Next week you’re unsure what you already covered, you accidentally repeat topics, or you can’t tell what actually performed because your tracking is messy (or nonexistent).

It adds up fast. Here’s where it breaks down.

  • Trend research turns into “just five more minutes,” and suddenly you’ve burned about an hour without publishing anything.
  • Formatting and hooks for LinkedIn take longer than writing the core idea, especially when you’re trying to keep it human.
  • If the post isn’t tracked in a spreadsheet, you lose content history and it’s hard to scale beyond one person’s memory.
  • Manual workflows create inconsistency, which usually means you post in bursts and then disappear for days.

The Solution: Turn trends into LinkedIn posts automatically (and log everything)

This n8n workflow runs on a schedule (by default, twice per day) and pulls fresh trend data from Google Trends via an HTTP request (SerpAPI). It then filters for higher-volume keywords, asks OpenAI to choose the best topic for your niche, and sends that chosen topic to Perplexity for research so the final post has real context, not vague filler. After a short delay to respect rate limits, it expands the content into post-ready items, publishes to LinkedIn, and writes a clean record to Google Sheets with timestamps and key details. Honestly, the logging step is what makes it feel “operational” instead of just “cool.”

The workflow starts with scheduled trend discovery. Then AI selects and researches one topic worth commenting on. Finally, LinkedIn gets the finished post and Google Sheets becomes your content ledger, so you can track what was posted and when.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you publish two LinkedIn posts per day. Manually, a typical cycle looks like 30 minutes to find and validate a trend, about 30 minutes to research, and 20 minutes to write and format (plus 5 minutes to log it). That’s roughly 1.5 to 2 hours per day. With this workflow: you spend maybe 10 minutes setting your niche prompts and filters, then the scheduled run drafts, posts, and logs automatically. You’ll mostly spend your time reviewing output, not assembling it.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets for post logs and timestamps
  • SerpAPI to access Google Trends data
  • OpenAI API key (get it from the OpenAI dashboard)

Skill level: Intermediate. You’ll connect a few accounts, add API keys, and tweak prompts and filters for your niche.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

Scheduled publishing runs. The workflow kicks off using a schedule trigger (commonly 6 AM and 6 PM), so posts happen even when your calendar is full.

Trend discovery and cleanup. It pulls trending queries using an HTTP request to SerpAPI, structures the response, and filters for higher-volume keywords so you’re not building content around noise.

AI selection and research. OpenAI selects the best topic for your niche, then Perplexity gathers current context you can reference in the post. A short wait is included to reduce rate-limit headaches.

Publishing plus logging. The workflow formats the content for distribution, publishes the LinkedIn update, and updates Google Sheets with a record of what went out and when.

You can easily modify the posting schedule to match your audience timing based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Scheduled Trigger

This workflow starts on a schedule so content publishing happens automatically at specific times.

  1. Add and open Scheduled Automation Trigger.
  2. Set Rule → Interval to trigger at hours 6 and 18.
  3. Connect Scheduled Automation Trigger to Fetch Google Trends.

Step 2: Connect Google Trends Data Source

This step pulls trend data from SerpAPI’s Google Trends endpoint.

  1. Open Fetch Google Trends.
  2. Set URL to https://serpapi.com/search.
  3. Enable Send Query and add query parameters: q = ai agents, geo = US, hl = en, data_type = RELATED_QUERIES, engine = google_trends, and api_key = [YOUR_SERPAPI_KEY].
  4. Set date to {{ $now.minus({ days: 3 }).format('yyyy-MM-dd') }} {{ $now.format('yyyy-MM-dd') }}.

⚠️ Common Pitfall: If [YOUR_SERPAPI_KEY] is not replaced with a valid key, Fetch Google Trends will return empty or error responses.

Step 3: Select and Filter Trending Topics

This stage extracts the top two rising queries and filters high-volume keywords for better topic selection.

  1. Open Select Top Trends and set Mode to raw.
  2. Set JSON Output to the full object:

{ "most-trending": { "#1": { "query":"{{ $json.related_queries.rising[0].query }}", "score":"{{ $json.related_queries.rising[0].extracted_value }}" }, "#2": { "query":"{{ $json.related_queries.rising[1].query }}", "score":"{{ $json.related_queries.rising[1].extracted_value }}" } } }

  1. Open Filter High Volume Keywords and confirm the JS Code filters items with extracted_value > 30 and returns result.
  2. Connect Select Top TrendsFilter High Volume KeywordsChoose Best Topic.

Tip: If your trends data often lacks related_queries.rising, lower the filter threshold or adjust the query in Fetch Google Trends.

Step 4: Set Up AI Topic Selection and Research

The workflow uses an OpenAI model to choose the best topic, then sends it to Perplexity to generate a refined LinkedIn post.

  1. Open Choose Best Topic and select the model gpt-3.5-turbo.
  2. Keep the prompt content intact, including the expressions {{ $('Select Top Trends').item.json['most-trending']['#1'].toJsonString() }} and {{ $('Select Top Trends').item.json['most-trending']['#2'].toJsonString() }}.
  3. Credential Required: Connect your openAiApi credentials in Choose Best Topic.
  4. Open Perplexity Research Call and confirm URL is https://api.perplexity.ai/chat/completions and Method is POST.
  5. Set JSON Body to the provided object and ensure the input expression {{ $json.message.content }} is preserved.
  6. Credential Required: Connect your httpHeaderAuth credentials in Perplexity Research Call.

⚠️ Common Pitfall: If Perplexity Research Call returns an error, verify your header auth token is valid and includes the correct authorization scheme.

Step 5: Configure Delay, Content Splitting, and Parallel Publishing

This stage pauses briefly, splits the generated content, and posts to X, Facebook, and LinkedIn in parallel.

  1. Open Delay Execution and set Amount to 10.
  2. Open Expand Content Items and set Field To Split Out to choices[0].message.content.
  3. Confirm the flow: Perplexity Research CallDelay ExecutionExpand Content Items.
  4. Expand Content Items outputs to Post to X Channel and Publish to Facebook API and Send LinkedIn Update in parallel.
  5. Credential Required: Connect your twitterOAuth2Api credentials in Post to X Channel.
  6. Credential Required: Connect your linkedInCommunityManagementOAuth2Api credentials in Send LinkedIn Update.
  7. In Send LinkedIn Update, set Text to {{ $json['choices[0].message.content'] }} and replace Person with your LinkedIn ID [CONFIGURE_YOUR_LINKEDIN_PERSON_ID].

⚠️ Common Pitfall: Publish to Facebook API has no credentials configured. You must add Facebook Graph API credentials before posting will work.

Step 6: Log Results to Google Sheets

This step logs each successful LinkedIn post and the topic used.

  1. Open Update Spreadsheet Log and set Operation to appendOrUpdate.
  2. Select your Document using [YOUR_GOOGLE_SHEETS_DOCUMENT_ID] and Sheet Name as gid=0 (Sheet1).
  3. Map columns to values: Topic = {{ $('Choose Best Topic').item.json.message.content }}, Status = Posted, AI Output = {{ $json['choices[0].message.content'] }}, Date Posted = {{ $('Scheduled Automation Trigger').item.json.timestamp }}.
  4. Credential Required: Connect your googleSheetsOAuth2Api credentials in Update Spreadsheet Log.
  5. Confirm the connection: Send LinkedIn UpdateUpdate Spreadsheet Log.

Step 7: Test and Activate Your Workflow

Run a full manual test to confirm scheduling, content generation, posting, and logging all complete successfully.

  1. Click Execute Workflow to run a manual test from Scheduled Automation Trigger.
  2. Verify Fetch Google Trends returns data and Select Top Trends outputs two items.
  3. Confirm Choose Best Topic and Perplexity Research Call return content, then watch Expand Content Items branch to all three posting nodes in parallel.
  4. Check that posts appear in X, Facebook, and LinkedIn, and that Update Spreadsheet Log appends or updates the row.
  5. When satisfied, toggle the workflow Active to enable scheduled publishing.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • LinkedIn credentials can expire or need specific permissions. If things break, check your LinkedIn OAuth2 community management connection in n8n first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Google Trends LinkedIn automation?

About 45 minutes if you already have your API keys and LinkedIn access approved.

Do I need coding skills to automate Google Trends LinkedIn posting?

No. You’ll mostly connect accounts and tweak prompts and filters in n8n.

Is n8n free to use for this Google Trends LinkedIn workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in API costs for SerpAPI, OpenAI, and Perplexity based on how often you post.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Google Trends LinkedIn workflow for a different niche and posting schedule?

Yes, and you should. Update the OpenAI topic selection prompt to describe your niche and your “do not post about” exclusions, then adjust the schedule trigger for your preferred times. You can also change the keyword filter in the “Filter High Volume Keywords” code step if you want stricter (or looser) trend thresholds. If you don’t want auto-posting, keep the LinkedIn node disabled and still log drafts to Google Sheets for review.

Why is my LinkedIn connection failing in this workflow?

Most of the time it’s expired OAuth credentials or missing Community Management permissions. Reconnect your LinkedIn account inside n8n, then confirm the app is approved for posting on the profile or page you selected. If it fails only sometimes, you may be hitting platform limits or sending content that triggers a validation rule (like missing required fields). Check the LinkedIn node’s execution output; it usually tells you exactly what it didn’t like.

How many posts can this Google Trends LinkedIn automation handle?

If you self-host n8n, there’s no execution cap (it mainly depends on your server and API limits). On n8n Cloud, your monthly execution limit depends on the plan, and two scheduled runs per day is usually well within starter plans for many small teams. The bigger bottlenecks are typically SerpAPI and AI rate limits, so if you scale to many accounts or many posts per run, you’ll want longer waits and stronger retry handling.

Is this Google Trends LinkedIn automation better than using Zapier or Make?

Often, yes, because this workflow uses branching logic, code-based filtering, and multiple AI steps that get awkward (and pricey) in simpler tools. n8n also gives you self-hosting, which matters if you want to run more frequently without watching task counts. Zapier or Make can still be fine for a lightweight version where you only fetch a trend and send yourself a draft. If you’re unsure, think about one question: do you need research + selection + formatting, or just a trigger and a message? Talk to an automation expert and you’ll get a straight answer for your setup.

Once this is running, you stop “finding time to post” and start reviewing what the workflow produced. That’s a better trade.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal