Back to Catalog

Generate personalized marketing emails from Google Sheets with Llama AI

Oneclick AI SquadOneclick AI Squad
1465 views
2/3/2026
Official Page

An AI-powered email marketing automation workflow that generates personalized marketing emails using data from Google Sheets and delivers them directly to clients. This workflow combines the power of AI content generation with spreadsheet-based campaign management for seamless email marketing automation.

What's the Goal?

  • Automatically pull marketing offer details from Google Sheets (Sheet 1)
  • Fetch client information from Google Sheets (Sheet 2)
  • Use AI to generate compelling, personalized marketing content
  • Format emails with professional structure and personalization
  • Send targeted marketing emails directly to clients
  • Enable scalable email marketing campaigns with minimal manual effort

By the end, you'll have a fully automated email marketing system that creates and sends personalized campaigns based on your spreadsheet data.

Why Does It Matter?

Manual email marketing is labor-intensive and lacks personalization at scale. Here's why this workflow is a game changer:

  • Zero Manual Drafting: AI generates unique content for each recipient
  • Data-Driven Personalization: Leverages spreadsheet data for targeted messaging
  • Scalable Campaigns: Handle hundreds of clients with a single workflow execution
  • Consistent Quality: AI ensures professional, engaging content every time
  • Time Efficiency: Transform hours of work into minutes of automation
  • Cost-Effective: Reduce marketing team workload while increasing output

Think of it as your intelligent marketing assistant that creates personalized campaigns at enterprise scale.

How It Works

Here's the step-by-step process behind the automation:

Step 1: Track Offer Updates

  • Node: Track Offer Sheet Updates (Sheet 1)
  • Function: Monitor Google Sheets for new marketing offers or updates
  • Trigger: Automatically activates when new data is added to Sheet 1

Step 2: Generate Marketing Content

  • Node: Generate Marketing Content with AI
  • Function: Process offer details through AI model (Llama 3.2)
  • Process: Creates compelling marketing copy based on offer parameters

Step 3: Fetch Client Information

  • Node: Fetch Client List (Sheet 2)
  • Function: Retrieve client names and email addresses from Sheet 2
  • Data: Pulls client_name and client_email for personalization

Step 4: Content Personalization

  • Node: Format Personalized Email
  • Function: Combine AI-generated content with client-specific data
  • Output: Creates personalized email for each recipient

Step 5: Email Delivery

  • Node: Send Marketing Email to Client
  • Function: Deliver personalized emails directly to client inboxes
  • Method: Uses Gmail integration for professional delivery

How to Use the Workflow

Prerequisites

  1. Google Sheets Setup: Create two sheets with the required column structure
  2. n8n Account: Access to n8n workflow platform
  3. Gmail API: Gmail account with API access configured
  4. AI Model Access: Llama 3.2 API credentials

Importing the Workflow in n8n

Step 1: Obtain the Workflow JSON

  • Download the workflow file or copy the JSON code
  • Ensure you have the complete workflow configuration

Step 2: Access n8n Workflow Editor

  • Log in to your n8n instance (Cloud or self-hosted)
  • Navigate to the Workflows section
  • Click "Add Workflow" to create a new workflow

Step 3: Import the Workflow

Option A: Import from Clipboard

  1. Click the three dots (⋯) in the top-right corner
  2. Select "Import from Clipboard"
  3. Paste the JSON code into the text box
  4. Click "Import" to load the workflow

Option B: Import from File

  1. Click the three dots (⋯) in the top-right corner
  2. Select "Import from File"
  3. Choose the .json file from your computer
  4. Click "Open" to import the workflow

Configuration Setup

Google Sheets Integration

  1. Authenticate Google Sheets: Connect your Google account in n8n
  2. Configure Sheet 1: Set spreadsheet ID and range for marketing offers
  3. Configure Sheet 2: Set spreadsheet ID and range for client information

AI Model Configuration

  1. Set API Credentials: Configure Llama 3.2 API key and endpoint
  2. Customize Prompts: Adjust AI prompts for your brand voice and style
  3. Set Content Parameters: Define content length, tone, and structure

Gmail Integration

  1. Gmail API Setup: Enable Gmail API in Google Cloud Console
  2. OAuth Configuration: Set up OAuth credentials for email sending
  3. Sender Configuration: Configure sender name and email address

Content Customization

  1. Email Templates: Customize email structure and branding
  2. Personalization Fields: Map spreadsheet columns to email variables
  3. Brand Guidelines: Set company colors, fonts, and messaging tone

Workflow Execution

Manual Execution

  1. Click "Execute Workflow" in the n8n interface
  2. Monitor execution progress through each node
  3. Review generated content and delivery status

Automated Execution

  1. Set up triggers based on sheet updates
  2. Configure scheduling for regular campaign runs
  3. Enable webhook triggers for real-time processing

Best Practices

Data Management

  • Keep spreadsheet data clean and formatted consistently
  • Regular validation of email addresses in Sheet 2
  • Update offer details promptly in Sheet 1

Content Quality

  • Review AI-generated content periodically
  • Adjust prompts based on campaign performance
  • Maintain consistent brand voice across campaigns

Deliverability

  • Monitor email bounce rates and engagement metrics
  • Maintain clean email lists with valid addresses
  • Follow email marketing best practices and regulations

Performance Optimization

  • Batch process large client lists for efficiency
  • Monitor workflow execution times
  • Implement error handling and retry mechanisms

Troubleshooting

Common Issues

  • Authentication Errors: Verify API credentials and permissions
  • Sheet Access: Ensure proper sharing permissions for Google Sheets
  • Email Delivery: Check Gmail API quotas and sending limits
  • AI Processing: Monitor API rate limits and response times

Error Handling

  • Implement retry logic for failed operations
  • Set up notification systems for workflow failures
  • Maintain backup data sources for critical campaigns

Security Considerations

  • Use environment variables for API keys and credentials
  • Implement proper access controls for sensitive data
  • Regular security audits of connected services
  • Compliance with data protection regulations (GDPR, CAN-SPAM)

Conclusion

This Smart Email Marketing Generator transforms your marketing campaigns from manual, time-consuming tasks into automated, intelligent processes. By leveraging AI and spreadsheet data, you can create personalized, engaging campaigns that scale with your business needs while maintaining professional quality and consistency.

The workflow represents a significant advancement in marketing automation, combining the accessibility of spreadsheet-based data management with the power of AI-driven content generation and automated delivery systems.

Generate Personalized Marketing Emails from Google Sheets with LLama AI

This n8n workflow automates the process of generating and sending personalized marketing emails. It leverages Google Sheets to manage customer data and uses an AI agent (powered by an Ollama Chat Model) to craft unique email content for each recipient, which is then sent via Gmail.

What it does

This workflow simplifies and automates the following steps:

  1. Triggers on Google Sheet Updates: The workflow starts whenever a new row is added or an existing row is updated in a specified Google Sheet.
  2. Reads Customer Data: It fetches the relevant customer information (e.g., name, email, product interest) from the updated Google Sheet row.
  3. Generates Personalized Email Content: An AI Agent, configured with an Ollama Chat Model, takes the customer data and generates a personalized marketing email subject and body.
  4. Sends Email via Gmail: The generated email content is then used to send a personalized email to the customer using Gmail.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Account: An active n8n instance (cloud or self-hosted).
  • Google Account: A Google account with access to Google Sheets and Gmail.
    • Google Sheets Credential: Configured in n8n to allow access to your spreadsheet.
    • Gmail Credential: Configured in n8n to allow sending emails.
  • Ollama Installation: An Ollama server running with the desired large language model (LLM) available (e.g., Llama 2, Mistral). The Ollama Chat Model node will connect to this server.
  • Google Sheet: A Google Sheet containing your customer data, including columns for recipient names, email addresses, and any other information relevant for personalization (e.g., product interests, last purchase).

Setup/Usage

  1. Import the Workflow: Download the JSON provided and import it into your n8n instance.
  2. Configure Google Sheets Trigger:
    • Select your Google Sheets credential.
    • Specify the Spreadsheet ID and Sheet Name that you want to monitor for new or updated rows.
    • Choose the Trigger When option (e.g., "Row Added or Updated").
  3. Configure AI Agent:
    • Ensure your Ollama server is running and accessible from your n8n instance.
    • In the Ollama Chat Model node, configure the Base URL for your Ollama server and the Model you wish to use (e.g., llama2, mistral).
    • In the AI Agent node, define the System Message and User Message to guide the AI in generating the email. Use expressions to dynamically insert data from the Google Sheet (e.g., {{ $json.name }}, {{ $json.product_interest }}).
    • A Sticky Note is provided to guide the prompt engineering.
  4. Configure Gmail Node:
    • Select your Gmail credential.
    • Set the To field using an expression to pull the recipient's email from the Google Sheet (e.g., {{ $json.email }}).
    • Set the Subject and Body of the email using expressions to insert the personalized content generated by the AI Agent (e.g., {{ $json.subject }}, {{ $json.body }}).
  5. Activate the Workflow: Once all credentials and nodes are configured, activate the workflow. It will now automatically generate and send personalized emails based on updates in your Google Sheet.

Related Templates

AI-powered code review with linting, red-marked corrections in Google Sheets & Slack

Advanced Code Review Automation (AI + Lint + Slack) Who’s it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting — all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0–10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your team’s channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow — reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why it’s valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n — combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your team’s review history transparent and centralized.

higashiyama By higashiyama
90

Generate Weather-Based Date Itineraries with Google Places, OpenRouter AI, and Slack

🧩 What this template does This workflow builds a 120-minute local date course around your starting point by querying Google Places for nearby spots, selecting the top candidates, fetching real-time weather data, letting an AI generate a matching emoji, and drafting a friendly itinerary summary with an LLM in both English and Japanese. It then posts the full bilingual plan with a walking route link and weather emoji to Slack. 👥 Who it’s for Makers and teams who want a plug-and-play bilingual local itinerary generator with weather awareness — no custom code required. ⚙️ How it works Trigger – Manual (or schedule/webhook). Discovery – Google Places nearby search within a configurable radius. Selection – Rank by rating and pick the top 3. Weather – Fetch current weather (via OpenWeatherMap). Emoji – Use an AI model to match the weather with an emoji 🌤️. Planning – An LLM writes the itinerary in Markdown (JP + EN). Route – Compose a Google Maps walking route URL. Share – Post the bilingual itinerary, route link, and weather emoji to Slack. 🧰 Requirements n8n (Cloud or self-hosted) Google Maps Platform (Places API) OpenWeatherMap API key Slack Bot (chat:write) LLM provider (e.g., OpenRouter or DeepL for translation) 🚀 Setup (quick) Open Set → Fields: Config and fill in coords/radius/time limit. Connect Credentials for Google, OpenWeatherMap, Slack, and your LLM. Test the workflow and confirm the bilingual plan + weather emoji appear in Slack. 🛠 Customize Adjust ranking filters (type, min rating). Modify translation settings (target language or tone). Change output layout (side-by-side vs separated). Tune emoji logic or travel mode. Add error handling, retries, or logging for production use.

nodaBy noda
52

AI-powered document search with Oracle and ONNX embeddings for recruiting

How it works Create a user for doing Hybrid Search. Clear Existing Data, if present. Add Documents into the table. Create a hybrid index. Run Semantic search on the Documents table for "prioritize teamwork and leadership experience". Run Hybrid search for the text input in the Chat interface on the Documents table. Setup Steps Download the ONNX model allMiniLML12v2augmented.zip Extract the ZIP file on the database server into a directory, for example /opt/oracle/onnx. After extraction, the folder contents should look like: bash bash-4.4$ pwd /opt/oracle/onnx bash-4.4$ ls allMiniLML12_v2.onnx Connect as SYSDBA and create the DBA user sql -- Create DBA user CREATE USER app_admin IDENTIFIED BY "StrongPassword123" DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON users; -- Grant privileges GRANT DBA TO app_admin; GRANT CREATE TABLESPACE, ALTER TABLESPACE, DROP TABLESPACE TO app_admin; Create n8n Oracle DB credentials hybridsearchuser → for hybrid search operations dbadocuser → for DBA setup (user and tablespace creation) Run the workflow Click the manual Trigger It displays Pure semantic search results. Enter search text in Chat interface It displays results for vector and keyword search. Note The workflow currently creates the hybrid search user, docuser with the password visible in plain text inside the n8n Execute SQL node. For better security, consider performing the user creation manually outside n8n. Oracle 23ai or 26ai Database has to be used. Reference Hybrid Search End-End Example

sudarshanBy sudarshan
211