{"id":170,"date":"2024-01-26T15:59:26","date_gmt":"2024-01-26T20:59:26","guid":{"rendered":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/"},"modified":"2024-01-26T15:59:26","modified_gmt":"2024-01-26T20:59:26","slug":"meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis","status":"publish","type":"post","link":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/","title":{"rendered":"<div>Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &#038; Docs APIs<\/div>"},"content":{"rendered":"<p>Source:generated by OpenAI DALL-E \u201cOil style painting of 5 persons connected on Meet. Robots writing meeting minutes\u201d\u200bYour meeting minutes generated automatically in a document with ChatGPT right after recording your\u00a0meeting1. Unleash the Power of ChatGPT to Do (Useful)\u00a0ThingsIn this technical article, we will explore how to leverage the ChatGPT 4 API along with Google Meet, Google Drive, and Google Docs APIs to automatically generate meeting\u00a0minutes.Taking minutes during a meeting can be a time-consuming task, and it is often difficult to capture everything that is discussed. With the use of artificial intelligence, the process can be streamlined to ensure that nothing is\u00a0missed.As Microsoft Teams or Zoom, Google Meet has the ability to record meetings. Once the recording is activated, the transcript of the meeting is generated in a Google Document format and is stored on a defined Google Drive shared folder. Google Meet transcript file is used here but similar transcript text extract could also be done with Teams or Zoom recording.For this, a simple web application will be used as a central point to manage the user interaction as well as the different API calls. The purpose is to display a list of these meeting transcript documents stored on a predefined Google Drive folder. The user will be able to select one of them then press a button to generate a summary of the meeting minutes as well as the action items with due dates. Also, these two new sections will be inserted in the same Google Document with Google Docs API, containing the results from ChatGPT\u00a0API.This article will walk you through the steps required to set up the necessary configuration and to understand the Dash\/Python application code used to manage the ChatGPT, Google Drive &amp; Docs\u00a0APIs.A link to my GitLab containing the full Python\/Dash source code is also available on the next sections.By the end of this article, I\u2019ll also share my thoughts on some limitations and improvements that could be done on this application. I hope it will allow you to find new ideas on how to stay focused on more valuable tasks than taking meeting\u00a0minutes.So let\u2019s dive\u00a0in!Get Certified in ChatGPT + Conversational UX + Dialogflow2. Overview of the web application capabilitiesThe web application looks like the screen below. The upper section displays a list of transcript documents present on the user\u2019s shared Google Drive folder. Such documents are automatically generated in the \u2018Meet Recordings\u2019 folder when the user triggers the Google Meet recording button.The user can select a document in the list. The selected document is displayed in the central part. Finally, the user can press the button to generate the meeting\u00a0minutes.The main screen of the web application (Source:\u00a0Autor)Once the button pressed, the Meeting minutes are automatically inserted in 2 new sections:The \u2018Meeting Summary\u2019 section is a short description of the meeting based on the meeting transcript. It will stay synthetic whatever the duration of the\u00a0meeting.The \u2018Meeting Action Items\u2019 section is a numbered action items checkbox list which is also based on the transcript. When known, a due date is also inserted.The result: The Meeting Minutes are generated in the selected document (Source:\u00a0Autor)Each numbered meeting action item contains a checkbox that is natively supported by Google Docs. They could be used later on by your teams to follow up the action list and to check them once they are\u00a0done.3. Quick\u00a0StartThe following will allow you to edit and run the code present on my GitLab. Before doing that, you\u2019ll need to register at OpenAI to get your API key. Also, Google Drive and Docs APIs need to be activated on the Google console, as well as creating a Google Service\u00a0Account.Go to the OpenAI website and sign up to get your API\u00a0KeyGo to my GitLab project named Meeting Minutes generation with\u00a0ChatGPTEdit the Jupyter Python notebook with Google Colab and save it on your own Colab\u00a0folderReplace the \u2018OPENAI_API_KEY\u2019 value in the code with your own api\u00a0keyUse the following link to activate the Google Drive &amp; the Google Doc\u00a0APIsUse the following link to create a Google Service\u00a0AccountDownload and save the Google Service Account Key (JSon File) in your Colab folder. Name it \u2018credentials_serviceaccount.json\u2019 (or change the value in the\u00a0code)Share your \u2018Meet Recordings\u2019 Google Drive folder with the Google Service Account created previously (with \u2018Editor\u2019 permission)Attend a Google Meet meeting. Record it with the transcript. The video file and the transcript document will automatically be generated in your \u2018Meet Recordings\u2019 Google Drive\u00a0folderIn the code, replace the \u2018GOOGLE_MEET_RECORDING_FOLDER\u2019 value with the ID of your \u2018Meet Recordings\u2019 Google Drive folder shared previouslySelect \u2018Run All\u2019 in the \u2018Execution\u2019 menuA WebApp should start in a few seconds. Click on the URL generated in the bottom of the Colab notebook to display\u00a0itThe application should look like the first screenshot in the previous\u00a0section.4. Understand the main parts of the\u00a0codeAs of today, the ChatGPT 4 API is still in beta. The used version in the code is \u2018gpt-4\u20130314\u2019 snapshot. It can also be switched to the current version, \u2018gpt-3.5-turbo\u2019.I\u2019ll focus only on the most important pieces of the\u00a0code.4.1. Google Drive integration \/\u00a0APISource: AutorThe first two lines of code are used to mount your Google Drive root folder. The main usage is to retrieve the Google Service Account credential key (JSon file) generated within the Quick Start\u00a0section.The code of the next section retrieves a file list of all transcript documents stored in the Google Meet Recording folder. The list will be used later to display these documents on the web application.4.2. Google Meet transcript document text\u00a0extractSource: AutorThese functions are used to extract text elements from a defined Google Document ID. Google Meet generates a paragraph named \u2018Transcript\u2019. The location of the \u2018Transcript\u2019 section is identified and will be used later as a starting point to insert the meeting minutes. The two sections inserted by the application will be located just before this \u2018Transcript\u2019 section. (and right after the \u2018Attendees\u2019 section)4.3. ChatGPT preparation: break down of the transcript text into\u00a0chunksChatGPT API models have a limited number of tokens per request. In order to stay compatible with the \u2018gpt-3.5-turbo\u2019 model, the max value used in the code is 4096 tokens per request. But keep in mind that the \u2018gpt-4\u2019 model can handle much more. A 8k or a 32k models are also available, they can be used to significantly improve the meeting minutes\u2019 quality for long meetings.As a consequence, the Google Meet Transcript document text needs to be broken down into chunks of 4000 tokens with an overlap of 100\u00a0tokens.These functions will prepare and return a list of chunks that will be used later by the ChatGPT\u00a0API.4.4. ChatGPT API\u00a0usageSource: AutorThis function generates the meeting summary and action items in a few steps. A ChatGPT API call is done for each of\u00a0them:Step 1: Summarize the meeting transcript text. The function iterates over the chunk list generated previously. The content sent to ChatGPT is based on the recorded conversation between the attendees. The ChatGPT API is called for each chunk with the following request: \u2018Summarize this meeting transcript: &lt;chunk&gt;\u2019Step 2: Consolidate the response (Meeting summary) from Step 1. The ChatGPT API is called with the following request: \u2018Consolidate these meeting summaries: &lt;ChatGPT responses from Step\u00a01&gt;\u2019Step 3: Get action items with due dates from the transcript. The function iterates over the chunk list generated previously. The ChatGPT API is called for each chunk with the following request: \u2018Provide a list of action items with a due date from the provided meeting transcript text:\u00a0&lt;chunk&gt;\u2019Step 4: Consolidate the meeting action items from Step 3 in a concise numbered list. The ChatGPT API is called with the following request: \u2018Consolidate these meeting action items with a concise numbered list: &lt;ChatGPT responses from Step\u00a03&gt;\u2019Each ChatGPT API used parameter (i.e. \u2018temperature\u2019) is documented in the\u00a0code.4.5. Google Docs API management usage to insert the final meeting\u00a0minutesSource: AutorThe objective of this function is to insert the meeting minutes into the Google Doc selected by the user. The text is inserted before the \u2018Transcript\u2019 paragraph. The start index identified in the previous functions is used here as a starting\u00a0point.Two sections are inserted here: \u2018Meeting Summary\u2019 and \u2018Meeting Action\u00a0items\u2019.Each section\u2019s insertion is done with the following steps:the section\u2019s title is inserted (as a text i.e. \u2018Meeting Summary\u2019)its style is set to \u2018HEADING_1\u2019, its text style is set to \u2018bold\u2019, its font size is set to\u00a0\u201814\u2019the section\u2019s content is inserted (this comes from the ChatGPT API\u00a0result)its style is set to \u2018NORMAL\u2019. A bullet point is also inserted with an arrow for the \u2018Meeting Summary\u2019 section and a checkbox for the \u2018Meeting Action items\u2019\u00a0sectionSome \u2018tabulation\u2019 and \u2018new line\u2019 characters are also inserted to correct the text returned from the ChatGPT\u00a0API.Tip: Please note that the \u2018ar\u2019 table is iterated in a reversed way to ensure the start index position stays always up to date following each text insertion.4.6. The main Python Dash Web ApplicationSource: AutorThis part is used to build a simple web application on which the user can interact. Basically, it displays a list of documents stored on a Google Drive shared folder. The user can select one of them which is displayed in the central part of the screen. Once the button is pressed, the meeting minutes are inserted into this document. The updated document is refreshed with the\u00a0results.This code is built on top of the Dash framework. It even works within a Google Colab notebook.Each document is displayed within a dedicated iFrame. The document\u2019s link is based on \u2018embedLink\u2019 value, previously retrieved by the Google Drive\u00a0API.Also, a progress bar is displayed during the ChatGPT API calls and the Google Doc meeting minutes\u2019 insertion steps.5. Possible improvementsThe main challenge using ChatGPT within your company is to have a leak of sensitive information your company is working on. This happened recently at Samsung where employees have accidentally leaked company secrets with\u00a0ChatGPT.One of the improvements of this code could be the execution of data masking before calling the ChatGPT API. At least the attendee names and additional tagged fields containing sensitive information should be masked. The meeting name could also contain some tags for data masking. I.e \u2018Meeting with &lt;Microsoft&gt;\u2019 where \u2018Microsoft\u2019 will be masked on the entire transcript document data extract. Once the response is received from ChatGPT API, the reverse needs to be done. Each masked information needs to be unmasked before calling the Google Docs\u00a0API.For this, a reference table needs to be used to store each field ID with its clear and its masked value. So these fields could be masked before calling the ChatGPT API, then unmasked when inserting the meeting minutes\u2019 sections with Google Docs\u00a0API.6. The Final\u00a0WordThank you for reading my article to the end, hope you enjoyed\u00a0it!As you can see, ChatGPT 4 API combined with Google Drive\/Docs APIs are very powerful and can contribute significantly to improving your day-to-day work.You can find the entire source code on my GitLab: Meeting Minutes generation with\u00a0ChatGPTGet Certified in ChatGPT + Conversational UX + DialogflowMeeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &amp; Docs APIs was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.<\/p>\n","protected":false},"excerpt":{"rendered":"<div>\n<figure><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1024\/1*jP4qfzAKwbOQeV9_-x4Z_w.png\"><figcaption>Source:generated by OpenAI DALL-E \u201cOil style painting of 5 persons connected on Meet. Robots writing meeting minutes\u201d\u200b<\/figcaption><\/figure>\n<h3>Your meeting minutes generated automatically in a document with ChatGPT right after recording your\u00a0meeting<\/h3>\n<h3>1. Unleash the Power of ChatGPT to Do (Useful)\u00a0Things<\/h3>\n<p>In this technical article, we will explore how to leverage the ChatGPT 4 API along with Google Meet, Google Drive, and Google Docs APIs to automatically generate meeting\u00a0minutes.<\/p>\n<p>Taking minutes during a meeting can be a time-consuming task, and it is often difficult to capture everything that is discussed. With the use of artificial intelligence, the process can be streamlined to ensure that nothing is\u00a0missed.<\/p>\n<p>As Microsoft Teams or Zoom, Google Meet has the ability to record meetings. Once the recording is activated, the transcript of the meeting is generated in a Google Document format and is stored on a defined Google Drive shared folder. Google Meet transcript file is used here but similar transcript text extract could also be done with Teams or Zoom recording.<\/p>\n<p>For this, a simple web application will be used as a central point to manage the user interaction as well as the different API calls. The purpose is to display a list of these meeting transcript documents stored on a predefined Google Drive folder. The user will be able to select one of them then press a button to generate a summary of the meeting minutes as well as the action items with due dates. Also, these two new sections will be inserted in the same Google Document with Google Docs API, containing the results from ChatGPT\u00a0API.<\/p>\n<p>This article will walk you through the steps required to set up the necessary configuration and to understand the Dash\/Python application code used to manage the ChatGPT, Google Drive &amp; Docs\u00a0APIs.<\/p>\n<p>A link to my GitLab containing the full Python\/Dash source code is also available on the next sections.<\/p>\n<p>By the end of this article, I\u2019ll also share my thoughts on some limitations and improvements that could be done on this application. I hope it will allow you to find new ideas on how to stay focused on more valuable tasks than taking meeting\u00a0minutes.<\/p>\n<p>So let\u2019s dive\u00a0in!<\/p>\n<figure><a href=\"https:\/\/www.chatbotconference.com\/\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/785\/1*IzRuohNoCm_0cpyfyO5wRA.png\"><\/a><figcaption>Get Certified in ChatGPT + Conversational UX + Dialogflow<\/figcaption><\/figure>\n<h3>2. Overview of the web application capabilities<\/h3>\n<p>The web application looks like the screen below. The upper section displays a list of transcript documents present on the user\u2019s shared Google Drive folder. Such documents are automatically generated in the \u2018<em>Meet Recordings<\/em>\u2019 folder when the user triggers the Google Meet recording button.<\/p>\n<p>The user can select a document in the list. The selected document is displayed in the central part. Finally, the user can press the button to generate the meeting\u00a0minutes.<\/p>\n<figure><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1024\/0*A93NfVuenMY-nK1E\"><figcaption>The main screen of the web application (Source:\u00a0Autor)<\/figcaption><\/figure>\n<p>Once the button pressed, the Meeting minutes are automatically inserted in 2 new sections:<\/p>\n<p>The \u2018<em>Meeting Summary\u2019<\/em> section is a short description of the meeting based on the meeting transcript. It will stay synthetic whatever the duration of the\u00a0meeting.<\/p>\n<p>The \u2018<em>Meeting Action Items<\/em>\u2019 section is a numbered action items checkbox list which is also based on the transcript. When known, a due date is also inserted.<\/p>\n<figure><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/744\/0*jbayp3rJCQ-xb4bL\"><figcaption>The result: The Meeting Minutes are generated in the selected document (Source:\u00a0Autor)<\/figcaption><\/figure>\n<p>Each numbered meeting action item contains a checkbox that is natively supported by Google Docs. They could be used later on by your teams to follow up the action list and to check them once they are\u00a0done.<\/p>\n<h3>3. Quick\u00a0Start<\/h3>\n<p>The following will allow you to edit and run the code present on my GitLab. Before doing that, you\u2019ll need to register at OpenAI to get your API key. Also, Google Drive and Docs APIs need to be activated on the Google console, as well as creating a Google Service\u00a0Account.<\/p>\n<ul>\n<li>Go to the <a href=\"https:\/\/openai.com\/api\/\">OpenAI website<\/a> and sign up to get your API\u00a0Key<\/li>\n<li>Go to my GitLab project named <a href=\"https:\/\/gitlab.com\/osadey\/meeting-minutes-generation-with-chatgpt\">Meeting Minutes generation with\u00a0ChatGPT<\/a><\/li>\n<li>Edit the Jupyter Python notebook with Google Colab and save it on your own Colab\u00a0folder<\/li>\n<li>Replace the \u2018<em>OPENAI_API_KEY<\/em>\u2019 value in the code with your own api\u00a0key<\/li>\n<li>Use the following link to <a href=\"https:\/\/console.cloud.google.com\/apis\/\">activate the Google Drive &amp; the Google Doc\u00a0APIs<\/a><\/li>\n<li>Use the following link to <a href=\"https:\/\/console.cloud.google.com\/iam-admin\/\">create a Google Service\u00a0Account<\/a><\/li>\n<li>Download and save the Google Service Account Key (JSon File) in your Colab folder. Name it \u2018<em>credentials_serviceaccount.json<\/em>\u2019 (or change the value in the\u00a0code)<\/li>\n<li>Share your \u2018<em>Meet Recordings<\/em>\u2019 Google Drive folder with the Google Service Account created previously (with \u2018<em>Editor<\/em>\u2019 permission)<\/li>\n<li>Attend a Google Meet meeting. Record it with the transcript. The video file and the transcript document will automatically be generated in your \u2018<em>Meet Recordings<\/em>\u2019 Google Drive\u00a0folder<\/li>\n<li>In the code, replace the \u2018<em>GOOGLE_MEET_RECORDING_FOLDER<\/em>\u2019 value with the ID of your \u2018<em>Meet Recordings<\/em>\u2019 Google Drive folder shared previously<\/li>\n<li>Select \u2018<em>Run All<\/em>\u2019 in the \u2018<em>Execution<\/em>\u2019 menu<\/li>\n<li>A WebApp should start in a few seconds. Click on the URL generated in the bottom of the Colab notebook to display\u00a0it<\/li>\n<\/ul>\n<p>The application should look like the first screenshot in the previous\u00a0section.<\/p>\n<h3>4. Understand the main parts of the\u00a0code<\/h3>\n<p>As of today, the ChatGPT 4 API is still in beta. The used version in the code is \u2018<em>gpt-4\u20130314<\/em>\u2019 snapshot. It can also be switched to the current version, \u2018<em>gpt-3.5-turbo<\/em>\u2019.<\/p>\n<p>I\u2019ll focus only on the most important pieces of the\u00a0code.<\/p>\n<p><strong>4.1. Google Drive integration \/\u00a0API<\/strong><\/p>\n<figure><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1024\/0*F1LCTfBljzZTO4WV\"><figcaption>Source: Autor<\/figcaption><\/figure>\n<p>The first two lines of code are used to mount your Google Drive root folder. The main usage is to retrieve the Google Service Account credential key (JSon file) generated within the Quick Start\u00a0section.<\/p>\n<p>The code of the next section retrieves a file list of all transcript documents stored in the Google Meet Recording folder. The list will be used later to display these documents on the web application.<\/p>\n<p><strong>4.2. Google Meet transcript document text\u00a0extract<\/strong><\/p>\n<figure><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1024\/0*zAwaha2rzZhfRt3K\"><figcaption>Source: Autor<\/figcaption><\/figure>\n<p>These functions are used to extract text elements from a defined Google Document ID. Google Meet generates a paragraph named \u2018<em>Transcript<\/em>\u2019. The location of the \u2018<em>Transcript<\/em>\u2019 section is identified and will be used later as a starting point to insert the meeting minutes. The two sections inserted by the application will be located just before this \u2018<em>Transcript<\/em>\u2019 section. (and right after the \u2018<em>Attendees<\/em>\u2019 section)<\/p>\n<p><strong>4.3. ChatGPT preparation: break down of the transcript text into\u00a0chunks<\/strong><\/p>\n<p>ChatGPT API models have a limited number of tokens per request. In order to stay compatible with the \u2018<em>gpt-3.5-turbo<\/em>\u2019 model, the max value used in the code is 4096 tokens per request. But keep in mind that the \u2018<em>gpt-4<\/em>\u2019 model can handle much more. A 8k or a 32k models are also available, they can be used to significantly improve the meeting minutes\u2019 quality for long meetings.<\/p>\n<p>As a consequence, the Google Meet Transcript document text needs to be broken down into chunks of 4000 tokens with an overlap of 100\u00a0tokens.<\/p>\n<p>These functions will prepare and return a list of chunks that will be used later by the ChatGPT\u00a0API.<\/p>\n<p><strong>4.4. ChatGPT API\u00a0usage<\/strong><\/p>\n<figure><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1024\/0*D10hRUFpZLNmr35S\"><figcaption>Source: Autor<\/figcaption><\/figure>\n<p>This function generates the meeting summary and action items in a few steps. A ChatGPT API call is done for each of\u00a0them:<\/p>\n<ul>\n<li>Step 1: Summarize the meeting transcript text. The function iterates over the chunk list generated previously. The content sent to ChatGPT is based on the recorded conversation between the attendees. The ChatGPT API is called for each chunk with the following request: \u2018<em>Summarize this meeting transcript: &lt;chunk&gt;<\/em>\u2019<\/li>\n<li>Step 2: Consolidate the response (Meeting summary) from Step 1. The ChatGPT API is called with the following request: \u2018<em>Consolidate these meeting summaries: &lt;ChatGPT responses from Step\u00a01&gt;<\/em>\u2019<\/li>\n<li>Step 3: Get action items with due dates from the transcript. The function iterates over the chunk list generated previously. The ChatGPT API is called for each chunk with the following request: \u2018<em>Provide a list of action items with a due date from the provided meeting transcript text:\u00a0&lt;chunk&gt;<\/em>\u2019<\/li>\n<li>Step 4: Consolidate the meeting action items from Step 3 in a concise numbered list. The ChatGPT API is called with the following request: \u2018<em>Consolidate these meeting action items with a concise numbered list: &lt;ChatGPT responses from Step\u00a03&gt;<\/em>\u2019<\/li>\n<\/ul>\n<p>Each ChatGPT API used parameter (i.e. \u2018<em>temperature<\/em>\u2019) is documented in the\u00a0code.<\/p>\n<p><strong>4.5. Google Docs API management usage to insert the final meeting\u00a0minutes<\/strong><\/p>\n<figure><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1024\/0*KYl2mmwgjFnfUoe4\"><figcaption>Source: Autor<\/figcaption><\/figure>\n<p>The objective of this function is to insert the meeting minutes into the Google Doc selected by the user. The text is inserted before the \u2018<em>Transcript<\/em>\u2019 paragraph. The start index identified in the previous functions is used here as a starting\u00a0point.<\/p>\n<p>Two sections are inserted here: \u2018<em>Meeting Summary<\/em>\u2019 and \u2018<em>Meeting Action\u00a0items<\/em>\u2019.<\/p>\n<p>Each section\u2019s insertion is done with the following steps:<\/p>\n<ul>\n<li>the section\u2019s title is inserted (as a text i.e. \u2018<em>Meeting Summary<\/em>\u2019)<\/li>\n<li>its style is set to \u2018<em>HEADING_1<\/em>\u2019, its text style is set to \u2018<em>bold<\/em>\u2019, its font size is set to\u00a0\u2018<em>14<\/em>\u2019<\/li>\n<li>the section\u2019s content is inserted (this comes from the ChatGPT API\u00a0result)<\/li>\n<li>its style is set to \u2018<em>NORMAL<\/em>\u2019. A bullet point is also inserted with an arrow for the \u2018<em>Meeting Summary<\/em>\u2019 section and a checkbox for the \u2018<em>Meeting Action items<\/em>\u2019\u00a0section<\/li>\n<\/ul>\n<p>Some \u2018<em>tabulation<\/em>\u2019 and \u2018<em>new line<\/em>\u2019 characters are also inserted to correct the text returned from the ChatGPT\u00a0API.<\/p>\n<p>Tip: Please note that the \u2018<em>ar<\/em>\u2019 table is iterated in a reversed way to ensure the start index position stays always up to date following each text insertion.<\/p>\n<p><strong>4.6. The main Python Dash Web Application<\/strong><\/p>\n<figure><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1024\/0*em9ueksKFbkMgTIh\"><figcaption>Source: Autor<\/figcaption><\/figure>\n<p>This part is used to build a simple web application on which the user can interact. Basically, it displays a list of documents stored on a Google Drive shared folder. The user can select one of them which is displayed in the central part of the screen. Once the button is pressed, the meeting minutes are inserted into this document. The updated document is refreshed with the\u00a0results.<\/p>\n<p>This code is built on top of the Dash framework. It even works within a Google Colab notebook.<\/p>\n<p>Each document is displayed within a dedicated iFrame. The document\u2019s link is based on \u2018<em>embedLink<\/em>\u2019 value, previously retrieved by the Google Drive\u00a0API.<\/p>\n<p>Also, a progress bar is displayed during the ChatGPT API calls and the Google Doc meeting minutes\u2019 insertion steps.<\/p>\n<h3>5. Possible improvements<\/h3>\n<p>The main challenge using ChatGPT within your company is to have a leak of sensitive information your company is working on. This happened recently at <a href=\"https:\/\/www.businesstoday.in\/technology\/news\/story\/samsung-employees-accidentally-leaked-company-secrets-via-chatgpt-heres-what-happened-376375-2023-04-06\">Samsung where employees have accidentally leaked company secrets with\u00a0ChatGPT<\/a>.<\/p>\n<p>One of the improvements of this code could be the execution of data masking before calling the ChatGPT API. At least the attendee names and additional tagged fields containing sensitive information should be masked. The meeting name could also contain some tags for data masking. I.e \u2018<em>Meeting with &lt;Microsoft&gt;<\/em>\u2019 where \u2018<em>Microsoft<\/em>\u2019 will be masked on the entire transcript document data extract. Once the response is received from ChatGPT API, the reverse needs to be done. Each masked information needs to be unmasked before calling the Google Docs\u00a0API.<\/p>\n<p>For this, a reference table needs to be used to store each field ID with its clear and its masked value. So these fields could be masked before calling the ChatGPT API, then unmasked when inserting the meeting minutes\u2019 sections with Google Docs\u00a0API.<\/p>\n<h3>6. The Final\u00a0Word<\/h3>\n<p>Thank you for reading my article to the end, hope you enjoyed\u00a0it!<\/p>\n<p>As you can see, ChatGPT 4 API combined with Google Drive\/Docs APIs are very powerful and can contribute significantly to improving your day-to-day work.<\/p>\n<p>You can find the entire source code on my GitLab: <a href=\"https:\/\/gitlab.com\/osadey\/meeting-minutes-generation-with-chatgpt\">Meeting Minutes generation with\u00a0ChatGPT<\/a><\/p>\n<figure><a href=\"https:\/\/www.chatbotconference.com\/\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/cdn-images-1.medium.com\/max\/628\/1*xitlhCGWSRlBmm_6KwmMNw.png\"><\/a><figcaption>Get Certified in ChatGPT + Conversational UX + Dialogflow<\/figcaption><\/figure>\n<p><img decoding=\"async\" src=\"https:\/\/medium.com\/_\/stat?event=post.clientViewed&amp;referrerSource=full_rss&amp;postId=8cba0e1710bc\" width=\"1\" height=\"1\" alt=\"\"><\/p>\n<hr>\n<p><a href=\"https:\/\/becominghuman.ai\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis-8cba0e1710bc\">Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &amp; Docs APIs<\/a> was originally published in <a href=\"https:\/\/becominghuman.ai\/\">Becoming Human: Artificial Intelligence Magazine<\/a> on Medium, where people are continuing the conversation by highlighting and responding to this story.<\/p>\n<\/div>\n","protected":false},"author":2,"featured_media":171,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[18,27,29,26,28,1],"tags":[10],"class_list":["post-170","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chatgpt","category-dash","category-google-docs","category-programming","category-python","category-top-ai-news","tag-aimastermindscourse-aimastermind-aicourses-getcertifiedinai"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &amp; Docs APIs - AI Mastermind Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &amp; Docs APIs - AI Mastermind Blog\" \/>\n<meta property=\"og:description\" content=\"Source:generated by OpenAI DALL-E \u201cOil style painting of 5 persons connected on Meet. Robots writing meeting minutes\u201d\u200bYour meeting minutes generated automatically in a document with ChatGPT right after recording your\u00a0meeting1. Unleash the Power of ChatGPT to Do (Useful)\u00a0ThingsIn this technical article, we will explore how to leverage the ChatGPT 4 API along with Google Meet, Google Drive, and Google Docs APIs to automatically generate meeting\u00a0minutes.Taking minutes during a meeting can be a time-consuming task, and it is often difficult to capture everything that is discussed. With the use of artificial intelligence, the process can be streamlined to ensure that nothing is\u00a0missed.As Microsoft Teams or Zoom, Google Meet has the ability to record meetings. Once the recording is activated, the transcript of the meeting is generated in a Google Document format and is stored on a defined Google Drive shared folder. Google Meet transcript file is used here but similar transcript text extract could also be done with Teams or Zoom recording.For this, a simple web application will be used as a central point to manage the user interaction as well as the different API calls. The purpose is to display a list of these meeting transcript documents stored on a predefined Google Drive folder. The user will be able to select one of them then press a button to generate a summary of the meeting minutes as well as the action items with due dates. Also, these two new sections will be inserted in the same Google Document with Google Docs API, containing the results from ChatGPT\u00a0API.This article will walk you through the steps required to set up the necessary configuration and to understand the Dash\/Python application code used to manage the ChatGPT, Google Drive &amp; Docs\u00a0APIs.A link to my GitLab containing the full Python\/Dash source code is also available on the next sections.By the end of this article, I\u2019ll also share my thoughts on some limitations and improvements that could be done on this application. I hope it will allow you to find new ideas on how to stay focused on more valuable tasks than taking meeting\u00a0minutes.So let\u2019s dive\u00a0in!Get Certified in ChatGPT + Conversational UX + Dialogflow2. Overview of the web application capabilitiesThe web application looks like the screen below. The upper section displays a list of transcript documents present on the user\u2019s shared Google Drive folder. Such documents are automatically generated in the \u2018Meet Recordings\u2019 folder when the user triggers the Google Meet recording button.The user can select a document in the list. The selected document is displayed in the central part. Finally, the user can press the button to generate the meeting\u00a0minutes.The main screen of the web application (Source:\u00a0Autor)Once the button pressed, the Meeting minutes are automatically inserted in 2 new sections:The \u2018Meeting Summary\u2019 section is a short description of the meeting based on the meeting transcript. It will stay synthetic whatever the duration of the\u00a0meeting.The \u2018Meeting Action Items\u2019 section is a numbered action items checkbox list which is also based on the transcript. When known, a due date is also inserted.The result: The Meeting Minutes are generated in the selected document (Source:\u00a0Autor)Each numbered meeting action item contains a checkbox that is natively supported by Google Docs. They could be used later on by your teams to follow up the action list and to check them once they are\u00a0done.3. Quick\u00a0StartThe following will allow you to edit and run the code present on my GitLab. Before doing that, you\u2019ll need to register at OpenAI to get your API key. Also, Google Drive and Docs APIs need to be activated on the Google console, as well as creating a Google Service\u00a0Account.Go to the OpenAI website and sign up to get your API\u00a0KeyGo to my GitLab project named Meeting Minutes generation with\u00a0ChatGPTEdit the Jupyter Python notebook with Google Colab and save it on your own Colab\u00a0folderReplace the \u2018OPENAI_API_KEY\u2019 value in the code with your own api\u00a0keyUse the following link to activate the Google Drive &amp; the Google Doc\u00a0APIsUse the following link to create a Google Service\u00a0AccountDownload and save the Google Service Account Key (JSon File) in your Colab folder. Name it \u2018credentials_serviceaccount.json\u2019 (or change the value in the\u00a0code)Share your \u2018Meet Recordings\u2019 Google Drive folder with the Google Service Account created previously (with \u2018Editor\u2019 permission)Attend a Google Meet meeting. Record it with the transcript. The video file and the transcript document will automatically be generated in your \u2018Meet Recordings\u2019 Google Drive\u00a0folderIn the code, replace the \u2018GOOGLE_MEET_RECORDING_FOLDER\u2019 value with the ID of your \u2018Meet Recordings\u2019 Google Drive folder shared previouslySelect \u2018Run All\u2019 in the \u2018Execution\u2019 menuA WebApp should start in a few seconds. Click on the URL generated in the bottom of the Colab notebook to display\u00a0itThe application should look like the first screenshot in the previous\u00a0section.4. Understand the main parts of the\u00a0codeAs of today, the ChatGPT 4 API is still in beta. The used version in the code is \u2018gpt-4\u20130314\u2019 snapshot. It can also be switched to the current version, \u2018gpt-3.5-turbo\u2019.I\u2019ll focus only on the most important pieces of the\u00a0code.4.1. Google Drive integration \/\u00a0APISource: AutorThe first two lines of code are used to mount your Google Drive root folder. The main usage is to retrieve the Google Service Account credential key (JSon file) generated within the Quick Start\u00a0section.The code of the next section retrieves a file list of all transcript documents stored in the Google Meet Recording folder. The list will be used later to display these documents on the web application.4.2. Google Meet transcript document text\u00a0extractSource: AutorThese functions are used to extract text elements from a defined Google Document ID. Google Meet generates a paragraph named \u2018Transcript\u2019. The location of the \u2018Transcript\u2019 section is identified and will be used later as a starting point to insert the meeting minutes. The two sections inserted by the application will be located just before this \u2018Transcript\u2019 section. (and right after the \u2018Attendees\u2019 section)4.3. ChatGPT preparation: break down of the transcript text into\u00a0chunksChatGPT API models have a limited number of tokens per request. In order to stay compatible with the \u2018gpt-3.5-turbo\u2019 model, the max value used in the code is 4096 tokens per request. But keep in mind that the \u2018gpt-4\u2019 model can handle much more. A 8k or a 32k models are also available, they can be used to significantly improve the meeting minutes\u2019 quality for long meetings.As a consequence, the Google Meet Transcript document text needs to be broken down into chunks of 4000 tokens with an overlap of 100\u00a0tokens.These functions will prepare and return a list of chunks that will be used later by the ChatGPT\u00a0API.4.4. ChatGPT API\u00a0usageSource: AutorThis function generates the meeting summary and action items in a few steps. A ChatGPT API call is done for each of\u00a0them:Step 1: Summarize the meeting transcript text. The function iterates over the chunk list generated previously. The content sent to ChatGPT is based on the recorded conversation between the attendees. The ChatGPT API is called for each chunk with the following request: \u2018Summarize this meeting transcript: &lt;chunk&gt;\u2019Step 2: Consolidate the response (Meeting summary) from Step 1. The ChatGPT API is called with the following request: \u2018Consolidate these meeting summaries: &lt;ChatGPT responses from Step\u00a01&gt;\u2019Step 3: Get action items with due dates from the transcript. The function iterates over the chunk list generated previously. The ChatGPT API is called for each chunk with the following request: \u2018Provide a list of action items with a due date from the provided meeting transcript text:\u00a0&lt;chunk&gt;\u2019Step 4: Consolidate the meeting action items from Step 3 in a concise numbered list. The ChatGPT API is called with the following request: \u2018Consolidate these meeting action items with a concise numbered list: &lt;ChatGPT responses from Step\u00a03&gt;\u2019Each ChatGPT API used parameter (i.e. \u2018temperature\u2019) is documented in the\u00a0code.4.5. Google Docs API management usage to insert the final meeting\u00a0minutesSource: AutorThe objective of this function is to insert the meeting minutes into the Google Doc selected by the user. The text is inserted before the \u2018Transcript\u2019 paragraph. The start index identified in the previous functions is used here as a starting\u00a0point.Two sections are inserted here: \u2018Meeting Summary\u2019 and \u2018Meeting Action\u00a0items\u2019.Each section\u2019s insertion is done with the following steps:the section\u2019s title is inserted (as a text i.e. \u2018Meeting Summary\u2019)its style is set to \u2018HEADING_1\u2019, its text style is set to \u2018bold\u2019, its font size is set to\u00a0\u201814\u2019the section\u2019s content is inserted (this comes from the ChatGPT API\u00a0result)its style is set to \u2018NORMAL\u2019. A bullet point is also inserted with an arrow for the \u2018Meeting Summary\u2019 section and a checkbox for the \u2018Meeting Action items\u2019\u00a0sectionSome \u2018tabulation\u2019 and \u2018new line\u2019 characters are also inserted to correct the text returned from the ChatGPT\u00a0API.Tip: Please note that the \u2018ar\u2019 table is iterated in a reversed way to ensure the start index position stays always up to date following each text insertion.4.6. The main Python Dash Web ApplicationSource: AutorThis part is used to build a simple web application on which the user can interact. Basically, it displays a list of documents stored on a Google Drive shared folder. The user can select one of them which is displayed in the central part of the screen. Once the button is pressed, the meeting minutes are inserted into this document. The updated document is refreshed with the\u00a0results.This code is built on top of the Dash framework. It even works within a Google Colab notebook.Each document is displayed within a dedicated iFrame. The document\u2019s link is based on \u2018embedLink\u2019 value, previously retrieved by the Google Drive\u00a0API.Also, a progress bar is displayed during the ChatGPT API calls and the Google Doc meeting minutes\u2019 insertion steps.5. Possible improvementsThe main challenge using ChatGPT within your company is to have a leak of sensitive information your company is working on. This happened recently at Samsung where employees have accidentally leaked company secrets with\u00a0ChatGPT.One of the improvements of this code could be the execution of data masking before calling the ChatGPT API. At least the attendee names and additional tagged fields containing sensitive information should be masked. The meeting name could also contain some tags for data masking. I.e \u2018Meeting with &lt;Microsoft&gt;\u2019 where \u2018Microsoft\u2019 will be masked on the entire transcript document data extract. Once the response is received from ChatGPT API, the reverse needs to be done. Each masked information needs to be unmasked before calling the Google Docs\u00a0API.For this, a reference table needs to be used to store each field ID with its clear and its masked value. So these fields could be masked before calling the ChatGPT API, then unmasked when inserting the meeting minutes\u2019 sections with Google Docs\u00a0API.6. The Final\u00a0WordThank you for reading my article to the end, hope you enjoyed\u00a0it!As you can see, ChatGPT 4 API combined with Google Drive\/Docs APIs are very powerful and can contribute significantly to improving your day-to-day work.You can find the entire source code on my GitLab: Meeting Minutes generation with\u00a0ChatGPTGet Certified in ChatGPT + Conversational UX + DialogflowMeeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &amp; Docs APIs was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/\" \/>\n<meta property=\"og:site_name\" content=\"AI Mastermind Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-26T20:59:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/aimastermindscourse.com\/getcertified\/wp-content\/uploads\/2024\/01\/ai-mastermind.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"343\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"abbey4323\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@aimastermindco\" \/>\n<meta name=\"twitter:site\" content=\"@aimastermindco\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"abbey4323\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/\"},\"author\":{\"name\":\"abbey4323\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/person\/9ad25e00282b80219b15f1f2d0892861\"},\"headline\":\"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &#038; Docs APIs\",\"datePublished\":\"2024-01-26T20:59:26+00:00\",\"dateModified\":\"2024-01-26T20:59:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/\"},\"wordCount\":1957,\"publisher\":{\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#organization\"},\"keywords\":[\"#aimastermindscourse #aimastermind #aicourses #getcertifiedinai\"],\"articleSection\":[\"chatgpt\",\"dash\",\"google-docs\",\"programming\",\"python\",\"Top AI News\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/\",\"url\":\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/\",\"name\":\"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive & Docs APIs - AI Mastermind Blog\",\"isPartOf\":{\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#website\"},\"datePublished\":\"2024-01-26T20:59:26+00:00\",\"dateModified\":\"2024-01-26T20:59:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/aimastermindscourse.com\/getcertified\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &#038; Docs APIs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#website\",\"url\":\"https:\/\/aimastermindscourse.com\/getcertified\/\",\"name\":\"AI Mastermind Blog\",\"description\":\"Applying Artificial Intelligence in Everyday Life\",\"publisher\":{\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#organization\"},\"alternateName\":\"aimastermindscourse.com\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/aimastermindscourse.com\/getcertified\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#organization\",\"name\":\"AI Mastermind Blog\",\"url\":\"https:\/\/aimastermindscourse.com\/getcertified\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/aimastermindscourse.com\/getcertified\/wp-content\/uploads\/2024\/01\/ai-mastermind.png\",\"contentUrl\":\"https:\/\/aimastermindscourse.com\/getcertified\/wp-content\/uploads\/2024\/01\/ai-mastermind.png\",\"width\":600,\"height\":343,\"caption\":\"AI Mastermind Blog\"},\"image\":{\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/twitter.com\/aimastermindco\",\"https:\/\/www.linkedin.com\/company\/ai-mastermind-course\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/person\/9ad25e00282b80219b15f1f2d0892861\",\"name\":\"abbey4323\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/228dbb023e11f78c9917991b54566b846cb44d66f6e273c864d2e5b0237429f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/228dbb023e11f78c9917991b54566b846cb44d66f6e273c864d2e5b0237429f4?s=96&d=mm&r=g\",\"caption\":\"abbey4323\"},\"url\":\"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/author\/abbey4323\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive & Docs APIs - AI Mastermind Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/","og_locale":"en_US","og_type":"article","og_title":"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive & Docs APIs - AI Mastermind Blog","og_description":"Source:generated by OpenAI DALL-E \u201cOil style painting of 5 persons connected on Meet. Robots writing meeting minutes\u201d\u200bYour meeting minutes generated automatically in a document with ChatGPT right after recording your\u00a0meeting1. Unleash the Power of ChatGPT to Do (Useful)\u00a0ThingsIn this technical article, we will explore how to leverage the ChatGPT 4 API along with Google Meet, Google Drive, and Google Docs APIs to automatically generate meeting\u00a0minutes.Taking minutes during a meeting can be a time-consuming task, and it is often difficult to capture everything that is discussed. With the use of artificial intelligence, the process can be streamlined to ensure that nothing is\u00a0missed.As Microsoft Teams or Zoom, Google Meet has the ability to record meetings. Once the recording is activated, the transcript of the meeting is generated in a Google Document format and is stored on a defined Google Drive shared folder. Google Meet transcript file is used here but similar transcript text extract could also be done with Teams or Zoom recording.For this, a simple web application will be used as a central point to manage the user interaction as well as the different API calls. The purpose is to display a list of these meeting transcript documents stored on a predefined Google Drive folder. The user will be able to select one of them then press a button to generate a summary of the meeting minutes as well as the action items with due dates. Also, these two new sections will be inserted in the same Google Document with Google Docs API, containing the results from ChatGPT\u00a0API.This article will walk you through the steps required to set up the necessary configuration and to understand the Dash\/Python application code used to manage the ChatGPT, Google Drive &amp; Docs\u00a0APIs.A link to my GitLab containing the full Python\/Dash source code is also available on the next sections.By the end of this article, I\u2019ll also share my thoughts on some limitations and improvements that could be done on this application. I hope it will allow you to find new ideas on how to stay focused on more valuable tasks than taking meeting\u00a0minutes.So let\u2019s dive\u00a0in!Get Certified in ChatGPT + Conversational UX + Dialogflow2. Overview of the web application capabilitiesThe web application looks like the screen below. The upper section displays a list of transcript documents present on the user\u2019s shared Google Drive folder. Such documents are automatically generated in the \u2018Meet Recordings\u2019 folder when the user triggers the Google Meet recording button.The user can select a document in the list. The selected document is displayed in the central part. Finally, the user can press the button to generate the meeting\u00a0minutes.The main screen of the web application (Source:\u00a0Autor)Once the button pressed, the Meeting minutes are automatically inserted in 2 new sections:The \u2018Meeting Summary\u2019 section is a short description of the meeting based on the meeting transcript. It will stay synthetic whatever the duration of the\u00a0meeting.The \u2018Meeting Action Items\u2019 section is a numbered action items checkbox list which is also based on the transcript. When known, a due date is also inserted.The result: The Meeting Minutes are generated in the selected document (Source:\u00a0Autor)Each numbered meeting action item contains a checkbox that is natively supported by Google Docs. They could be used later on by your teams to follow up the action list and to check them once they are\u00a0done.3. Quick\u00a0StartThe following will allow you to edit and run the code present on my GitLab. Before doing that, you\u2019ll need to register at OpenAI to get your API key. Also, Google Drive and Docs APIs need to be activated on the Google console, as well as creating a Google Service\u00a0Account.Go to the OpenAI website and sign up to get your API\u00a0KeyGo to my GitLab project named Meeting Minutes generation with\u00a0ChatGPTEdit the Jupyter Python notebook with Google Colab and save it on your own Colab\u00a0folderReplace the \u2018OPENAI_API_KEY\u2019 value in the code with your own api\u00a0keyUse the following link to activate the Google Drive &amp; the Google Doc\u00a0APIsUse the following link to create a Google Service\u00a0AccountDownload and save the Google Service Account Key (JSon File) in your Colab folder. Name it \u2018credentials_serviceaccount.json\u2019 (or change the value in the\u00a0code)Share your \u2018Meet Recordings\u2019 Google Drive folder with the Google Service Account created previously (with \u2018Editor\u2019 permission)Attend a Google Meet meeting. Record it with the transcript. The video file and the transcript document will automatically be generated in your \u2018Meet Recordings\u2019 Google Drive\u00a0folderIn the code, replace the \u2018GOOGLE_MEET_RECORDING_FOLDER\u2019 value with the ID of your \u2018Meet Recordings\u2019 Google Drive folder shared previouslySelect \u2018Run All\u2019 in the \u2018Execution\u2019 menuA WebApp should start in a few seconds. Click on the URL generated in the bottom of the Colab notebook to display\u00a0itThe application should look like the first screenshot in the previous\u00a0section.4. Understand the main parts of the\u00a0codeAs of today, the ChatGPT 4 API is still in beta. The used version in the code is \u2018gpt-4\u20130314\u2019 snapshot. It can also be switched to the current version, \u2018gpt-3.5-turbo\u2019.I\u2019ll focus only on the most important pieces of the\u00a0code.4.1. Google Drive integration \/\u00a0APISource: AutorThe first two lines of code are used to mount your Google Drive root folder. The main usage is to retrieve the Google Service Account credential key (JSon file) generated within the Quick Start\u00a0section.The code of the next section retrieves a file list of all transcript documents stored in the Google Meet Recording folder. The list will be used later to display these documents on the web application.4.2. Google Meet transcript document text\u00a0extractSource: AutorThese functions are used to extract text elements from a defined Google Document ID. Google Meet generates a paragraph named \u2018Transcript\u2019. The location of the \u2018Transcript\u2019 section is identified and will be used later as a starting point to insert the meeting minutes. The two sections inserted by the application will be located just before this \u2018Transcript\u2019 section. (and right after the \u2018Attendees\u2019 section)4.3. ChatGPT preparation: break down of the transcript text into\u00a0chunksChatGPT API models have a limited number of tokens per request. In order to stay compatible with the \u2018gpt-3.5-turbo\u2019 model, the max value used in the code is 4096 tokens per request. But keep in mind that the \u2018gpt-4\u2019 model can handle much more. A 8k or a 32k models are also available, they can be used to significantly improve the meeting minutes\u2019 quality for long meetings.As a consequence, the Google Meet Transcript document text needs to be broken down into chunks of 4000 tokens with an overlap of 100\u00a0tokens.These functions will prepare and return a list of chunks that will be used later by the ChatGPT\u00a0API.4.4. ChatGPT API\u00a0usageSource: AutorThis function generates the meeting summary and action items in a few steps. A ChatGPT API call is done for each of\u00a0them:Step 1: Summarize the meeting transcript text. The function iterates over the chunk list generated previously. The content sent to ChatGPT is based on the recorded conversation between the attendees. The ChatGPT API is called for each chunk with the following request: \u2018Summarize this meeting transcript: &lt;chunk&gt;\u2019Step 2: Consolidate the response (Meeting summary) from Step 1. The ChatGPT API is called with the following request: \u2018Consolidate these meeting summaries: &lt;ChatGPT responses from Step\u00a01&gt;\u2019Step 3: Get action items with due dates from the transcript. The function iterates over the chunk list generated previously. The ChatGPT API is called for each chunk with the following request: \u2018Provide a list of action items with a due date from the provided meeting transcript text:\u00a0&lt;chunk&gt;\u2019Step 4: Consolidate the meeting action items from Step 3 in a concise numbered list. The ChatGPT API is called with the following request: \u2018Consolidate these meeting action items with a concise numbered list: &lt;ChatGPT responses from Step\u00a03&gt;\u2019Each ChatGPT API used parameter (i.e. \u2018temperature\u2019) is documented in the\u00a0code.4.5. Google Docs API management usage to insert the final meeting\u00a0minutesSource: AutorThe objective of this function is to insert the meeting minutes into the Google Doc selected by the user. The text is inserted before the \u2018Transcript\u2019 paragraph. The start index identified in the previous functions is used here as a starting\u00a0point.Two sections are inserted here: \u2018Meeting Summary\u2019 and \u2018Meeting Action\u00a0items\u2019.Each section\u2019s insertion is done with the following steps:the section\u2019s title is inserted (as a text i.e. \u2018Meeting Summary\u2019)its style is set to \u2018HEADING_1\u2019, its text style is set to \u2018bold\u2019, its font size is set to\u00a0\u201814\u2019the section\u2019s content is inserted (this comes from the ChatGPT API\u00a0result)its style is set to \u2018NORMAL\u2019. A bullet point is also inserted with an arrow for the \u2018Meeting Summary\u2019 section and a checkbox for the \u2018Meeting Action items\u2019\u00a0sectionSome \u2018tabulation\u2019 and \u2018new line\u2019 characters are also inserted to correct the text returned from the ChatGPT\u00a0API.Tip: Please note that the \u2018ar\u2019 table is iterated in a reversed way to ensure the start index position stays always up to date following each text insertion.4.6. The main Python Dash Web ApplicationSource: AutorThis part is used to build a simple web application on which the user can interact. Basically, it displays a list of documents stored on a Google Drive shared folder. The user can select one of them which is displayed in the central part of the screen. Once the button is pressed, the meeting minutes are inserted into this document. The updated document is refreshed with the\u00a0results.This code is built on top of the Dash framework. It even works within a Google Colab notebook.Each document is displayed within a dedicated iFrame. The document\u2019s link is based on \u2018embedLink\u2019 value, previously retrieved by the Google Drive\u00a0API.Also, a progress bar is displayed during the ChatGPT API calls and the Google Doc meeting minutes\u2019 insertion steps.5. Possible improvementsThe main challenge using ChatGPT within your company is to have a leak of sensitive information your company is working on. This happened recently at Samsung where employees have accidentally leaked company secrets with\u00a0ChatGPT.One of the improvements of this code could be the execution of data masking before calling the ChatGPT API. At least the attendee names and additional tagged fields containing sensitive information should be masked. The meeting name could also contain some tags for data masking. I.e \u2018Meeting with &lt;Microsoft&gt;\u2019 where \u2018Microsoft\u2019 will be masked on the entire transcript document data extract. Once the response is received from ChatGPT API, the reverse needs to be done. Each masked information needs to be unmasked before calling the Google Docs\u00a0API.For this, a reference table needs to be used to store each field ID with its clear and its masked value. So these fields could be masked before calling the ChatGPT API, then unmasked when inserting the meeting minutes\u2019 sections with Google Docs\u00a0API.6. The Final\u00a0WordThank you for reading my article to the end, hope you enjoyed\u00a0it!As you can see, ChatGPT 4 API combined with Google Drive\/Docs APIs are very powerful and can contribute significantly to improving your day-to-day work.You can find the entire source code on my GitLab: Meeting Minutes generation with\u00a0ChatGPTGet Certified in ChatGPT + Conversational UX + DialogflowMeeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &amp; Docs APIs was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.","og_url":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/","og_site_name":"AI Mastermind Blog","article_published_time":"2024-01-26T20:59:26+00:00","og_image":[{"width":600,"height":343,"url":"https:\/\/aimastermindscourse.com\/getcertified\/wp-content\/uploads\/2024\/01\/ai-mastermind.png","type":"image\/png"}],"author":"abbey4323","twitter_card":"summary_large_image","twitter_creator":"@aimastermindco","twitter_site":"@aimastermindco","twitter_misc":{"Written by":"abbey4323","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/#article","isPartOf":{"@id":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/"},"author":{"name":"abbey4323","@id":"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/person\/9ad25e00282b80219b15f1f2d0892861"},"headline":"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &#038; Docs APIs","datePublished":"2024-01-26T20:59:26+00:00","dateModified":"2024-01-26T20:59:26+00:00","mainEntityOfPage":{"@id":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/"},"wordCount":1957,"publisher":{"@id":"https:\/\/aimastermindscourse.com\/getcertified\/#organization"},"keywords":["#aimastermindscourse #aimastermind #aicourses #getcertifiedinai"],"articleSection":["chatgpt","dash","google-docs","programming","python","Top AI News"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/","url":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/","name":"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive & Docs APIs - AI Mastermind Blog","isPartOf":{"@id":"https:\/\/aimastermindscourse.com\/getcertified\/#website"},"datePublished":"2024-01-26T20:59:26+00:00","dateModified":"2024-01-26T20:59:26+00:00","breadcrumb":{"@id":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/2024\/01\/26\/meeting-minutes-generation-with-chatgpt-4-api-google-meet-google-drive-docs-apis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/aimastermindscourse.com\/getcertified\/"},{"@type":"ListItem","position":2,"name":"Meeting minutes generation with ChatGPT 4 API, Google Meet, Google Drive &#038; Docs APIs"}]},{"@type":"WebSite","@id":"https:\/\/aimastermindscourse.com\/getcertified\/#website","url":"https:\/\/aimastermindscourse.com\/getcertified\/","name":"AI Mastermind Blog","description":"Applying Artificial Intelligence in Everyday Life","publisher":{"@id":"https:\/\/aimastermindscourse.com\/getcertified\/#organization"},"alternateName":"aimastermindscourse.com","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/aimastermindscourse.com\/getcertified\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/aimastermindscourse.com\/getcertified\/#organization","name":"AI Mastermind Blog","url":"https:\/\/aimastermindscourse.com\/getcertified\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/logo\/image\/","url":"https:\/\/aimastermindscourse.com\/getcertified\/wp-content\/uploads\/2024\/01\/ai-mastermind.png","contentUrl":"https:\/\/aimastermindscourse.com\/getcertified\/wp-content\/uploads\/2024\/01\/ai-mastermind.png","width":600,"height":343,"caption":"AI Mastermind Blog"},"image":{"@id":"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/twitter.com\/aimastermindco","https:\/\/www.linkedin.com\/company\/ai-mastermind-course\/"]},{"@type":"Person","@id":"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/person\/9ad25e00282b80219b15f1f2d0892861","name":"abbey4323","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/aimastermindscourse.com\/getcertified\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/228dbb023e11f78c9917991b54566b846cb44d66f6e273c864d2e5b0237429f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/228dbb023e11f78c9917991b54566b846cb44d66f6e273c864d2e5b0237429f4?s=96&d=mm&r=g","caption":"abbey4323"},"url":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/author\/abbey4323\/"}]}},"jetpack_featured_media_url":"https:\/\/aimastermindscourse.com\/getcertified\/wp-content\/uploads\/2024\/01\/12AjP4qfzAKwbOQeV9_-x4Z_w.png","_links":{"self":[{"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":0,"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/media\/171"}],"wp:attachment":[{"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aimastermindscourse.com\/getcertified\/index.php\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}