{
  "id": "aII3GCSHJ15ErlYd",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Jotform Summarizer with Comprehensive and Abstract Insights using Gemini AI",
  "tags": [
    {
      "id": "Kujft2FOjmOVQAmJ",
      "name": "Engineering",
      "createdAt": "2025-04-09T01:31:00.558Z",
      "updatedAt": "2025-04-09T01:31:00.558Z"
    },
    {
      "id": "ZOwtAMLepQaGW76t",
      "name": "Building Blocks",
      "createdAt": "2025-04-13T15:23:40.462Z",
      "updatedAt": "2025-04-13T15:23:40.462Z"
    },
    {
      "id": "ddPkw7Hg5dZhQu2w",
      "name": "AI",
      "createdAt": "2025-04-13T05:38:08.053Z",
      "updatedAt": "2025-04-13T05:38:08.053Z"
    }
  ],
  "nodes": [
    {
      "id": "8b330c71-c374-45f1-b209-f222cde01637",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -464,
        -112
      ],
      "parameters": {
        "path": "f3c34cda-d603-4923-883b-5+1234567890",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "1ce7b1ab-bffa-4321-84f6-b86994f86388",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -16,
        96
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash-exp"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "618b2a63-96f6-48fd-93c2-0ab011ce6c72",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        192,
        96
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"comprehensive_summary\": \"\",\n    \"abstract_summary\": \"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "fe8330f1-da12-4d2d-9dd2-3471e3184baf",
      "name": "Persist On DataTable",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        512,
        -240
      ],
      "parameters": {
        "columns": {
          "value": {
            "abstract_summary": "={{ $json.output.abstract_summary }}",
            "comprehensive_summary": "={{ $json.output.comprehensive_summary }}"
          },
          "schema": [
            {
              "id": "comprehensive_summary",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "comprehensive_summary",
              "defaultMatch": false
            },
            {
              "id": "abstract_summary",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "abstract_summary",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "summary"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "BS6vlRklZeHuVf1A",
          "cachedResultUrl": "/projects/OFZrD6piltNz73Y6/datatables/BS6vlRklZeHuVf1A",
          "cachedResultName": "JotformRegistration"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "56bf001b-cbe4-48d6-afc8-ee6cfa6a5976",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        512,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "abstract_summary": "={{ $json.output.abstract_summary }}",
            "comprehensive_summary": "={{ $json.output.comprehensive_summary }}"
          },
          "schema": [
            {
              "id": "comprehensive_summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "comprehensive_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "abstract_summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "abstract_summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "comprehensive_summary"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JOEbaPC2T06_O6Jb_UMbS7oG3z5RncY7Wk1gNAcpicg/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1JOEbaPC2T06_O6Jb_UMbS7oG3z5RncY7Wk1gNAcpicg",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JOEbaPC2T06_O6Jb_UMbS7oG3z5RncY7Wk1gNAcpicg/edit?usp=drivesdk",
          "cachedResultName": "Jotoform Registration"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "1c5ef158-8280-4cbf-95f8-2a0993cf53e2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        -544
      ],
      "parameters": {
        "color": 7,
        "width": 352,
        "height": 272,
        "content": "![Logo](https://www.jotform.com/resources/assets/logo-nb/min/jotform-logo-white-400x200.png)\n\nUses Google Gemini AI for the Comprehensive and Abstract Summarization of Jotform content"
      },
      "typeVersion": 1
    },
    {
      "id": "bc44ee25-7f8d-4955-aa7e-967394d81f3a",
      "name": "Comprehensive & Abstract Summarizer",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        16,
        -112
      ],
      "parameters": {
        "text": "=Build a comprehensive summary of the following {{ $json.body.pretty }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are an expert comprehensive summarizer"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "4e9bf3c9-acbc-4bce-af59-3cfb3b43b0ef",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -816
      ],
      "parameters": {
        "width": 400,
        "height": 544,
        "content": "## Comprehensive Summarization \n\nComprehensive Summarization focuses on covering all key points from the source text in a factual, detail-preserving way \u2014 without introducing new information.\nIt is closer to extractive summarization, but with a structured, complete overview.\n\n\ud83c\udfaf Goal\n\nTo provide an accurate and complete understanding of all user feedback details, ensuring nothing important is omitted.\n\n\ud83e\udde9 Ideal For\n\n- Customer service reports\n\n- Research surveys\n\n- Support ticket summaries\n\n- Business feedback logs\n\n- When traceability and completeness are important"
      },
      "typeVersion": 1
    },
    {
      "id": "f4b292b0-a173-44a2-9c42-f2a326f78903",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        -816
      ],
      "parameters": {
        "width": 400,
        "height": 544,
        "content": "## Abstract Summarization \n\nAbstract summarization is conceptual and generative \u2014 the model rephrases, synthesizes, and interprets content to express underlying meaning rather than repeating the source.\n\n\ud83c\udfaf Goal\n\nTo provide insightful, human-like overviews that capture themes, tone, and implications, even introducing short interpretive statements.\n\n\ud83e\udde9 Ideal For\n\n- Executive summaries\n\n- Blog post generation\n\n- Customer insight synthesis\n\n- Marketing content summaries\n\n- When brevity and storytelling matter"
      },
      "typeVersion": 1
    },
    {
      "id": "4c410111-74dc-4d89-9bf7-df06dc364c1f",
      "name": "Create a document",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        512,
        256
      ],
      "parameters": {
        "title": "={{ $('Set the Input Fields').item.json.FormTitle }}-{{ $('Set the Input Fields').item.json.SubmissionID }}",
        "folderId": "default"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "6b7ace69-f792-4040-87d6-6e857febd487",
      "name": "Set the Input Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -224,
        -112
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a3ce16f0-0a3c-4f77-b747-bd475def3862",
              "name": "FormTitle",
              "type": "string",
              "value": "={{ $json.body.formTitle }}"
            },
            {
              "id": "b65e18e1-3aaa-4c4e-a7c4-c011078af035",
              "name": "SubmissionID",
              "type": "string",
              "value": "={{ $json.body.submissionID }}"
            },
            {
              "id": "ea353a9b-54e3-4f23-bc62-a30388acf5c6",
              "name": "body",
              "type": "object",
              "value": "={{ $json.body.toJsonString() }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2270d28e-443a-480d-b44a-1683ed6d029d",
      "name": "Update a document",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        720,
        256
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "=Comprehensive Summary - \n\n{{ $('Comprehensive & Abstract Summarizer').item.json.output.comprehensive_summary }}\n\nAbstract Summary - \n\n{{ $('Comprehensive & Abstract Summarizer').item.json.output.abstract_summary }}",
              "action": "insert"
            }
          ]
        },
        "operation": "update",
        "documentURL": "={{ $json.id }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "78e39833-6dee-4e69-9b48-f8b1fa198c19",
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Set the Input Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a document": {
      "main": [
        [
          {
            "node": "Update a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the Input Fields": {
      "main": [
        [
          {
            "node": "Comprehensive & Abstract Summarizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Comprehensive & Abstract Summarizer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Comprehensive & Abstract Summarizer",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Comprehensive & Abstract Summarizer": {
      "main": [
        [
          {
            "node": "Persist On DataTable",
            "type": "main",
            "index": 0
          },
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}