[模板] GA4 报告
中级
这是一个Miscellaneous, AI Summarization, Multimodal AI领域的自动化工作流,包含 13 个节点。主要使用 Code, Gmail, FormTrigger, HttpRequest, Agent 等节点。 使用AI洞察和Gmail创建和发送自动化GA4 KPI报告
前置要求
- •Google 账号和 Gmail API 凭证
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "JuXOZQggRREMehEs",
"meta": {
"instanceId": "ec3694b688f9802e6ff1f61802ca6bc63a40ecfa76d32f2c71cfdf2978426fce",
"templateCredsSetupCompleted": true
},
"name": "[模板] GA4 报告",
"tags": [],
"nodes": [
{
"id": "65978710-1149-45f7-9904-ebad886098ca",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
32,
192
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "CDLerpKjR5nOKRIT",
"name": "OpenAi account main"
}
},
"typeVersion": 1.2
},
{
"id": "c4eb2b73-0dc8-4da0-a9ab-3d59e84a291a",
"name": "计算器",
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"position": [
192,
192
],
"parameters": {},
"typeVersion": 1
},
{
"id": "025324ca-92fe-4faf-96e0-71f81c25bcfe",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
32,
-32
],
"parameters": {
"text": "=Form Submits Last Period - {{ JSON.stringify($('Form Submits This Period').first().json) }}\nForm Submits Previous Period - {{ JSON.stringify($('Form Submits Previous Period').first().json) }}\nMetrics Last Period - {{ JSON.stringify($('Overall Metrics This Period').first().json) }}\nMetrics Previous Period - {{ JSON.stringify($('Overall Metrics Previous Period').first().json) }}\n\n{{ $now }}\n\nUse the following instructions to generate a GA4‐based HTML monthly report for VertoDigital. Fill in every placeholder, apply the date ranges and percent‐change logic, and follow the Section guidelines below. Output only the final HTML—no code fences, no extra commentary.\n\nData Inputs (replace the {} tokens with real values):\n\nDate ranges:\n\nLast Period {date_range_0} - {{ $('Code').first().json['Report from start date'] }} to {{ $('Code').first().json['Report to this end date'] }}\nPrevious Period {date_range_1}- {{ $('Code').first().json['Previous start date'] }} to {{ $('Code').first().json['Previous end date'] }}\nMetrics:\n\nForm Submits Last Period – {form_submits_0}\n\nForm Submits Previous Period – {form_submits_1}\n\nMetrics Last Period – {metrics_0}\n\nMetrics Previous Period – {metrics_1}\n\nPercent-Change Rules:\n\nFor each metric (Sessions, Active Users, New Users, Page Views, etc.):\n\nCalculate % change = (last – previous) / previous × 100\n\nIf last > previous, prefix “+” and use color #10B981 (positive-change); if last < previous, prefix “–” and use color #EF4444 (negative-change).\n\nONLY FOR bounceRate is the following --> last > previous, prefix “+” and use color #EF4444 (negative-change)#10B981 (positive-change); if last < previous, prefix “–” and use color #10B981 (positive-change).\n\nAlways use the Think tool, to make sure all needed variables and the whole html is properly setup.\n\nFOR THE <!-- Summary Section --> {negative-change or positive-change COLORING ONLY NUMBERS/PERCENTAGES based on comparison, DO NOT COLOR ANY TEXT (IT SHOULD BE IN NORMAL TEXT COLOR)}\n\nFor every summary or recommendation you write, you need to be sure 100% that you have the information and to articulate it correctly. DO NOT HALLUCINATE ON WHAT YOU DO NOT HAVE AS INFORMATION. BE 100% SUR THAT IT IS CORRECT RECOMENDATION. \n\nHTML Structure:\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n<head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n <title>VertoDigital's monthly overview of your GA4 data</title>\n \n <style type=\"text/css\">\n #outlook a { padding: 0; }\n .ReadMsgBody { width: 100%; }\n .ExternalClass { width: 100%; }\n .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; }\n body, table, td, p, a, li, blockquote { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }\n table, td { mso-table-lspace: 0pt; mso-table-rspace: 0pt; }\n img { -ms-interpolation-mode: bicubic; }\n \n body { margin: 0 !important; padding: 0 !important; }\n img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; }\n table { border-collapse: collapse !important; }\n body, #bodyTable, #bodyCell { height: 100% !important; margin: 0; padding: 0; width: 100% !important; }\n \n #bodyCell { padding: 20px; }\n #templateContainer { width: 800px; }\n \n .positive-change { color: #16a34a !important; }\n .negative-change { color: #dc2626 !important; }\n \n @media only screen and (max-width: 480px) {\n body, table, td, p, a, li, blockquote { -webkit-text-size-adjust: none !important; }\n body { width: 100% !important; min-width: 100% !important; }\n #bodyCell { padding: 10px !important; }\n #templateContainer { max-width: 800px !important; width: 100% !important; }\n .mcnTextContent { word-break: break-word; }\n .mobile-hide { display: none !important; }\n .mobile-center { text-align: center !important; }\n .mobile-stack { display: block !important; width: 100% !important; }\n }\n </style>\n</head>\n<body leftmargin=\"0\" marginwidth=\"0\" topmargin=\"0\" marginheight=\"0\" offset=\"0\" style=\"height:100% !important;margin:0;padding:0;width:100% !important;background-color:#f9fafb;color:#111827;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:1.5;\">\n <center>\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" height=\"100%\" width=\"100%\" id=\"bodyTable\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;height:100% !important;margin:0;padding:0;width:100% !important;background-color:#f9fafb;\">\n <tr>\n <td align=\"center\" valign=\"top\" id=\"bodyCell\" style=\"height:100% !important;margin:0;padding:20px;width:100% !important;\">\n \n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"templateContainer\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;width:800px;background-color:#ffffff;\">\n \n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-bottom:20px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <img src=\"https://drive.google.com/uc?export=view&id=1dcyTMtzdojG2nz2H8-vzd3NyZS0Q8l2u\" alt=\"VertoDigital Logo\" width=\"200\" height=\"auto\" style=\"max-width:200px;border:0;height:auto;line-height:100%;outline:none;text-decoration:none;display:block;\" />\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr>\n <td align=\"center\" valign=\"top\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;background-color:#3b82f6;\">\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:20px;color:#ffffff;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\">\n <h1 style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:18px;font-weight:bold;line-height:125%;color:#ffffff;text-align:left;\">\n {{ $('Code').first().json['Client Name'] }} GA4 Analytics\n </h1>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#ffffff;text-align:left;margin-top:4px;margin-bottom:15px;\">\n Here are stats that capture how users interacted with {{ $('Code').first().json['Client Name'] }}. Explore trends, top performance metrics, and more.\n </p>\n \n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;margin-bottom:15px;\">\n <tr>\n <td align=\"left\" valign=\"middle\" style=\"font-family:Arial, Helvetica, sans-serif;font-size:14px;padding:8px 16px;background-color:#ffffff;border-radius:4px;\">\n <a href=\"https://analytics.google.com/analytics/web/#/p{{ $node[\"Code\"].json[\"Account ID\"] }}/reports/explorer?params=_u..nav%3Dmaui%26_u.date00%3D{{ $json['Report from start date'] }}%26_u.date01%3D{{ $json['Report to this end date'] }}%26_u.date10%3D{{ $json['Previous start date'] }}%26_u.date11%3D{{ $json['Previous end date'] }}&ruid=lifecycle-traffic-acquisition-v2,life-cycle,acquisition&collectionId=8273756469&r=lifecycle-traffic-acquisition-v2\" target=\"_blank\" style=\"color:#000000;font-family:Arial, Helvetica, sans-serif;font-size:14px;font-weight:bold;text-decoration:none;display:block;\">\n View in Google Analytics\n </a>\n </td>\n </tr>\n </table>\n \n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold;line-height:125%;color:#ffffff;text-align:left;\">\n {{ $node[\"Code\"].json[\"Report from start date\"] }} – {{ $node[\"Code\"].json[\"Report to this end date\"] }} vs. {{ $node[\"Code\"].json[\"Previous start date\"] }} - {{ $node[\"Code\"].json[\"Previous end date\"] }}\n </p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <!-- BEGIN SUMMARY -->\n <tr>\n <td align=\"center\" valign=\"top\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:20px;\">\n <h2 style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:18px;font-weight:bold;line-height:125%;color:#111827;text-align:left;margin-bottom:10px;\">\n User and traffic metrics for {{ $('Code').first().json['Client Name'] }}\n </h2>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:left;margin-bottom:10px;\">\n Change from {{ $node[\"Code\"].json[\"Report from start date\"] }} to {{ $node[\"Code\"].json[\"Report to this end date\"] }} compared to previous period from {{ $('Code').first().json['Previous start date'] }} to {{ $('Code').first().json['Previous end date'] }}\n </p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#374151;text-align:left;margin-bottom:10px;\">\n {Generate dynamic summary paragraph 1 based on:\n - Current period data: {{ JSON.stringify($('Overall Metrics This Period').first().json) }}\n - Previous period data: {{ JSON.stringify($('Overall Metrics Previous Period').first().json) }}\n - Current conversions: {{ JSON.stringify($('Form Submits This Period').first().json) }}\n - Previous conversions: {{ JSON.stringify($('Form Submits Previous Period').first().json) }}\n \n Instructions for AI/Calculator:\n 1. Calculate percentage changes for each metric\n 2. Focus on traffic metrics (sessions, users, new users) in this paragraph\n 3. Use positive language for increases, concern language for decreases\n 4. Wrap ONLY percentage numbers with appropriate span classes:\n - <span class=\"positive-change\">+X.XX%</span> for positive changes\n - <span class=\"negative-change\">-X.XX%</span> for negative changes\n 5. Keep all descriptive text in normal color\n 6. Example format: \"<span class=\"positive-change\">+15.12%</span> sessions, <span class=\"positive-change\">+18.51%</span> active users, and <span class=\"positive-change\">+20.97%</span> new users indicate positive traffic growth for {{ $('Code').first().json['Client Name'] }}.\"\n }\n </p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#374151;text-align:left;\">\n {Generate dynamic summary paragraph 2 based on:\n - Current period engagement data: {{ JSON.stringify($('Overall Metrics This Period').first().json) }}\n - Previous period engagement data: {{ JSON.stringify($('Overall Metrics Previous Period').first().json) }}\n - Current conversions: {{ JSON.stringify($('Form Submits This Period').first().json) }}\n - Previous conversions: {{ JSON.stringify($('Form Submits Previous Period').first().json) }}\n \n Instructions for AI/Calculator:\n 1. Calculate percentage changes for engagement and conversion metrics\n 2. Focus on engagement metrics (bounce rate, session duration, views per session) and conversion metrics\n 3. Identify areas of concern or improvement\n 4. Wrap ONLY percentage numbers with appropriate span classes:\n - <span class=\"positive-change\">+X.XX%</span> for improvements (note: for bounce rate, + is negative, - is positive)\n - <span class=\"negative-change\">-X.XX%</span> for declines\n 5. Keep all descriptive text in normal color\n 6. Provide actionable insights or concerns\n 7. Example format: \"However, <span class=\"negative-change\">-6.87%</span> views per session and <span class=\"negative-change\">-7.20%</span> average session duration suggest slightly decreased engagement per visit. Form submissions are down by <span class=\"negative-change\">-14.94%</span>, indicating potential issues in the conversion process.\"\n }\n </p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <!-- // END SUMMARY -->\n \n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding:0 15px 30px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\" style=\"background-color:#dbeafe;color:#1e40af;padding:10px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold;border-left:4px solid #2563eb;\">\n Traffic Metrics\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-top:10px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\" width=\"25%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Sessions</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Overall Metrics This Period').first().json.rows[0].metricValues[0].value }}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n <td align=\"center\" valign=\"top\" width=\"25%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Engaged Sessions</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Overall Metrics This Period').first().json.rows[0].metricValues[1].value }}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n <td align=\"center\" valign=\"top\" width=\"25%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">New Users</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Overall Metrics This Period').first().json.rows[0].metricValues[6].value }}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n <td align=\"center\" valign=\"top\" width=\"25%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Active Users</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Overall Metrics This Period').first().json.rows[0].metricValues[7].value }}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding:0 15px 30px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\" style=\"background-color:#ede9fe;color:#5b21b6;padding:10px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold;border-left:4px solid #7c3aed;\">\n Engagement Metrics\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-top:10px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\" width=\"25%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Average Session Duration</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Overall Metrics This Period').first().json.rows[0].metricValues[2].value }} {in minutes and seconds for example Xm Xs}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n <td align=\"center\" valign=\"top\" width=\"25%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Bounce Rate</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Overall Metrics This Period').first().json.rows[0].metricValues[3].value }}%{if it is 0.XX%, it should be XX.XX% so it should be multipled by 100}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change when + or positive-change when - based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n <td align=\"center\" valign=\"top\" width=\"25%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Views Per Session</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Overall Metrics This Period').first().json.rows[0].metricValues[4].value }}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n <td align=\"center\" valign=\"top\" width=\"25%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Events Per Session</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Overall Metrics This Period').first().json.rows[0].metricValues[5].value }}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding:0 15px 30px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\" style=\"background-color:#fef3c7;color:#92400e;padding:10px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold;border-left:4px solid #d97706;\">\n Conversion Metrics\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-top:10px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\" width=\"50%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Conversions ({{ $('Code').first().json['Key Event'] }})</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{{ $('Form Submits This Period').first().json.rows[0].metricValues[0].value }}</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n <td align=\"center\" valign=\"top\" width=\"50%\" style=\"padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;\" class=\"mobile-stack\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;margin-bottom:5px;\">Conversion Rate ({{ $('Code').first().json['Key Event'] }})</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:24px;font-weight:bold;line-height:125%;color:#111827;text-align:center;\">{calculate based on {{ $('Form Submits This Period').first().json.rows[0].metricValues[0].value }} devided by {{ $('Overall Metrics This Period').first().json.rows[0].metricValues[0].value }} in percentages with 2 decimals after comma} %</p>\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:{negative-change or positive-change based on comparison};text-align:center;margin-top:5px;\">{+/- change in %}</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding:0 15px 30px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\">\n <h2 style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:18px;font-weight:bold;line-height:125%;color:#111827;text-align:left;margin:30px 0 15px;\">Recommended Actions</h2>\n \n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;margin-bottom:20px;border:1px solid #e5e7eb;background-color:#ffffff;\">\n <tr>\n <td align=\"left\" valign=\"top\" style=\"background-color:#dbeafe;color:#1e40af;padding:10px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold;\">\n Website Engagement Recommendations\n </td>\n </tr>\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:15px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\" width=\"20\" style=\"font-family:Arial, Helvetica, sans-serif;font-size:18px;font-weight:bold;color:#2563eb;padding-right:10px;\">•</td>\n <td align=\"left\" valign=\"top\" style=\"font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#374151;\">\n {Website Engagement Recommendation for example (only for reference):Consider optimizing the form submission process as the decreased conversion rate despite increased engagement suggests friction points in the conversion funnel. or Review mobile page performance and consider further optimizations, as mobile sessions are showing the strongest growth. or Analyze the top-performing content that's driving the increased session duration and create similar content to capitalize on this engagement trend or something similar}\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n \n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;margin-bottom:20px;border:1px solid #e5e7eb;background-color:#ffffff;\">\n <tr>\n <td align=\"left\" valign=\"top\" style=\"background-color:#ede9fe;color:#5b21b6;padding:10px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold;\">\n Traffic Optimization Recommendations\n </td>\n </tr>\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:15px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\" width=\"20\" style=\"font-family:Arial, Helvetica, sans-serif;font-size:18px;font-weight:bold;color:#7c3aed;padding-right:10px;\">•</td>\n <td align=\"left\" valign=\"top\" style=\"font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#374151;\">\n {Traffic Recommendation for example (only for reference):Invest more resources in organic search optimization, as this channel is driving significant new user acquisition. or Develop targeted campaigns to re-engage desktop users, as this segment shows minimal growth compared to mobile users. or Consider implementing audience segmentation to better understand the behavior differences between new and returning users. or something similar}\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n \n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;border:1px solid #e5e7eb;background-color:#ffffff;\">\n <tr>\n <td align=\"left\" valign=\"top\" style=\"background-color:#fef3c7;color:#92400e;padding:10px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold;\">\n Conversion Improvement Recommendations\n </td>\n </tr>\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:15px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"left\" valign=\"top\" width=\"20\" style=\"font-family:Arial, Helvetica, sans-serif;font-size:18px;font-weight:bold;color:#d97706;padding-right:10px;\">•</td>\n <td align=\"left\" valign=\"top\" style=\"font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#374151;\">\n {Conversion Recommendation for example (only for reference): Conduct user testing on the form submission process to identify and address potential usability issues. or Implement A/B testing on form layouts and call-to-action messaging to improve conversion rates. or Review the user journey leading to form submissions and identify potential drop-off points that may be contributed to the decreased conversion rate. or something similar}\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n \n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr>\n <td align=\"center\" valign=\"top\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;\">\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding:30px;\">\n <p style=\"margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:150%;color:#6b7280;text-align:center;\">\n If you have any questions or need help – feel free to reach out to <a href=\"mailto:analytics@vertodigital.com\" style=\"color:#2563eb;text-decoration:none;\">analytics@vertodigital.com</a>\n </p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n </table>\n \n </td>\n </tr>\n </table>\n </center>\n</body>\n</html>\n\n\n\n\nRules:\n- For every summary or recommendation you write, you need to be sure 100% that you have the information and to articulate it correctly. DO NOT HALLUCINATE ON WHAT YOU DO NOT HAVE AS INFORMATION. BE 100% SUR THAT IT IS CORRECT RECOMENDATION. \n- Always use Think tool to rethink the information and to make sure the html is 100% correct\n- Always use Calculator tool when there is something to be compared or calculated\n- Where is a percentage change always use positive-change or negative-change colors - If last > previous, prefix “+” and use color #10B981; if last < previous, prefix “–” and use color #EF4444.\n- Data Ranges - make them in format dd mm yyyy where mm should be first 3 letters from mm for example Mar or Apr\n\n\nCHECK IS IT VALID HTML and output the whole correct HTML without changing any information in the html. \nTHE OUTPUT SHOULD BE ONLY:\n<!DOCTYPE html> <html lang=\"en\">{Correct output}</html>\n\nCHECK IS IT VALID HTML and output the whole correct HTML without changing any information in the html.\nTHE OUTPUT SHOULD BE ONLY:\n<!DOCTYPE html> <html lang=\"en\">{Correct output}</html>",
"options": {
"maxIterations": 50
},
"promptType": "define"
},
"retryOnFail": true,
"typeVersion": 1.8
},
{
"id": "068c440e-6ece-4006-9636-f5e73d67856f",
"name": "本期总体指标",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1056,
-32
],
"parameters": {
"url": "=https://analyticsdata.googleapis.com/v1beta/properties/{{ $('Get Client').item.json[\"Account ID\"] }}:runReport",
"method": "POST",
"options": {},
"jsonBody": "={\n \"dateRanges\": [\n { \"startDate\": \"{{ $('Get Client').item.json['Report from start date'] }}\", \"endDate\": \"{{ $('Get Client').item.json['Report to this end date'] }}\" }\n ],\n \"metrics\": [\n { \"name\": \"sessions\" },\n { \"name\": \"engagedSessions\" },\n { \"name\": \"averageSessionDuration\" },\n { \"name\": \"bounceRate\" },\n { \"name\": \"screenPageViewsPerSession\" },\n { \"name\": \"eventsPerSession\" },\n { \"name\": \"newUsers\" },\n { \"name\": \"activeUsers\" },\n { \"name\": \"sessionKeyEventRate:{{ $json[\"Key Event\"] }}\" }\n ],\n \"dimensions\": []\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"nodeCredentialType": "googleAnalyticsOAuth2"
},
"credentials": {
"googleAnalyticsOAuth2": {
"id": "3NaRZW1ulEYDdGah",
"name": "Google Analytics account"
}
},
"typeVersion": 4.2
},
{
"id": "254c5df0-003c-40ea-9eb9-fc8b2b2b8150",
"name": "上期总体指标",
"type": "n8n-nodes-base.httpRequest",
"position": [
-848,
-32
],
"parameters": {
"url": "=https://analyticsdata.googleapis.com/v1beta/properties/{{ $('Get Client').item.json[\"Account ID\"] }}:runReport",
"method": "POST",
"options": {},
"jsonBody": "={\n \"dateRanges\": [\n { \"startDate\": \"{{ $('Get Client').item.json['Previous start date'] }}\", \"endDate\": \"{{ $('Get Client').item.json['Previous end date'] }}\" }\n ],\n \"metrics\": [\n { \"name\": \"sessions\" },\n { \"name\": \"engagedSessions\" },\n { \"name\": \"averageSessionDuration\" },\n { \"name\": \"bounceRate\" },\n { \"name\": \"screenPageViewsPerSession\" },\n { \"name\": \"eventsPerSession\" },\n { \"name\": \"newUsers\" },\n { \"name\": \"activeUsers\" },\n { \"name\": \"sessionKeyEventRate:{{ $('Get Client').item.json['Key Event'] }}\" }\n ],\n \"dimensions\": []\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"nodeCredentialType": "googleAnalyticsOAuth2"
},
"credentials": {
"googleAnalyticsOAuth2": {
"id": "3NaRZW1ulEYDdGah",
"name": "Google Analytics account"
}
},
"typeVersion": 4.2
},
{
"id": "985f5f91-31a2-48a3-9f36-dbd2c94126e2",
"name": "本期表单提交数",
"type": "n8n-nodes-base.httpRequest",
"position": [
-640,
-32
],
"parameters": {
"url": "=https://analyticsdata.googleapis.com/v1beta/properties/{{ $('Get Client').item.json['Account ID'] }}:runReport",
"method": "POST",
"options": {},
"jsonBody": "={\n \"dateRanges\": [\n { \"startDate\": \"{{ $('Get Client').item.json['Report from start date'] }}\", \"endDate\": \"{{ $('Get Client').item.json['Report to this end date'] }}\" }\n ],\n \"metrics\": [\n { \"name\": \"eventCount\" }\n ],\n \"dimensions\": [],\n \"dimensionFilter\": {\n \"filter\": {\n \"fieldName\": \"eventName\",\n \"stringFilter\": {\n \"value\": \"{{ $('Get Client').item.json['Key Event'] }}\",\n \"matchType\": \"EXACT\",\n \"caseSensitive\": false\n }\n }\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"nodeCredentialType": "googleAnalyticsOAuth2"
},
"credentials": {
"googleAnalyticsOAuth2": {
"id": "3NaRZW1ulEYDdGah",
"name": "Google Analytics account"
}
},
"typeVersion": 4.2
},
{
"id": "c229f0d3-34a2-4d96-9701-61500e567b60",
"name": "上期表单提交数",
"type": "n8n-nodes-base.httpRequest",
"position": [
-416,
-32
],
"parameters": {
"url": "=https://analyticsdata.googleapis.com/v1beta/properties/{{ $('Get Client').item.json['Account ID'] }}:runReport",
"method": "POST",
"options": {},
"jsonBody": "={\n \"dateRanges\": [\n { \"startDate\": \"{{ $('Get Client').item.json['Previous start date'] }}\", \"endDate\": \"{{ $('Get Client').item.json['Previous end date'] }}\" }\n ],\n \"metrics\": [\n { \"name\": \"eventCount\" }\n ],\n \"dimensions\": [],\n \"dimensionFilter\": {\n \"filter\": {\n \"fieldName\": \"eventName\",\n \"stringFilter\": {\n \"value\": \"{{ $('Get Client').item.json['Key Event'] }}\",\n \"matchType\": \"EXACT\",\n \"caseSensitive\": false\n }\n }\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"nodeCredentialType": "googleAnalyticsOAuth2"
},
"credentials": {
"googleAnalyticsOAuth2": {
"id": "3NaRZW1ulEYDdGah",
"name": "Google Analytics account"
}
},
"typeVersion": 4.2
},
{
"id": "2bc69249-9abf-4324-aa7e-698c05e0905b",
"name": "思考",
"type": "@n8n/n8n-nodes-langchain.toolThink",
"position": [
320,
192
],
"parameters": {},
"typeVersion": 1
},
{
"id": "083b74ac-80e0-46d1-b912-6c9cd74b3459",
"name": "获取客户",
"type": "n8n-nodes-base.formTrigger",
"position": [
-1264,
-32
],
"webhookId": "d268a49e-6a54-489b-aeaa-4b80eebeb333",
"parameters": {
"options": {},
"formTitle": "Google Analytics Reporting",
"formFields": {
"values": [
{
"html": "<!-- Your custom HTML here --->\n<p style=\"text-align:left; margin:0 0 18px 0;\"> Enter your GA4 property details and date ranges to generate a comprehensive monthly analytics report. The system will automatically pull your website data, analyze performance trends, and send you a professional HTML email report with insights and recommendations. </p> <p style=\"text-align:left; margin:0 0 12px 0;\"> Here is how the workflow works: </p> <ol style=\"text-align:left; margin:0; padding-left:20px;\"> <li style=\"text-align:left; margin:0 0 12px 0;\">Fill out form with GA4 Account ID, key event, date ranges, and email details.</li> <li style=\"text-align:left; margin:0 0 12px 0;\">Pull current period metrics from Google Analytics API.</li> <li style=\"text-align:left; margin:0 0 12px 0;\">Pull previous period metrics for comparison analysis.</li> <li style=\"text-align:left; margin:0 0 12px 0;\">AI Agent analyzes data and calculates percentage changes with insights.</li> <li style=\"text-align:left; margin:0 0 12px 0;\">Generate professional HTML email report with recommendations.</li> <li style=\"text-align:left; margin:0;\">Automatically send formatted report to the specified email address.</li>\n\n",
"fieldType": "html"
},
{
"fieldLabel": "Account ID",
"placeholder": "123123123",
"requiredField": true
},
{
"fieldLabel": "Key Event",
"placeholder": "form_submit",
"requiredField": true
},
{
"fieldType": "date",
"fieldLabel": "Report from start date",
"requiredField": true
},
{
"fieldType": "date",
"fieldLabel": "Report to this end date",
"requiredField": true
},
{
"fieldType": "date",
"fieldLabel": "Previous start date",
"requiredField": true
},
{
"fieldType": "date",
"fieldLabel": "Previous end date",
"requiredField": true
},
{
"fieldLabel": "Client Name",
"placeholder": "VertoDigital",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "Send to email:",
"placeholder": "your-email@example.com",
"requiredField": true
}
]
}
},
"typeVersion": 2.2
},
{
"id": "01b643bc-11f8-40d4-a444-0168db895d90",
"name": "发送消息",
"type": "n8n-nodes-base.gmail",
"position": [
400,
-32
],
"webhookId": "b705886b-a0f7-4f9c-a387-de3396c1d236",
"parameters": {
"sendTo": "={{ $('Get Client').item.json['Send to email:']}}",
"message": "={{ $json.output }}",
"options": {
"appendAttribution": false
},
"subject": "={{ $('Get Client').item.json[\"Client Name\"] }} GA4 {{ $('Get Client').item.json[\"Report from start date\"].toDateTime().monthLong }} Report"
},
"credentials": {
"gmailOAuth2": {
"id": "7p0Ucz1B2x4YQC0T",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "18aab012-7844-4c58-b6f4-08be681762cd",
"name": "代码",
"type": "n8n-nodes-base.code",
"position": [
-192,
-32
],
"parameters": {
"jsCode": "// 1. Pull in the form data\nconst form = $('Get Client').first().json;\n\n// 2. List the four fields you want to convert\nconst fields = [\n \"Report from start date\",\n \"Report to this end date\",\n \"Previous start date\",\n \"Previous end date\"\n];\n\n// 3. Loop over each field and remove hyphens\nfields.forEach(field => {\n const val = form[field];\n if (val && typeof val === 'string') {\n form[field] = val.replace(/-/g, '');\n }\n});\n\n// 4. Return one item containing your reformatted dates\nreturn [\n {\n json: form\n }\n];"
},
"typeVersion": 2
},
{
"id": "83cb35ec-5f01-44ac-b10c-842176f2882b",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-832,
-1040
],
"parameters": {
"width": 1024,
"height": 848,
"content": "## 🟨 概述 — 通过 Gmail 创建 GA4 HTML 报告并发送邮件"
},
"typeVersion": 1
},
{
"id": "b76538a7-05e8-425b-a021-3253eff8bf0c",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1904,
-160
],
"parameters": {
"width": 560,
"height": 352,
"content": "## 🗒️ 设置清单(首次运行前完成)"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "37ffddb4-807d-4453-a689-251862e1e8f4",
"connections": {
"Code": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Think": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Calculator": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get Client": {
"main": [
[
{
"node": "Overall Metrics This Period",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Form Submits This Period": {
"main": [
[
{
"node": "Form Submits Previous Period",
"type": "main",
"index": 0
}
]
]
},
"Overall Metrics This Period": {
"main": [
[
{
"node": "Overall Metrics Previous Period",
"type": "main",
"index": 0
}
]
]
},
"Form Submits Previous Period": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Overall Metrics Previous Period": {
"main": [
[
{
"node": "Form Submits This Period",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 杂项, AI 摘要总结, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
创建基于关键词到Google Docs的研究支持型SEO内容简报
使用OpenAI和Firecrawl生成研究支持的SEO内容简报到Google Docs
Code
Google Docs
Form Trigger
+5
10 节点Simeon Penev
杂项
使用AI分析检测病毒式YouTube视频并发送邮件报告
使用AI分析检测病毒式YouTube视频并发送邮件报告
Set
Code
Sort
+14
26 节点gclbck
杂项
竞争对手内容差距分析器:自动化网站主题映射
使用Gemini AI、Apify和Google Sheets分析竞争对手内容差距
If
Set
Code
+10
30 节点Mychel Garzon
杂项
每日Gmail收件箱摘要转Discord(GPT-4.1-mini + PDF转换)
使用GPT-4.1-mini和PDF转换的每日Gmail收件箱摘要发送到Discord
Code
Gmail
Discord
+8
18 节点moosa
杂项
动态AI网络研究员:从纯文本到自定义CSV
使用GPT-4和Linkup将纯文本转换为自定义CSV的动态AI网络研究员
Set
Code
Split Out
+7
16 节点Guillaume Duvernay
杂项
HTX AI代理 v1.02
使用HTX API、GPT-4o和Telegram分析加密货币市场数据
Set
Code
Telegram
+8
35 节点Don Jayamaha Jr
杂项
工作流信息
难度等级
中级
节点数量13
分类3
节点类型9
作者
Simeon Penev
@monkatagptI specialize in building AI workflows that streamline processes and reduce manual work. My main workflows are in the marketing field, but I can automate all kind of processes and integrate AI in them.
外部链接
在 n8n.io 查看 →
分享此工作流