AutomationFlowsAI & RAG › Send Weekly AI Summaries of Google Sheets Data via Gmail Using Openai

Send Weekly AI Summaries of Google Sheets Data via Gmail Using Openai

ByZaid @zaid on n8n.io

How it works Runs automatically on a weekly schedule (every Monday at 9am by default). Reads all rows from a Google Sheets spreadsheet containing your data. Aggregates the data and sends it to OpenAI to generate a concise summary report. Formats the report with a date-stamped…

Cron / scheduled trigger★★★★☆ complexityAI-powered11 nodesGoogle SheetsAgentOpenAI ChatGmail
AI & RAG Trigger: Cron / scheduled Nodes: 11 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #13404 — we link there as the canonical source.

This workflow follows the Agent → Gmail recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "FUiT3OJ7phVWJ4FE",
  "name": "Send weekly AI-summarized Google Sheets reports via Gmail using OpenAI",
  "tags": [],
  "nodes": [
    {
      "id": "e4b864f9-60a5-47f8-a7c0-7b9cd0f7e963",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        32,
        208
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6d5cdac8-9819-4552-a5b7-4877d5e55165",
      "name": "Read Google Sheets Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        240,
        208
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "<__PLACEHOLDER_VALUE__Sheet name e.g. Sales Data__>"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Google Sheet ID with your data__>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e37c6193-05d7-406c-8fc0-c13604c629a5",
      "name": "Aggregate Rows",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        464,
        208
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "all_rows"
      },
      "typeVersion": 1
    },
    {
      "id": "fc737428-ddbc-4ec0-aca8-419b31cc8945",
      "name": "Generate Summary with AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        688,
        208
      ],
      "parameters": {
        "text": "=Here is data from a spreadsheet. Please write a brief weekly summary report highlighting key trends, totals, and any notable changes. Format it as a clean email body with bullet points.\n\nData:\n{{ JSON.stringify($json.all_rows) }}",
        "options": {
          "systemMessage": "You are a business analyst assistant. Write concise, professional weekly summary reports. Use bullet points and keep it under 300 words. Do not include greetings or sign-offs, just the report content."
        },
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "405f5a97-32d5-4948-a0a9-3c82f551050c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        688,
        384
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "3c7a8673-c627-47cc-af66-5cdb45f0b20c",
      "name": "Format Report",
      "type": "n8n-nodes-base.set",
      "position": [
        960,
        208
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "report_body",
              "type": "string",
              "value": "={{ $json.output }}"
            },
            {
              "id": "id-2",
              "name": "report_date",
              "type": "string",
              "value": "={{ $now.format('yyyy-MM-dd') }}"
            },
            {
              "id": "id-3",
              "name": "subject_line",
              "type": "string",
              "value": "=Weekly Report - {{ $now.format('yyyy-MM-dd') }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f29d7344-f753-4cd8-b714-841fa1f269e6",
      "name": "Send Report Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1152,
        208
      ],
      "parameters": {
        "sendTo": "<__PLACEHOLDER_VALUE__Recipient email address__>",
        "message": "={{ $json.report_body }}",
        "options": {},
        "subject": "={{ $json.subject_line }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "9509f8bd-06f4-4b1e-b876-f6171e8b9a0a",
      "name": "Log Report Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1344,
        208
      ],
      "parameters": {
        "columns": {
          "value": {
            "date": "={{ $json.report_date }}",
            "sent_at": "={{ $now.toISO() }}",
            "subject": "={{ $json.subject_line }}"
          },
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Report Log"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Google Sheet ID for report log__>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "b7d1527b-6d16-422d-87a5-49ff46547b79",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        32
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 484,
        "content": "## How it works\n\nThis workflow runs automatically every Monday at 9am. It reads data from a Google Sheets spreadsheet, aggregates all the rows into a single payload, and sends it to OpenAI to generate a concise weekly summary report with key trends and highlights. The AI-generated report is formatted with a date-stamped subject line, emailed to your chosen recipient via Gmail, and logged to a separate spreadsheet so you have a record of every report sent.\n\n## Setup steps\n\n1. Adjust the Schedule Trigger if you want a different day or time\n2. Connect your Google Sheets account and set the spreadsheet ID and sheet name containing your data\n3. Connect your OpenAI credentials to the OpenAI Chat Model node\n4. Set the recipient email address in the Send Report Email node\n5. Connect your Gmail account for sending the report\n6. Create a \"Report Log\" sheet with columns: date, subject, sent_at\n7. Set the Report Log spreadsheet ID in the Log Report Sent node\n8. Activate the workflow"
      },
      "typeVersion": 1
    },
    {
      "id": "5d657543-990b-44c4-b7c7-dc015ee3af1e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 460,
        "height": 96,
        "content": "## Schedule & Read\nRuns every Monday at 9am, reads all rows from the data spreadsheet, and aggregates them."
      },
      "typeVersion": 1
    },
    {
      "id": "c04fe2b1-e2f3-4e15-93e3-f5053a3e2651",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        64
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 112,
        "content": "## Summarize, Send & Log\nAI generates a summary report, emails it via Gmail, and logs the send to a separate spreadsheet."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3d74d8e7-bfbe-4b27-8182-19f8875a534b",
  "connections": {
    "Format Report": {
      "main": [
        [
          {
            "node": "Send Report Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Rows": {
      "main": [
        [
          {
            "node": "Generate Summary with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Read Google Sheets Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Summary with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send Report Email": {
      "main": [
        [
          {
            "node": "Log Report Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Google Sheets Data": {
      "main": [
        [
          {
            "node": "Aggregate Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Summary with AI": {
      "main": [
        [
          {
            "node": "Format Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

How it works Runs automatically on a weekly schedule (every Monday at 9am by default). Reads all rows from a Google Sheets spreadsheet containing your data. Aggregates the data and sends it to OpenAI to generate a concise summary report. Formats the report with a date-stamped…

Source: https://n8n.io/workflows/13404/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform

Agent, OpenAI Chat, Airtable Tool +7
AI & RAG

Created by: Peyton Leveillee Last updated: October 2025

OpenAI Chat, Google Sheets, HTTP Request +5
AI & RAG

The Multi-Model Agency Content Engine is a high-performance editorial system designed for agencies. It solves the "blank page" problem by alternating between real-world social proof and strategic expe

Google Sheets, Gmail, Google Drive +6
AI & RAG

This workflow automates the creation, rendering, approval, and posting of TikTok-style POV (Point of View) videos to Instagram, with cross-posting to Facebook and YouTube. It eliminates manual video p

OpenAI Chat, Output Parser Item List, HTTP Request +10
AI & RAG

SEO Blog Article Generation Workflow. Uses outputParserStructured, httpRequest, agent, lmChatOpenAi. Scheduled trigger; 56 nodes.

Output Parser Structured, HTTP Request, Agent +4