Automate SEO optimization of Google Sheet meta titles and descriptions using an n8n workflow powered by Google Gemini AI. Maintain keyword density and character limits automatically.
Download this n8n workflow template and start using it instantly.
SEO Specialists and Content Managers managing large content inventories in spreadsheets.
Users looking for advanced n8n templates integrating AI for structured data processing.
Anyone needing reliable, automated enforcement of SEO character limits on scale.
Developers building robust n8n workflow solutions involving Google services and LLMs.
This powerful n8n workflow addresses the challenge of manually auditing and correcting meta titles (limited to 60 characters) and meta descriptions (160 characters) stored across vast Google Sheets. By leveraging the intelligence of the Google Gemini large language model, this n8n automation template ensures compliance with current SEO best practices automatically.
The n8n workflow operates on a recurring schedule defined by its n8n trigger, systematically retrieving, processing, and updating data. The integration uses custom logic via a Code n8n node to reliably parse the AI’s JSON output, guaranteeing that the pipeline is resilient and accurate when updating high-value content with optimized SEO tags.
Google Sheets n8n node (get-current-tags) fetches all rows from the specified spreadsheet, focusing on columns like metatitle, metadescription, and a unique rowindex.Loop Over Items n8n node splits the retrieved data into single items or small batches, allowing the AI to process each record individually and efficiently.If n8n node filters items, ensuring only necessary rows proceed. The selected item then goes to the Langchain Agent (update-tags), which connects to the Google Gemini Chat Model. The prompt strictly instructs the AI to shorten the meta title (max 60 chars) and meta description (max 160 chars) while preserving core keywords and returning the result in a highly specific JSON format.Code n8n node (turn-into-table) designed to sanitize and robustly clean the raw text response, removing code fences and parsing the structure into clean JSON objects, ready for aggregation.Code n8n node (format-code) prepares the now AI-processed and cleaned data structure. Finally, the Google Sheets n8n node (save-output) executes an Update operation. It matches the original rows using the unique rowindex and writes the newly optimized metatitleFixed and metadescriptionFixed values back into the spreadsheet, completing the automated n8n workflow.get-current-tags and save-output n8n nodes with your Google Sheets OAuth2 credentials. Ensure you link to the correct Spreadsheet Document ID and the specific Sheet Name (Gid) containing your content data.Google Gemini Chat Model n8n node using a valid Google AI API key.rowindex, metatitle, and metadescription. The save-output n8n node is configured to write results to metatitleFixed and meta_descriptionFixed.update-tags n8n node to verify character limits and instructions match your SEO needs.Schedule Trigger n8n trigger and activate the n8n workflow. Schedule Trigger (n8n trigger): Starts the n8n workflow automatically at defined intervals.
Google Sheets (get-current-tags): Reads the source data (titles, descriptions, and indices) from Google Sheets, providing the input for the n8n workflow loop.
Loop Over Items (n8n node): Handles item separation, iterating through each row from the spreadsheet to ensure individual processing by the AI.
Google Gemini Chat Model (n8n node): The core AI service. It is used by the Langchain agent to perform the text optimization, configured for reliable, deterministic output (temperature 0.4).
Langchain Agent (update-tags): Contains the extensive prompt that instructs Gemini to adhere to strict SEO rules (60/160 character limits) and forces the output into a predictable JSON structure, crucial for the rest of the n8n workflow.
Code (turn-into-table & format-code): These crucial custom n8n nodes handle complex data manipulation. They implement robust sanitization logic to strip control characters, clean up code fences, and parse potentially messy AI output into a guaranteed flat, table-ready JSON format for saving.
rowindex and persisting the newly generated metatitleFixed and meta_descriptionFixed values.Automate job application document creation. This n8n workflow uses Gemini AI to optimize resumes for ATS and generate custom cover letters, delivering the final PDFs via Gmail automation.

Automate Amazon Ads optimization using this n8n workflow. Analyze daily reports (search terms, budgets, and bids) with GPT-4o and receive actionable email recommendations instantly. This n8n template simplifies PPC management.

Use this powerful n8n workflow to automate Printify product title and description generation using OpenAI, manage options in Google Sheets, and publish updated content.

Automate the transformation of technical documentation (PDFs, manuals) into optimized, structured IdeaBlocks using this powerful n8n workflow and the Blockify API for enhanced RAG performance.

Use this comprehensive n8n workflow to optimize unstructured text data via the Blockify Ingest API. Transform documents into structured IdeaBlocks for enhanced RAG accuracy. Get started with n8n templates today.









































