Google Trends to LinkedIn, posts logged in Sheets
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
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/x.dark.svg' width='40' height='40' /></div><br/>X1"]
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/facebook.svg' width='40' height='40' /></div><br/>Facebook Graph API1"]
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/linkedin.svg' width='40' height='40' /></div><br/>LinkedIn1"]
n3@{ icon: "mdi:database", form: "rounded", label: "Google Sheets2", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out", pos: "b", h: 48 }
n5@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Research Topic- Perplexity"]
n7@{ icon: "mdi:swap-vertical", form: "rounded", label: "2 Most Trending", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>High search volume keywords"]
n9@{ icon: "mdi:robot", form: "rounded", label: "Choosing Topic", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Google Trends"]
n11@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n11 --> n4
n2 --> n3
n4 --> n0
n4 --> n1
n4 --> n2
n10 --> n7
n9 --> n6
n7 --> n8
n5 --> n10
n6 --> n11
n8 --> n9
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n5 trigger
class n9 ai
class n3 database
class n1,n6,n10 api
class n8 code
classDef customIcon fill:none,stroke:none
class n0,n1,n2,n6,n8,n10 customIcon
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
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
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.
- Add and open Scheduled Automation Trigger.
- Set Rule → Interval to trigger at hours
6and18. - 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.
- Open Fetch Google Trends.
- Set URL to
https://serpapi.com/search. - 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]. - Set date to
{{ $now.minus({ days: 3 }).format('yyyy-MM-dd') }} {{ $now.format('yyyy-MM-dd') }}.
[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.
- Open Select Top Trends and set Mode to
raw. - 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 }}"
}
}
}
- Open Filter High Volume Keywords and confirm the JS Code filters items with
extracted_value > 30and returnsresult. - Connect Select Top Trends → Filter High Volume Keywords → Choose Best Topic.
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.
- Open Choose Best Topic and select the model
gpt-3.5-turbo. - 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() }}. - Credential Required: Connect your openAiApi credentials in Choose Best Topic.
- Open Perplexity Research Call and confirm URL is
https://api.perplexity.ai/chat/completionsand Method isPOST. - Set JSON Body to the provided object and ensure the input expression
{{ $json.message.content }}is preserved. - Credential Required: Connect your httpHeaderAuth credentials in Perplexity Research Call.
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.
- Open Delay Execution and set Amount to
10. - Open Expand Content Items and set Field To Split Out to
choices[0].message.content. - Confirm the flow: Perplexity Research Call → Delay Execution → Expand Content Items.
- Expand Content Items outputs to Post to X Channel and Publish to Facebook API and Send LinkedIn Update in parallel.
- Credential Required: Connect your twitterOAuth2Api credentials in Post to X Channel.
- Credential Required: Connect your linkedInCommunityManagementOAuth2Api credentials in Send LinkedIn Update.
- In Send LinkedIn Update, set Text to
{{ $json['choices[0].message.content'] }}and replace Person with your LinkedIn ID[CONFIGURE_YOUR_LINKEDIN_PERSON_ID].
Step 6: Log Results to Google Sheets
This step logs each successful LinkedIn post and the topic used.
- Open Update Spreadsheet Log and set Operation to
appendOrUpdate. - Select your Document using
[YOUR_GOOGLE_SHEETS_DOCUMENT_ID]and Sheet Name asgid=0(Sheet1). - 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 }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Update Spreadsheet Log.
- Confirm the connection: Send LinkedIn Update → Update 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.
- Click Execute Workflow to run a manual test from Scheduled Automation Trigger.
- Verify Fetch Google Trends returns data and Select Top Trends outputs two items.
- Confirm Choose Best Topic and Perplexity Research Call return content, then watch Expand Content Items branch to all three posting nodes in parallel.
- Check that posts appear in X, Facebook, and LinkedIn, and that Update Spreadsheet Log appends or updates the row.
- When satisfied, toggle the workflow Active to enable scheduled publishing.
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
About 45 minutes if you already have your API keys and LinkedIn access approved.
No. You’ll mostly connect accounts and tweak prompts and filters in n8n.
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.
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.
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.
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.
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.
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.