Learn how to use the ChatGPT 4 API in combination with Google Meet, Google Drive, and Google Docs APIs to automatically generate meeting minutes. Taking minutes during a meeting can be time-consuming and challenging to capture everything. However, with artificial intelligence, the process can be streamlined to ensure nothing is missed.
To do this, we’ll use a simple web application as a central point for user interaction and API calls. The application will display a list of meeting transcript documents stored in a designated Google Drive folder. Users can select a document and click a button to generate a summary of the meeting minutes and action items with due dates. These two sections will be inserted into the selected Google Document using the Google Docs API, utilizing the results from the ChatGPT API.
In this article, we’ll guide you through the necessary configuration and provide an understanding of the Dash/Python application code used to manage the ChatGPT, Google Drive, and Google Docs APIs. You can find the full Python/Dash source code on my GitLab.
By the end of this article, we’ll also discuss limitations and potential improvements for the application. Our goal is to help you find new ways to focus on more valuable tasks instead of spending time on meeting minutes.
The web application consists of a screen that displays a list of transcript documents from the user’s shared Google Drive folder. These documents are automatically created in the “Meet Recordings” folder when the user starts recording a Google Meet session. Users can select a document from the list, which will be shown in the center of the screen. Finally, users can click a button to generate the meeting minutes.
Once the button is pressed, the meeting minutes are automatically inserted into the document in two new sections:
1. The “Meeting Summary” section provides a concise description of the meeting based on the transcript.
2. The “Meeting Action Items” section includes a numbered checkbox list of action items derived from the transcript, with due dates when available.
Each numbered action item contains a checkbox that can be used by teams to track progress and mark items as completed.
To set up the necessary configuration and run the code, follow these steps:
1. Sign up for OpenAI to get your API key.
2. Access my GitLab project named “Meeting Minutes Generation with ChatGPT.”
3. Edit the Jupyter Python notebook with Google Colab and save it in your own Colab folder.
4. Replace the ‘OPENAI_API_KEY’ value in the code with your own API key.
5. Activate the Google Drive and Google Docs APIs using the provided links.
6. Create a Google Service Account and download the corresponding JSON file, saving it in your Colab folder as ‘credentials_serviceaccount.json’ (or update the code accordingly).
7. Share your ‘Meet Recordings’ Google Drive folder with the Google Service Account, granting ‘Editor’ permission.
8. Record a Google Meet meeting with transcript enabled. The video file and transcript document will be automatically generated in your ‘Meet Recordings’ Google Drive folder.
9. Replace the ‘GOOGLE_MEET_RECORDING_FOLDER’ value in the code with the ID of your ‘Meet Recordings’ folder.
10. Select ‘Run All’ in the ‘Execution’ menu.
11. The web application should start in a few seconds. Click on the URL generated at the bottom of the Colab notebook to access it.
Please note that the ChatGPT 4 API is currently in beta. The code uses the ‘gpt-4–0314’ snapshot, but you can switch to the current version, ‘gpt-3.5-turbo’, if desired.
Now let’s dive into the code and explore the most important parts.
1. Google Drive Integration/API:
The first lines of code mount your Google Drive root folder and retrieve the Service Account credential key (JSON file) for the Google Drive API.
2. Google Meet Transcript Text Extract:
These functions extract text elements from a specified Google Document ID. The ‘Transcript’ section generated by Google Meet is identified as the starting point for inserting the meeting minutes. The two sections generated by the application will be placed just before this ‘Transcript’ section.
3. ChatGPT Preparation: Breaking Down Transcript Text into Chunks:
ChatGPT API models have a token limit per request. To ensure compatibility, the code breaks down the Google Meet transcript into chunks of 4000 tokens with a 100-token overlap. This prepares a list of chunks to be used with the ChatGPT API.
4. ChatGPT API Usage:
This function generates the meeting summary and action items through a series of steps using the ChatGPT API. Each step involves a ChatGPT API call with specific requests. These steps include summarizing the meeting transcript, consolidating meeting summaries, extracting action items with due dates, and consolidating the meeting action items into a concise numbered list.
5. Google Docs API Management to Insert Meeting Minutes:
This function inserts the meeting minutes into the selected Google Document. The text is inserted before the ‘Transcript’ paragraph using the start index identified in previous functions.
And that’s it! You can now use the web application to automatically generate meeting minutes from Google Meet transcripts using the power of ChatGPT, Google Drive, and Google Docs APIs.
Remember, the ChatGPT 4 API is still in beta, but you can experiment with different versions and explore improvements to enhance the quality of your meeting minutes, especially for longer meetings.
Now, go ahead and optimize your meeting minutes generation process with AI-powered automation!