Jotform と Gemini AI を使ってパーソナライズされたサマリー調査レポートを生成
これは自動化ワークフローで、18個のノードを含みます。主にSet, Code, Wait, Gmail, SplitOutなどのノードを使用。 JotformとGemini AIを使用して個別および集計された調査レポートを生成
- •Googleアカウント + Gmail API認証情報
- •ターゲットAPIの認証情報が必要な場合あり
- •Google Gemini API Key
使用ノード (18)
カテゴリー
{
"meta": {
"instanceId": "02059f0cb4b0ce23b903e8adf7a801dac35cd440dae5af845bde6649af1dcbcf",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "7e0aa177-12cf-4a1c-a035-2a5aaf460bff",
"name": "フォーム送信トリガー",
"type": "n8n-nodes-base.jotFormTrigger",
"position": [
7936,
5072
],
"webhookId": "YOUR_WEBHOOK_ID_FORM_SUBMISSION_TRIGGER",
"parameters": {
"form": "YOUR_JOTFORM_FORM_ID"
},
"typeVersion": 1
},
{
"id": "ea0090ca-7a4d-481c-b3ad-469d70fa292e",
"name": "個別回答の収集",
"type": "n8n-nodes-base.aggregate",
"position": [
8144,
5072
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "9bd60900-84a2-400d-8fb7-09b7ce7600bf",
"name": "個人レポートの生成",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
8352,
5072
],
"parameters": {
"text": "=Analyze this survey response and generate a concise personalized report.\n\ntodays date :- {{ $now }}\n\nRESPONDENT DATA:\n{{ $json.data.toJsonString() }}\n\nINSTRUCTIONS:\n1. Extract: Age, Gender, Employment, Email\n2. Analyze responses and identify 3-4 key insights\n3. Generate 3-4 specific recommendations\n4. Create compact HTML report with:\n - Professional header with gradient background\n - Recipient info section\n - Key Insights section with styled bullets\n - Recommendations section with styled bullets\n - Modern, clean design with good spacing\n - Professional color scheme\n - Footer with thank you message\n\nSTYLING REQUIREMENTS:\n- Use modern, professional colors (blues, grays)\n- Clear typography with good hierarchy\n- Proper spacing and padding\n- Rounded corners on sections\n- Subtle borders and shadows\n- Mobile-responsive design\n- Easy-to-scan format with visual hierarchy\n\nRETURN JSON ONLY:\n{\n \"email_subject\": \"string\",\n \"html_report\": \"string\"\n}",
"options": {
"systemMessage": "You are a concise survey analysis system that generates brief, point-by-point personalized reports.\n\nYour role:\n1. Extract key facts from survey responses\n2. Identify 3-4 main insights specific to the respondent\n3. Generate 3-4 actionable recommendations\n4. Create a compact HTML email report (minimal design, quick read)\n\nGuidelines:\n- Be concise and direct - no lengthy explanations\n- Use bullet points and short statements\n- Focus on: demographics, consumption habits, spending, health, brand preference\n- Generate specific recommendations based on their answers\n- Maintain professional tone\n- Ensure HTML is compact and email-friendly\n\nOutput ONLY valid JSON with no additional text."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "dae0887f-fe3e-4967-a3fa-29878f03aa07",
"name": "回答準備完了 - 一時停止",
"type": "n8n-nodes-base.wait",
"position": [
8704,
5072
],
"webhookId": "YOUR_WEBHOOK_ID_RESPONSE_READY_-_PAUSE",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "a0c4f4ff-a078-46d3-844e-30bd662a383f",
"name": "Gemini LLM (個人用)",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
8304,
5264
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "3c885d88-083c-4a60-8ef0-1b73af282d6e",
"name": "個人レポートの解析 JSON",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
8528,
5280
],
"parameters": {
"jsonSchemaExample": "{\n \"email_subject\": \"Your Fast Food Survey Analysis - Key Insights\",\n \"html_report\": \"[Complete personalized HTML report with inline CSS]\"\n}"
},
"typeVersion": 1.3
},
{
"id": "03432b73-c45f-4431-94e4-6c1b050f36fc",
"name": "個人レポートの送信",
"type": "n8n-nodes-base.gmail",
"position": [
8912,
5072
],
"webhookId": "YOUR_WEBHOOK_ID_SEND_PERSONAL_REPORT",
"parameters": {
"sendTo": "={{ $('Form Submission Trigger').item.json['Please indicate your email so that we can reach you about the results.'] }}",
"message": "={{ $json.output.html_report }}",
"options": {
"appendAttribution": false
},
"subject": "={{ $json.output.email_subject }}"
},
"typeVersion": 2.1
},
{
"id": "340a9911-23d4-4cd3-abc4-c4bfdf6a7f20",
"name": "Gemini LLM",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
8880,
5856
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "a0b2076e-742b-4e9f-be8f-a8b144b7ff7b",
"name": "週次レポートスケジューラー",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
7696,
5680
],
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtHour": 11
}
]
}
},
"typeVersion": 1.2
},
{
"id": "88f3cdd7-57c0-41e4-b04a-8d9ed0a40c77",
"name": "調査回答の取得",
"type": "n8n-nodes-base.httpRequest",
"position": [
7920,
5680
],
"parameters": {
"url": "https://api.jotform.com/form/YOUR_JOTFORM_FORM_ID/submissions",
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "apiKey",
"value": "YOUR_JOTFORM_API_KEY"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "a03fc700-9c02-4bff-9e8a-1dc32d465acd",
"name": "回答オブジェクトの展開",
"type": "n8n-nodes-base.splitOut",
"position": [
8128,
5680
],
"parameters": {
"include": "selectedOtherFields",
"options": {},
"fieldToSplitOut": "content",
"fieldsToInclude": "content.id, content.answers"
},
"typeVersion": 1
},
{
"id": "e01bacda-db4d-42de-b069-e0f1757a7dd9",
"name": "回答フィールドの正規化",
"type": "n8n-nodes-base.set",
"position": [
8320,
5680
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f027e797-014e-47d9-ad55-0036bd06a453",
"name": "content.id",
"type": "string",
"value": "={{ $json.content.id }}"
},
{
"id": "43730158-8ed8-4abc-9a8a-cd62846a98bf",
"name": "",
"type": "string",
"value": ""
},
{
"id": "f5063b4f-ab7a-4007-9bb2-24fafbbdb78f",
"name": "content.answers",
"type": "object",
"value": "={{ $json.content.answers }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d56e17da-0499-4361-884d-875ca9d2822e",
"name": "質問・回答ペアの抽出",
"type": "n8n-nodes-base.code",
"position": [
8528,
5680
],
"parameters": {
"jsCode": "// Extract id, text, and answer from each submission\nconst results = [];\n\nfor (const item of $input.all()) {\n const submission = item.json.content;\n const id = submission.id;\n const answers = submission.answers;\n \n // Extract only questions with answers (exclude headers, buttons, and empty answers)\n const extractedAnswers = [];\n \n for (const key in answers) {\n const field = answers[key];\n \n // Only include if it has text and answer, and is not a control element\n if (field.text && field.answer && field.type !== 'control_head' && field.type !== 'control_button') {\n extractedAnswers.push({\n text: field.text,\n answer: field.answer\n });\n }\n }\n \n results.push({\n id: id,\n survey_responses: extractedAnswers\n });\n}\n\nreturn results;"
},
"typeVersion": 2
},
{
"id": "da49efb8-fbb7-4b0e-8d1f-359fa85601a4",
"name": "全回答の統合",
"type": "n8n-nodes-base.aggregate",
"position": [
8720,
5680
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "157b8677-aa4d-4068-80f8-e2389073984a",
"name": "分析とレポート作成",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
8928,
5680
],
"parameters": {
"text": "=Generate an aggregate report from these survey submissions.\n\nSURVEY DATA:\n{{ $json.data.toJsonString() }}\n\nReturn ONLY valid JSON with these exact two fields:\n{\n \"email_subject\": \"Survey Aggregate Report - 4 Respondents - Fast Food Consumption Study\",\n \"html_report\": \"[Complete HTML with inline styles, professional design, all statistics, demographics, insights, and findings embedded in the HTML string]\"\n}\n\nDo not include any text, markdown, or explanations outside the JSON.",
"options": {
"systemMessage": "=You are a survey aggregation and statistical analysis system that generates professional HTML reports from multiple survey submissions.\n\nYour ONLY job is to return a JSON object with exactly two fields:\n1. email_subject: A string with the report title\n2. html_report: A string containing complete, valid HTML with inline CSS\n\nDo NOT include any text before or after the JSON. Do NOT include markdown backticks. Do NOT include explanations.\n\nProcess:\n- Count total respondents\n- Analyze each question's responses\n- Calculate percentages and frequencies\n- Identify demographic patterns\n- Generate 5-7 key insights\n- Create comprehensive HTML report with statistics\n\nReturn ONLY this JSON structure:\n{\n \"email_subject\": \"string\",\n \"html_report\": \"string\"\n}"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "999ae35e-9a91-4a69-af48-8a4b52390eb9",
"name": "管理者へのレポート送信",
"type": "n8n-nodes-base.gmail",
"position": [
9264,
5680
],
"webhookId": "YOUR_WEBHOOK_ID_SEND_REPORT_TO_ADMIN",
"parameters": {
"sendTo": "=YOUR_ADMIN_EMAIL@example.com",
"message": "={{ $json.output.html_report }}",
"options": {
"appendAttribution": false
},
"subject": "={{ $json.output.email_subject }}"
},
"typeVersion": 2.1
},
{
"id": "f38a7b8f-ed90-417c-9956-c67787ff3cc7",
"name": "構造化出力パーサー",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
9088,
5872
],
"parameters": {
"jsonSchemaExample": "{\n \"email_subject\": \"Your Fast Food Survey Analysis - Key Insights\",\n \"html_report\": \"[Complete personalized HTML report with inline CSS]\"\n}"
},
"typeVersion": 1.3
},
{
"id": "27544677-1438-444f-b90d-6b494daa02cd",
"name": "付箋メモ",
"type": "n8n-nodes-base.stickyNote",
"position": [
7168,
4992
],
"parameters": {
"width": 2368,
"height": 1040,
"content": "# Automated Survey Reports via Jotform\n\n## What It Does\n\nThis workflow automatically processes Jotform survey responses and generates two types of reports:\n\n1. **Personal Reports** - Sent to each respondent immediately after they submit\n2. **Weekly Summaries** - Statistical overview sent to admin every week\n\n## [Get Jotform from here](https://www.jotform.com/?partner=roshanramanidev)\n---\n\n## How It Works\n\n### **When someone fills out the survey:**\n### → Personal report generated with their insights and recommendations\n### → HTML email sent to respondent (within seconds)\n\n### **Every week:**\n### → Collects all responses\n### → Analyzes trends and patterns\n### → Generates aggregate report with statistics\n### → Sends to admin email\n\n\n---\n\n## Quick Start\n\n1. Create your survey on [Jotform](https://www.jotform.com/?partner=roshanramanidev)\n2. Get your Jotform API key\n3. Setup Google Gemini API credentials\n4. Configure Gmail access\n5. Import workflow into n8n\n6. Test with sample response\n\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"340a9911-23d4-4cd3-abc4-c4bfdf6a7f20": {
"ai_languageModel": [
[
{
"node": "157b8677-aa4d-4068-80f8-e2389073984a",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"157b8677-aa4d-4068-80f8-e2389073984a": {
"main": [
[
{
"node": "999ae35e-9a91-4a69-af48-8a4b52390eb9",
"type": "main",
"index": 0
}
]
]
},
"d56e17da-0499-4361-884d-875ca9d2822e": {
"main": [
[
{
"node": "da49efb8-fbb7-4b0e-8d1f-359fa85601a4",
"type": "main",
"index": 0
}
]
]
},
"da49efb8-fbb7-4b0e-8d1f-359fa85601a4": {
"main": [
[
{
"node": "157b8677-aa4d-4068-80f8-e2389073984a",
"type": "main",
"index": 0
}
]
]
},
"a0c4f4ff-a078-46d3-844e-30bd662a383f": {
"ai_languageModel": [
[
{
"node": "9bd60900-84a2-400d-8fb7-09b7ce7600bf",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"dae0887f-fe3e-4967-a3fa-29878f03aa07": {
"main": [
[
{
"node": "03432b73-c45f-4431-94e4-6c1b050f36fc",
"type": "main",
"index": 0
}
]
]
},
"7e0aa177-12cf-4a1c-a035-2a5aaf460bff": {
"main": [
[
{
"node": "ea0090ca-7a4d-481c-b3ad-469d70fa292e",
"type": "main",
"index": 0
}
]
]
},
"a03fc700-9c02-4bff-9e8a-1dc32d465acd": {
"main": [
[
{
"node": "e01bacda-db4d-42de-b069-e0f1757a7dd9",
"type": "main",
"index": 0
}
]
]
},
"a0b2076e-742b-4e9f-be8f-a8b144b7ff7b": {
"main": [
[
{
"node": "88f3cdd7-57c0-41e4-b04a-8d9ed0a40c77",
"type": "main",
"index": 0
}
]
]
},
"88f3cdd7-57c0-41e4-b04a-8d9ed0a40c77": {
"main": [
[
{
"node": "a03fc700-9c02-4bff-9e8a-1dc32d465acd",
"type": "main",
"index": 0
}
]
]
},
"9bd60900-84a2-400d-8fb7-09b7ce7600bf": {
"main": [
[
{
"node": "dae0887f-fe3e-4967-a3fa-29878f03aa07",
"type": "main",
"index": 0
}
]
]
},
"f38a7b8f-ed90-417c-9956-c67787ff3cc7": {
"ai_outputParser": [
[
{
"node": "157b8677-aa4d-4068-80f8-e2389073984a",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"e01bacda-db4d-42de-b069-e0f1757a7dd9": {
"main": [
[
{
"node": "d56e17da-0499-4361-884d-875ca9d2822e",
"type": "main",
"index": 0
}
]
]
},
"3c885d88-083c-4a60-8ef0-1b73af282d6e": {
"ai_outputParser": [
[
{
"node": "9bd60900-84a2-400d-8fb7-09b7ce7600bf",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"ea0090ca-7a4d-481c-b3ad-469d70fa292e": {
"main": [
[
{
"node": "9bd60900-84a2-400d-8fb7-09b7ce7600bf",
"type": "main",
"index": 0
}
]
]
}
}
}このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
Roshan Ramani
@rawsun007I love building smart n8n automations that actually work reliably. My focus is on making everyday tasks like email, social media, and CRM workflows simpler using AI. I've shared templates in the n8n community, including a WhatsApp Expense Tracker that people really enjoy. What keeps me excited is constantly trying new things - testing fresh nodes, playing with AI tools like LangChain, and discovering creative ways to connect systems!
このワークフローを共有