{
  "id": "2HlbXBsdar2SqJK9",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Generate Project Summary from meeting transcript",
  "tags": [],
  "nodes": [
    {
      "id": "01d49932-017c-4afb-af33-5d6c85bfd7a0",
      "name": "CreateGoogleDoc",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        736,
        32
      ],
      "parameters": {
        "url": "https://www.googleapis.com/upload/drive/v3/files",
        "body": "={{ $json.rawData }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendQuery": true,
        "contentType": "raw",
        "authentication": "predefinedCredentialType",
        "rawContentType": "multipart/related; boundary=divider",
        "queryParameters": {
          "parameters": [
            {
              "name": "uploadType",
              "value": "multipart"
            },
            {
              "name": "supportsAllDrives",
              "value": "true"
            }
          ]
        },
        "nodeCredentialType": "googleDriveOAuth2Api"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "2312d005-6930-4ad7-9043-dfae981c87b9",
      "name": "Markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        256,
        32
      ],
      "parameters": {
        "mode": "markdownToHtml",
        "options": {
          "emoji": true,
          "tables": true
        },
        "markdown": "={{ $json.text }}",
        "destinationKey": "html_content"
      },
      "typeVersion": 1
    },
    {
      "id": "2cfbb626-c4a8-45d8-b278-5d8b3b83fc70",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -144
      ],
      "parameters": {
        "width": 1792,
        "height": 544,
        "content": "## Create Project Summary from meeting transcript\n\nThis workflow will pick the transcript from the GoogleDocs file and generate project summary and store it in Google Docs with proper headings."
      },
      "typeVersion": 1
    },
    {
      "id": "4d39d4d7-0e66-498e-9784-70721ef27f4c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        16,
        272
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {
          "timeout": 300000,
          "maxTokens": 32768,
          "maxRetries": 2
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8a750e1d-88dc-47e6-8476-295fc480d884",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -592,
        32
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8976101d-0619-48b4-8440-bd5ddf47aecd",
      "name": "Get meeting transcript",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        -384,
        32
      ],
      "parameters": {
        "operation": "get",
        "documentURL": "1L05uM0Iovq4gySv6lIUUQhRBKoQzW_FnYr4YEfxu4y8"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "68d8121a-1f60-4c94-858a-3bc3c2d065b6",
      "name": "Project Summary",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -96,
        32
      ],
      "parameters": {
        "text": "=You are a professional project manager and planner, your task is to provide a proper Client summary, you will given a structure of headings with a structure of an existing example of how a client summary would look like, and you will also be given a transcript from which you have to make all of this content from. Ensure everything is proper and take things step by step to ensure clearity. \n\nToday date is: {{ $today }}\n\nThis is an example of the project summary we are expecting you to give from a transcript that will be given to you:\n```\nProject Overview\nDescribe the client's current business or process, key goals, and overall vision discussed in the transcript. Summarize what they do and the context for the automation or technology intervention.\n\nKey Challenges\nHighlight specific issues, pain points, or bottlenecks the client is currently facing. Use direct examples from the transcript wherever possible.\n\nWhat [Your Automation Platform] Will Deliver\nDescribe what the platform/solution will deliver to address the client\u2019s challenges. This section should be broken into specific deliverables (usually 2\u20134), clearly titled and explained under subheadings. These should reflect the solution areas mentioned in the transcript.\n\n1. [First Deliverable Name]\nExplain what this component is, how it works, and what it solves.\n\n2. [Second Deliverable Name]\nRepeat for additional components.\n\n(Add more sections like ### 3, ### 4 as needed, based on the transcript.)\n\nExpected Business Impact\nDescribe the measurable or expected benefits of this solution for the client. Focus on improvements in efficiency, scale, response time, conversion, cost, etc.\n\n\ud83d\uddd3 Project Timeline & Rollout\nProvide a timeline broken down by project phases, using this format:\n\nPhase\tActivities\tDuration\nDiscovery & Planning\tDefine business rules, qualification flow, integration touchpoints\tX business days\n[Setup Phase]\tBuild and test the automation components\tX business days\n[Integration Phase]\tSet up any webhooks, 3rd-party connectors, or API touchpoints\tX business days\nTesting & Launch\tQA all flows and finalize for production use\tX business days\n\nTotal Duration: X Weeks\n```\n\nTranscript, make use of this to provide me the project summary in Markdown format without these ``` and ``` symbols:\n ``` {{ $json.content }} ```",
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "509a03c3-24d1-484d-a9e0-dc774cdfab1e",
      "name": "set_fields",
      "type": "n8n-nodes-base.set",
      "position": [
        416,
        32
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e7ee03ac-13e3-4fca-a7bc-57c8fc56dc42",
              "name": "document_name",
              "type": "string",
              "value": "=Project Summary"
            },
            {
              "id": "f9703662-f8c1-4562-ac76-5514bada5439",
              "name": "google_drive_folder_id",
              "type": "string",
              "value": "driveFolderId"
            }
          ]
        }
      },
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "3475c757-07cb-4ffb-9900-f53dd7ca8813",
      "name": "Prepare_Request",
      "type": "n8n-nodes-base.code",
      "position": [
        576,
        32
      ],
      "parameters": {
        "jsCode": "const boundary = 'divider';\nconst docName = $input.first().json.document_name;\nconst folderId = $input.first().json.google_drive_folder_id;\nconst htmlContent = $('Markdown').first().json.html_content;\n\nconst metadata = JSON.stringify({\n  name: docName,\n  mimeType: \"application/vnd.google-apps.document\",\n  parents: [folderId]\n});\n\nconst htmlWithStyles = `\n<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <style>\n    /* Add bottom margin to block elements for spacing */\n    p,\n    ul,\n    ol,\n    table,\n    h1,\n    h2,\n    h3,\n    h4,\n    h5,\n    h6 {\n      margin-bottom: 10pt;\n    }\n\n    h2 {\n      margin-top: 20pt;\n    }\n\n    /* Prevent margin collapse issues or excessive space inside lists */\n    li {\n       margin-bottom: 2pt; /* Optional: small space between list items */\n    }\n\n    /* Remove margin from the last child within common containers if needed */\n    /* This might be overly aggressive, test without it first */\n    /*\n    body > *:last-child,\n    li > *:last-child {\n       margin-bottom: 0;\n    }\n    */\n  </style>\n</head>\n<body>\n  ${htmlContent}\n</body>\n</html>\n`;\n\n// Construct the body with literal \\r\\n ONLY\nlet body = `--${boundary}\\r\\n`;\nbody += `Content-Type: application/json; charset=UTF-8\\r\\n`;\nbody += `\\r\\n`; // Blank line\nbody += `${metadata}\\r\\n`;\nbody += `--${boundary}\\r\\n`;\nbody += `Content-Type: text/html\\r\\n`;\nbody += `\\r\\n`; // Blank line\nbody += `${htmlWithStyles}\\r\\n`; // Add the HTML content\nbody += `--${boundary}--\\r\\n`; // Final boundary\n\nreturn {\n  rawData: body \n};"
      },
      "typeVersion": 2
    },
    {
      "id": "0003d9a0-fcbe-4423-90e9-6583c9546f12",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        944,
        32
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5773cc9b-6232-4ddb-b76f-3b7904c9b9fe",
  "connections": {
    "Markdown": {
      "main": [
        [
          {
            "node": "set_fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set_fields": {
      "main": [
        [
          {
            "node": "Prepare_Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CreateGoogleDoc": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare_Request": {
      "main": [
        [
          {
            "node": "CreateGoogleDoc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Project Summary": {
      "main": [
        [
          {
            "node": "Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Project Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get meeting transcript": {
      "main": [
        [
          {
            "node": "Project Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get meeting transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}