AutomationFlowsAI & RAG › Automate Multi-website Google Analytics Reports with Gpt Processing to Email…

Automate Multi-website Google Analytics Reports with Gpt Processing to Email…

Original n8n title: Automate Multi-website Google Analytics Reports with Gpt Processing to Email & Slack

ByGuillaume @gay on n8n.io

This n8n workflow automates the daily generation of comprehensive analytics reports from multiple websites, processes them using OpenAI's powerful language models, and then delivers the insights directly to your email and Slack channels.

Cron / scheduled trigger★★★★★ complexityAI-powered38 nodesMemory Buffer WindowGoogle AnalyticsAgentOpenAI ChatGmailMicrosoft OutlookEmail SendSlack
AI & RAG Trigger: Cron / scheduled Nodes: 38 Complexity: ★★★★★ AI nodes: yes Added:

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

This workflow follows the Agent → Emailsend 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": "Gjlthwyp8SBhVNYB",
  "name": "Daily Multi-Website Analytics Reports with OpenAI Processing to Email and Slack",
  "tags": [],
  "nodes": [
    {
      "id": "a6456f4d-1a1a-4405-9a75-6508ecf5fad6",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -400,
        2000
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "099121e2-800f-4247-9b27-dadf057c0866",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        784,
        1904
      ],
      "parameters": {
        "numberInputs": 8
      },
      "typeVersion": 3.2
    },
    {
      "id": "49041111-b6b1-469d-a001-43f4c7164894",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1184,
        2528
      ],
      "parameters": {
        "sessionKey": "={{ $('Schedule Trigger').item.json.timestamp }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 20
      },
      "typeVersion": 1.3
    },
    {
      "id": "fa4b812c-5819-4e48-b08e-de5f62b7fd28",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1296,
        2000
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "d46c53e9-699f-4270-8975-f9c657a86375",
      "name": "yoursite.com",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        176,
        1376
      ],
      "parameters": {
        "dateRange": "yesterday",
        "metricsGA4": {
          "metricValues": [
            {},
            {
              "listName": "screenPageViews"
            },
            {
              "listName": "eventCount"
            },
            {
              "listName": "userEngagementDuration"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "list",
          "value": "448284312",
          "cachedResultUrl": "https://analytics.google.com/analytics/web/#/p448284312/",
          "cachedResultName": "Gecko Design"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "1ec7b8f3-31c7-454e-a12d-8b39d2306183",
      "name": "yoursite.com 2",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        176,
        1552
      ],
      "parameters": {
        "dateRange": "yesterday",
        "metricsGA4": {
          "metricValues": [
            {},
            {
              "listName": "screenPageViews"
            },
            {
              "listName": "eventCount"
            },
            {
              "listName": "userEngagementDuration"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "list",
          "value": "493257429",
          "cachedResultUrl": "https://analytics.google.com/analytics/web/#/p493257429/",
          "cachedResultName": "Isochrones"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "175bf9c5-1f66-4150-a831-e40cba02cb43",
      "name": "yoursite.com 3",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        176,
        1728
      ],
      "parameters": {
        "dateRange": "yesterday",
        "metricsGA4": {
          "metricValues": [
            {},
            {
              "listName": "screenPageViews"
            },
            {
              "listName": "eventCount"
            },
            {
              "listName": "userEngagementDuration"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "list",
          "value": "493243386",
          "cachedResultUrl": "https://analytics.google.com/analytics/web/#/p493243386/",
          "cachedResultName": "Aspolt"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "759436af-82ed-4d46-a95f-e724a8aadfd5",
      "name": "yoursite.com 4",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        176,
        1904
      ],
      "parameters": {
        "dateRange": "yesterday",
        "metricsGA4": {
          "metricValues": [
            {},
            {
              "listName": "screenPageViews"
            },
            {
              "listName": "eventCount"
            },
            {
              "listName": "userEngagementDuration"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "list",
          "value": "493361117",
          "cachedResultUrl": "https://analytics.google.com/analytics/web/#/p493361117/",
          "cachedResultName": "Acura"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "fc586a45-cd95-44e7-bb34-352905395eb8",
      "name": "yoursite.com 5",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        176,
        2080
      ],
      "parameters": {
        "dateRange": "yesterday",
        "metricsGA4": {
          "metricValues": [
            {},
            {
              "listName": "screenPageViews"
            },
            {
              "listName": "eventCount"
            },
            {
              "listName": "userEngagementDuration"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "list",
          "value": "493361119",
          "cachedResultUrl": "https://analytics.google.com/analytics/web/#/p493361119/",
          "cachedResultName": "Wise investor"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c27d01a5-f032-4ef6-a0ba-f59c92b4689f",
      "name": "yoursite.com 6",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        176,
        2256
      ],
      "parameters": {
        "dateRange": "yesterday",
        "metricsGA4": {
          "metricValues": [
            {},
            {
              "listName": "screenPageViews"
            },
            {
              "listName": "eventCount"
            },
            {
              "listName": "userEngagementDuration"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "list",
          "value": "493384134",
          "cachedResultUrl": "https://analytics.google.com/analytics/web/#/p493384134/",
          "cachedResultName": "Tuto bricolage"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "fc079ee5-c993-451a-87a8-bd39092f1c48",
      "name": "yoursite.com 7",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        176,
        2432
      ],
      "parameters": {
        "dateRange": "yesterday",
        "metricsGA4": {
          "metricValues": [
            {},
            {
              "listName": "screenPageViews"
            },
            {
              "listName": "eventCount"
            },
            {
              "listName": "userEngagementDuration"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "list",
          "value": "493373629",
          "cachedResultUrl": "https://analytics.google.com/analytics/web/#/p493373629/",
          "cachedResultName": "Scancoin"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d5186b82-b7d5-401e-868c-3453c79a437d",
      "name": "yoursite.com 8",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        176,
        2608
      ],
      "parameters": {
        "dateRange": "yesterday",
        "metricsGA4": {
          "metricValues": [
            {},
            {
              "listName": "screenPageViews"
            },
            {
              "listName": "eventCount"
            },
            {
              "listName": "userEngagementDuration"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "list",
          "value": "493372218",
          "cachedResultUrl": "https://analytics.google.com/analytics/web/#/p493372218/",
          "cachedResultName": "Seo addict"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e59d7690-9d59-42a3-8541-35a074fd0f14",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        1264
      ],
      "parameters": {
        "color": 5,
        "width": 348,
        "height": 684,
        "content": "### \ud83d\udfe1 ALTERNATIVES (send report)"
      },
      "typeVersion": 1
    },
    {
      "id": "fb80cb9c-3e0a-4f7e-bba8-b6c7eca48f2b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        1264
      ],
      "parameters": {
        "color": 7,
        "width": 384,
        "height": 1552,
        "content": "# Daily trigger\n\n- Daily trigger to be set according to your preferences."
      },
      "typeVersion": 1
    },
    {
      "id": "225804a7-2415-43e2-b763-31748fc32c59",
      "name": "Report maker agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1248,
        2240
      ],
      "parameters": {
        "text": "=# ROLE :\nYou are a data analyst who helps entrepreneurs create data tables.\n\n# TASK :\nI want you to create an HTML table summarizing and assembling all data from Google Analytics nodes.\n\nHTML table structure:\n\nHTML\n\n<table>\n  <thead>\n    <tr>\n      <th>SITE</th>\n      <th>DATE</th>\n      <th>TOTAL USER</th>\n      <th>SCREEN PAGE VIEWS</th>\n      <th>EVENT COUNT</th>\n      <th>USER ENGAGEMENT DURATION</th>\n    </tr>\n  </thead>\n  <tbody>\n<tr>\n      <td>yoursite.com</td>\n      <td>{{ $('yoursite.com').item.json.date }}</td>\n      <td>{{ $('yoursite.com').item.json.totalUsers }}</td>\n      <td>{{ $('yoursite.com').item.json.screenPageViews }}</td>\n      <td>{{ $('yoursite.com').item.json.eventCount }}</td>\n      <td>{{ $('yoursite.com').item.json.userEngagementDuration }}</td>\n    </tr>\n<tr>\n      <td>yoursite.com2</td>\n      <td>{{ $('yoursite.com 2').item.json.date }}</td>\n      <td>{{ $('yoursite.com 2').item.json.totalUsers }}</td>\n      <td>{{ $('yoursite.com 2').item.json.screenPageViews }}</td>\n      <td>{{ $('yoursite.com 2').item.json.eventCount }}</td>\n      <td>{{ $('yoursite.com 2').item.json.userEngagementDuration }}</td>\n    </tr>\n<tr>\n      <td>yoursite.com3</td>\n      <td>{{ $('yoursite.com 3').item.json.date }}</td>\n      <td>{{ $('yoursite.com 3').item.json.totalUsers }}</td>\n      <td>{{ $('yoursite.com 3').item.json.screenPageViews }}</td>\n      <td>{{ $('yoursite.com 3').item.json.eventCount }}</td>\n      <td>{{ $('yoursite.com 3').item.json.userEngagementDuration }}</td>\n    </tr>\n<tr>\n      <td>yoursite.com4</td>\n      <td>{{ $('yoursite.com 4').item.json.date }}</td>\n      <td>{{ $('yoursite.com 4').item.json.totalUsers }}</td>\n      <td>{{ $('yoursite.com 4').item.json.screenPageViews }}</td>\n      <td>{{ $('yoursite.com 4').item.json.eventCount }}</td>\n      <td>{{ $('yoursite.com 4').item.json.userEngagementDuration }}</td>\n    </tr>\n<tr>\n      <td>yoursite.com5</td>\n      <td>{{ $('yoursite.com 5').item.json.date }}</td>\n      <td>{{ $('yoursite.com 5').item.json.totalUsers }}</td>\n      <td>{{ $('yoursite.com 5').item.json.screenPageViews }}</td>\n      <td>{{ $('yoursite.com 5').item.json.eventCount }}</td>\n      <td>{{ $('yoursite.com 5').item.json.userEngagementDuration }}</td>\n    </tr>\n<tr>\n      <td>yoursite.com6</td>\n      <td>{{ $('yoursite.com 6').item.json.date }}</td>\n      <td>{{ $('yoursite.com 6').item.json.totalUsers }}</td>\n      <td>{{ $('yoursite.com 6').item.json.screenPageViews }}</td>\n      <td>{{ $('yoursite.com 6').item.json.eventCount }}</td>\n      <td>{{ $('yoursite.com 6').item.json.userEngagementDuration }}</td>\n    </tr>\n<tr>\n      <td>yoursite.com7</td>\n      <td>{{ $('yoursite.com 7').item.json.date }}</td>\n      <td>{{ $('yoursite.com 7').item.json.totalUsers }}</td>\n      <td>{{ $('yoursite.com 7').item.json.screenPageViews }}</td>\n      <td>{{ $('yoursite.com 7').item.json.eventCount }}</td>\n      <td>{{ $('yoursite.com 7').item.json.userEngagementDuration }}</td>\n    </tr>\n<tr>\n      <td>yoursite.com8</td>\n      <td>{{ $('yoursite.com 8').item.json.date }}</td>\n      <td>{{ $('yoursite.com 8').item.json.totalUsers }}</td>\n      <td>{{ $('yoursite.com 8').item.json.screenPageViews }}</td>\n      <td>{{ $('yoursite.com 8').item.json.eventCount }}</td>\n      <td>{{ $('yoursite.com 8').item.json.userEngagementDuration }}</td>\n    </tr>\n  </tbody>\n</table>\n\n# OUTPUT :\nStructure the output as follows:\n\nTitle: Google Analytics Daily report of {{ $now }}.\n\nThe HTML table.\n\n# CONSTRAINTS :\nDo not make any comments before or after, only the output instructions.",
        "options": {},
        "promptType": "=define"
      },
      "typeVersion": 2
    },
    {
      "id": "e7db9fc7-9558-46b0-8a2f-c81fc8c03911",
      "name": "GPT 4.1 nano",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1440,
        2528
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-nano",
          "cachedResultName": "gpt-4.1-nano"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e859a909-66e0-4884-aa98-e16d946987e6",
      "name": "Send report by email (Gmail)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2592,
        1552
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "={{ $json.output }}",
        "options": {},
        "subject": "\ud83d\udcca Google Analytics Daily Report"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "d8cc8683-8321-4a12-9f1c-1ee57cdc3623",
      "name": "Send report by email (outlook)",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        2592,
        1760
      ],
      "parameters": {
        "subject": "\ud83d\udcca Google Analytics Daily Report",
        "bodyContent": "={{ $json.output }}",
        "toRecipients": "user@example.com",
        "additionalFields": {}
      },
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "06d81309-9243-4041-93be-022dbaaadeca",
      "name": "Send report by email (SMTP)",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1808,
        1808
      ],
      "parameters": {
        "html": "={{ $json.output }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "\ud83d\udcca Google Analytics Daily Report",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "f879525d-2a20-4b66-b93a-f7b73ab61893",
      "name": "Send notification process complete on Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1824,
        2128
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C07AZPNSDTR",
          "cachedResultName": "g\u00e9n\u00e9ral"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "c62fadb2-e36e-48ce-8257-73833663b6bd",
      "name": "Send notification process complete on Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2592,
        1360
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "ghs",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fdb1b330-ebef-460e-be4f-7138f5490662",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        1264
      ],
      "parameters": {
        "color": 5,
        "width": 348,
        "height": 684,
        "content": "### \ud83d\udfe1 ALTERNATIVES (notifications if error)"
      },
      "typeVersion": 1
    },
    {
      "id": "4a27e505-f46f-4707-a7cd-bd384116a2a1",
      "name": "Send email for ERROR in credentials (SMTP)",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1040,
        1424
      ],
      "parameters": {
        "html": "={{ $json.output }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "\ud83d\udd34 Check your Google Analytics Credentials",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "80461d5f-57e6-4598-9395-5f71e566c4df",
      "name": "Send email for ERROR in credentials (Outlook)",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        2208,
        1760
      ],
      "parameters": {
        "subject": "\ud83d\udcca Google Analytics Daily Report",
        "bodyContent": "={{ $json.output }}",
        "toRecipients": "user@example.com",
        "additionalFields": {}
      },
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "06584e3f-140b-44bc-81a2-c5b5bb77d0b4",
      "name": "Send email for ERROR in credentials (Gmail)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2208,
        1552
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "={{ $json.output }}",
        "options": {},
        "subject": "\ud83d\udcca Google Analytics Daily Report"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "b9ea4358-d630-4b02-a440-15cfcb5cae84",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        1264
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 1552,
        "content": "# Google Analytics \"get report\" nodes"
      },
      "typeVersion": 1
    },
    {
      "id": "8a50072e-1da9-49f6-b1c8-0b7bdfd4c062",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        1264
      ],
      "parameters": {
        "color": 7,
        "width": 1072,
        "height": 464,
        "content": "# Notifications if error"
      },
      "typeVersion": 1
    },
    {
      "id": "484a45a1-9da9-4932-bed0-54ef8c33405e",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        1760
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 1056,
        "content": "# Merge report data"
      },
      "typeVersion": 1
    },
    {
      "id": "ade1a5f2-b15f-4ade-a598-08bf1de177f2",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        1760
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 1056,
        "content": "# Report creation"
      },
      "typeVersion": 1
    },
    {
      "id": "4b11a67e-853b-4ae1-84aa-c64f3691d1a4",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        1264
      ],
      "parameters": {
        "color": 7,
        "width": 352,
        "height": 1552,
        "content": "# Send report"
      },
      "typeVersion": 1
    },
    {
      "id": "ae6f4327-a62e-4448-8796-0f484666465d",
      "name": "Send Telegram notification for ERROR in credentials",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2208,
        1360
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "ghs",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0e5aa3b9-26d0-45d1-af49-242414ea7462",
      "name": "Send Slack notification for ERROR in credentials",
      "type": "n8n-nodes-base.slack",
      "position": [
        1344,
        1424
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C07AZPNSDTR",
          "cachedResultName": "g\u00e9n\u00e9ral"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "216d6ef6-17e0-4c48-9051-1121d5b97053",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        1184
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "height": 1472,
        "content": "\n## \ud83d\udfe1 SETUP\n\nSetup:\nBefore importing and running this workflow, ensure you have the following prerequisites in place:\n\n\n### \u25ba Google Analytics API Setup:\n\n- Go to the Google Cloud Console (https://console.cloud.google.com/).\n\n- Create a new project or select an existing one.\n\n- Navigate to \"APIs & Services\" > \"Enabled APIs & services.\"\n\n- Search for and enable the \"Google Analytics Data API\" (for GA4) or \"Google Analytics Reporting API\" (for Universal Analytics, if still in use).\n\n- Go to \"APIs & Services\" > \"Credentials.\"\n\n- Create \"OAuth client ID\" credentials for a \"Web application.\"\n\n- Copy your client ID and client secret.\n\n- In n8n, add a new Google Analytics credential using the \"OAuth2\" authentication method. \n- Provide the Client ID and Client Secret. You will need to authorize n8n to access your Google Analytics data. \n- Scopes\t        https://www.googleapis.com/auth/analytics.readonly (read-only) or https://www.googleapis.com/auth/analytics (manage)\n- OAuth Redirect URL\tAlready pre-filled by n8n (copy this when creating the Google client)\n\n- Click Sign in with Google, choose the GA account, and approve the requested scopes.\n\n- Click Save \u2013 n8n tests the token and stores it encrypted.\n\n- For each yourwebsite.com node, select these credentials and specify the correct Google Analytics View ID (for Universal Analytics) or Property ID (for GA4).\n\n\n### \u25ba Email Credentials (SMTP):\n\n- In n8n, add a new SMTP credential.\n\n- Provide your SMTP host, port, username, and password. This will be used to send the aggregated reports.\n\n### \u25ba Slack Credentials:\n\n- In n8n, add a new Slack credential.\n\n- Follow the instructions to create a Slack App and generate a Bot User OAuth Token. This token will allow n8n to post messages to your Slack channels.\n\n\n### \u25ba OpenAI Credentials:\n\nSign up for an OpenAI account (https://platform.openai.com/).\n\nGenerate an API Key from your account dashboard.\n\nIn n8n, add a new OpenAI credential and paste your API Key.\n\n\n### \u25ba Website Configuration:\n\nThe workflow currently includes nodes for yourwebsite.com (1 to 8).\n\n- For each \"Get Report\" node (e.g., yourwebsite.com, yourwebsite.com 2, etc.), duplicate or remove them as needed to match the number of Google Analytics properties you wish to monitor.\n- Replace the names and number of websites inside the **report maker agent**.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "05828721-b295-43cb-b5ed-9e716a4b8812",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2032,
        1184
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "content": "# \u26a0\ufe0f INSTRUCTIONS"
      },
      "typeVersion": 1
    },
    {
      "id": "4f1f2ac6-9707-4187-b382-6ead0e1c8e99",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2032,
        1376
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "height": 624,
        "content": "## \ud83d\udfe1 DESCRIPTION\n\nThis n8n workflow automates the daily generation of comprehensive analytics reports from multiple websites, processes them using OpenAI's powerful language models, and then delivers the insights directly to your email and Slack channels.\n\nDesigned for digital marketers, website administrators, and data analysts, this template streamlines the tedious process of manually collecting and interpreting website performance data, offering immediate, actionable intelligence.\n\nThe core problem this workflow solves is the fragmentation and manual effort involved in monitoring numerous website analytics. Instead of logging into multiple Google Analytics accounts or properties daily, this workflow centralizes data extraction, enriches it with AI-powered summaries, and distributes it to your preferred communication platforms.\n\nThis significantly reduces the time spent on routine reporting, allowing you to focus on strategy and decision-making.\n\nUsers who would benefit most from this template include:\n\n- Digital Marketing Agencies: Efficiently generate and share client reports across multiple properties.\n\n- E-commerce Businesses: Monitor performance of various product sites or regional domains.\n\n- Content Creators: Track the success of different blogs or content platforms.\n\n- Anyone managing a portfolio of websites: Gain a unified view of their digital assets' performance."
      },
      "typeVersion": 1
    },
    {
      "id": "cd918f3b-c100-403b-87d9-7f3a694ebd4b",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        2688
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "height": 208,
        "content": "## \ud83d\udfe1 Usage\n\nOnce you have configured the credentials, you can customize the workflow to fit your specific needs, including leveraging various alternative nodes for sending notifications and reports. This flexibility allows you to integrate seamlessly with your preferred communication tools such as Gmail, Telegram, Outlook, or any other service supported by n8n's extensive node library."
      },
      "typeVersion": 1
    },
    {
      "id": "023a77de-1acd-454a-a679-a565de813812",
      "name": "Check if error",
      "type": "n8n-nodes-base.if",
      "position": [
        736,
        1504
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "bea57f3c-3dd3-4033-b570-39c9703731cd",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.totalUsers }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c8ea2fbe-e548-459a-b58f-5f7c8d7216f9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        992
      ],
      "parameters": {
        "color": 5,
        "width": 1712,
        "height": 112,
        "content": "# \ud83d\udcca DAILY MULTI-WEBSITE ANALYTICS REPORTS WITH OPEN AI PROCESSING TO EMAIL AND SLACK"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "449222b9-bbb8-42f5-96cd-f58e8dfa540f",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Report maker agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT 4.1 nano": {
      "ai_languageModel": [
        [
          {
            "node": "Report maker agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "yoursite.com": {
      "main": [
        [
          {
            "node": "Check if error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Report maker agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Check if error": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send email for ERROR in credentials (SMTP)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "yoursite.com 2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "yoursite.com 3": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "yoursite.com 4": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "yoursite.com 5": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "yoursite.com 6": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 5
          }
        ]
      ]
    },
    "yoursite.com 7": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 6
          }
        ]
      ]
    },
    "yoursite.com 8": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 7
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "yoursite.com",
            "type": "main",
            "index": 0
          },
          {
            "node": "yoursite.com 2",
            "type": "main",
            "index": 0
          },
          {
            "node": "yoursite.com 3",
            "type": "main",
            "index": 0
          },
          {
            "node": "yoursite.com 4",
            "type": "main",
            "index": 0
          },
          {
            "node": "yoursite.com 5",
            "type": "main",
            "index": 0
          },
          {
            "node": "yoursite.com 6",
            "type": "main",
            "index": 0
          },
          {
            "node": "yoursite.com 7",
            "type": "main",
            "index": 0
          },
          {
            "node": "yoursite.com 8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Report maker agent": {
      "main": [
        [
          {
            "node": "Send report by email (SMTP)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send report by email (SMTP)": {
      "main": [
        [
          {
            "node": "Send notification process complete on Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send email for ERROR in credentials (SMTP)": {
      "main": [
        [
          {
            "node": "Send Slack notification for ERROR in credentials",
            "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

This n8n workflow automates the daily generation of comprehensive analytics reports from multiple websites, processes them using OpenAI's powerful language models, and then delivers the insights directly to your email and Slack channels.

Source: https://n8n.io/workflows/6258/ — 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 workflow was born out of a very real problem.

Output Parser Structured, OpenAI Chat, Memory Buffer Window +11
AI & RAG

Online Marketing Weekly Report. Uses scheduleTrigger, lmChatOpenAi, toolWorkflow, executeWorkflowTrigger. Scheduled trigger; 51 nodes.

OpenAI Chat, Tool Workflow, Execute Workflow Trigger +8
AI & RAG

This workflow retrieves Online Marketing data (Google Analytics for several domains, Google Ads, Meta Ads) from the last 7 days and the same period in the previous year. The data is then prepared by A

OpenAI Chat, Tool Workflow, Execute Workflow Trigger +8
AI & RAG

This n8n-powered workflow automates the entire lifecycle of real estate lead intake, qualification, routing, assignment, and reporting across multiple channels. It brings WhatsApp inquiries and websit

Gmail, Typeform Trigger, WhatsApp Trigger +8
AI & RAG

This workflow automates end-to-end sustainability lifecycle management for corporate sustainability teams, ESG governance officers, and circular economy programme leads. It addresses the challenge of

Form Trigger, Agent, OpenAI Chat +11