Automate Keyword Research with n8n and NocoDB

Save hours in keyword research by automating YouTube and Google keyword extraction, filtering, and monthly volume analysis using n8n, NocoDB, and DataForSEO API. This workflow streamlines gathering, processing, and updating keyword data to boost SEO efficiency.
nocoDb
httpRequest
code
+7
Learn how to Build this Workflow with AI:
Workflow Identifier: 1331
NODES in Use: Manual Trigger, Schedule Trigger, Code, Sticky Note, NocoDB, HTTP Request, Split Out, Filter, If, Split In Batches

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

1. Opening Problem Statement

Meet Jake, an SEO specialist struggling to keep up with the constant demand for fresh, relevant keywords to optimize his clients’ content. Every day, Jake spends upwards of 4 hours manually extracting keyword ideas from Google and YouTube, checking search volumes, and updating databases. This manual process is not only time-consuming but prone to errors — leading to missed keyword opportunities and unreliable reporting that frustrates his clients.

Jake knows automation is the answer but has faced hurdles integrating multiple APIs and managing complex data flows without spending weeks coding. This is where the “Find Top Keywords” n8n workflow steps in, offering a fully automated, no-code solution for keyword research that saves hours daily and delivers consistent, accurate results.

2. What This Automation Does ⚙️

This specialized n8n workflow orchestrates a powerful automation pipeline that:

  • Triggers automatically every 4 hours or manually on demand to keep data current.
  • Fetches base keywords from NocoDB, a no-code database platform, as the foundational keyword list.
  • Uses a local Social Flood API to generate second-tier autocomplete keywords for both Google and YouTube based on the base keywords.
  • Consolidates and filters hundreds of keywords removing duplicates and irrelevant entries based on length and word count.
  • Fetches monthly search volume and CPC data from the DataForSEO API for both Google Ads and YouTube Ads keywords.
  • Validates keyword existence in NocoDB tables, then adds or updates second-tier keyword data along with detailed monthly search volumes in the database.
  • Batches large datasets to efficiently handle limits on API and database operations without failures.

Benefits quantified: Automates up to 1000 keywords per batch, running multiple times per day, potentially saving Jake 20+ hours weekly and eliminating error-prone manual lookups.

3. Prerequisites ⚙️

  • 📁 NocoDB with configured tables for base keywords, second-tier Google keywords, second-tier YouTube keywords, and monthly search volume data.
  • 🔐 n8n account for automation orchestration, self-hosting optional.
  • 🔑 DataForSEO API for fetching search volume and CPC metrics (Google Ads & YouTube Ads data endpoints).
  • 🔐 Social Flood local Docker instance running autocomplete keyword API for Google and YouTube keyword expansions.
  • 📧 Access to the n8n credentials management to set up NocoDB API Tokens and API Keys.

4. Step-by-Step Guide to Build This Keyword Research Automation

Step 1: Set Up Time Generator Node for Date Range

Navigate to your n8n editor, drag in a Code node named “Gen Time”. Paste the following JavaScript code that calculates yesterday’s date in yyyy-mm-dd format:

// Get today's date
const today = new Date();

// Subtract one day to get the previous day
const yesterday = new Date(today);
yesterday.setDate(today.getDate() - 1);

// Format the date as yyyy-mm-dd
const year = yesterday.getFullYear();
const month = String(yesterday.getMonth() + 1).padStart(2, '0');
const day = String(yesterday.getDate()).padStart(2, '0');

const formattedDate = `${year}-${month}-${day}`;

// Set the formatted date to be used in a later node
return [{ json: { previousDay: formattedDate } }];

Upon execution, you should see the formatted date output as “previousDay” in JSON, confirming your date variable setup, which is essential for date-bound API queries.

Step 2: Retrieve Base Keywords from NocoDB

Add a NocoDB node connected from “Gen Time”. Configure it to use your NocoDB API Token credential and specify the base keywords table (in this example “mztryza8davdl48” with the “keyword” field selected). This pulls all base keywords that serve as seeds for keyword expansions.

Confirm the node returns an array of keywords.

Common mistake: Forgetting to set your API token or wrong project/table ID results in empty or failed responses.

Step 3: Generate Second-Tier Google and YouTube Autocomplete Keywords

For both Google and YouTube autocomplete, add two HTTP Request nodes named “Second Order Google Autocomplete Keywords” and “Second Order YouTube Autocomplete Keywords” respectively.

  • Use the Social Flood local instance URL to fetch autocomplete results. For Google, pass base keywords as `input_keyword` query parameter.
  • For YouTube, add an additional parameter `ds=yt` to target YouTube-specific suggestions.
  • Authorize each node with your Social Flood API Key.

Test these nodes to ensure keyword expansions appear in the response.

Step 4: Combine and Filter Generated Keywords Using Code Nodes

Add two Code nodes named “Combine G Keywords and Filter” and “Combine YT Keywords and Filter” connected from their respective autocomplete HTTP request nodes.

Use the internal JavaScript logic to flatten, clean, de-duplicate, and batch keywords (max 1000 per batch). The code filters out keywords longer than 80 characters or having more than 10 words.

Ensure outputs produce clean, batched keyword strings ready for volume queries.

Step 5: Query Google and YouTube Search Volume

Connect the filtered keyword batches to the following HTTP Request nodes:

  • Google Search Volume: Queries the DataForSEO API with keywords (Google Ads data).
  • YouTube Search Volume: Queries DataForSEO API with search partners enabled set to true to get YouTube-related volume data.

Use your DataForSEO Basic Auth credentials here. This step returns detailed metrics including monthly search volumes, CPC, competition, bids.

Step 6: Process and Filter Keywords by Monthly Traffic and CPC

Run the results through Filter nodes named “Google Filter” and “YT Filter” to ensure keywords have valid monthly searches and CPC data.

Batched results are split into batches with Split Out nodes for manageable data processing.

Step 7: Check Existing Keywords in NocoDB and Add or Update Accordingly

For each batch, the workflow sends requests to NocoDB API endpoints

  • “Check for Google Keyword” and “Check for YT Keyword” verify if keywords exist.
  • If not found, new keyword data is added to second-tier tables using NocoDB nodes “Add Second Tier G Keyword Data” and “Add Second Tier YT Keyword Data”.
  • If existing, update the records using “Update Second Tier G Keyword Data” and “Update Second Tier YT Keyword Data” nodes.

This step guarantees keyword lists in NocoDB stay current without duplicates.

Step 8: Format and Bulk Import Monthly Search Volume Data

Use Code nodes “Format G Data” and “Format YT Data” to reformat detailed monthly search volumes for bulk import.

Finally, bulk import the data in batches to a dedicated NocoDB table via HTTP Request nodes “Bulk Import G Monthly Search Volume” and “Bulk Import YT Monthly Search Volume”.

Review responses to confirm successful batch insertion.

5. Customizations ✏️

  • Adjust Frequency: Change the cron expression in the “Schedule Trigger” node to alter how often keywords update (e.g., every hour or daily).
  • Expand Keyword Sources: Connect additional APIs or databases to pull more diverse base keywords and merge them in the “NocoDB” node.
  • Filter by CPC Threshold: Modify the “Google Filter” and “YT Filter” nodes to exclude keywords with CPC below a configurable threshold to focus on profitable keywords.
  • Switch DataForSEO Credentials: If your API plan changes or you need regional data, update authentication info in the HTTP Request nodes querying DataForSEO accordingly.
  • Enhance Error Handling: Add error workflow branches to catch API rate limits or data failures, sending Slack or email alerts for manual intervention.

6. Troubleshooting 🔧

Problem: “NocoDB API returns empty list or error”
Cause: Invalid API token or incorrect project/table ID.
Solution: In n8n, verify your NocoDB credentials under Credentials tab. Confirm project and table IDs match your database.

Problem: “Autocomplete API returns no keywords”
Cause: Social Flood Docker instance down or incorrect API key.
Solution: Restart your Social Flood Docker container, confirm the API endpoint URL and API key set in HTTP Request nodes.

Problem: “DataForSEO API rate limits exceeded”
Cause: Excessive calls or insufficient API plan.
Solution: Reduce batch size in “Combine” code nodes or upgrade your DataForSEO subscription.

7. Pre-Production Checklist ✅

  • Confirm all API credentials (NocoDB, DataForSEO, Social Flood) are active and authorized in n8n.
  • Run manual trigger once to validate the whole workflow’s success end-to-end.
  • Check NocoDB tables for new keyword entries and monthly volumes after run completion.
  • Review logs for any HTTP request failures or unexpected errors.
  • Backup NocoDB tables before initial bulk imports.

8. Deployment Guide

Activate this workflow in n8n by enabling the “Schedule Trigger” node to run every 4 hours, ensuring fresh keywords and volumes. Monitor execution logs periodically, especially for API rate limit warnings or failures. Use n8n’s built-in retry mechanism for robust operation.

9. Conclusion

By following this guide, you transformed a tedious manual keyword research task into a smooth automated pipeline with n8n, NocoDB, and DataForSEO. Jake now saves over 20 hours a week and delivers up-to-date keyword insights that improve his SEO strategies significantly.

Next, consider automating SEO content briefs based on top keywords or integrating additional platforms like Bing Ads or Amazon keyword extraction to further diversify your keyword arsenal.

With this automation in place, you’re empowered to harness data-driven SEO effortlessly. Keep iterating and scaling your keyword research workflows!

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free