How to connect OpenAI with Tape for generating meeting summaries

Hello Tape enthusiasts :wave:

We don’t have a lot of internal meetings, but when we do, our meeting notes are all over the place. We are using an automation that summarizes a meeting upon completion and even more important, creates and assigns follow-up tasks! We found this to be an effective way to eliminate “feel-good” meetings where a lot is said and nothing is done afterwards :wink:

Anyways, here is the automation we use for the OpenAI integration: The automation starts running when the meeting status is set to “Completed”:





The first 2 actions are used to configure the automation:
1. Set the OpenAI key (replace with your own after duplicating the template)
2. Configure the OpenAI prompt (the one provided works well but you can fine-tune it if you want)

`
You can only respond with a valid JSON object.  Summarize the following meeting notes in three sentences. Use the same language as the meeting notes are written in. Put this into a single string value into the JSON with the property key "summary". The second property "tasks" contains an array of strings with tasks that are inferred by the meeting notes. Use the same language as the meeting notes are written in.

Meeting notes:
---

`


The next action (Script Action) performs the actual API call to OpenAI. We set the OpenAI key in the header. Furthermore, We construct the message by concatenating the prompt and the meeting notes of the record. Finally, we parse the response of OpenAI and make sure the AI generated a valid JSON, which it surprisingly does correctly each time.

const { data: openapi_response } = await http.post(
    'https://api.openai.com/v1/chat/completions',
    {
        headers: {
            ["Content-Type"]: "application/json",
            ["Authorization"]: `Bearer ${var_openai_key}`
        },
        data: {
            "model": "gpt-3.5-turbo",
            "messages": [
                {
                    "role": "user",
                    "content": var_openai_prompt + meeting_field_agenda_unformatted_value
                }
            ],
            "temperature": 0.7
        }
    });

// console.log(JSON.stringify(openapi_response));

if (openapi_response.error) {
    throw new Error(openapi_response.error.message)
}

const json_response = JSON.parse(openapi_response?.choices[0]?.message?.content);

var_summary = json_response.summary;
var_task1 = json_response.tasks[0];
var_task2 = json_response.tasks[1];
var_task3 = json_response.tasks[2];

if (!var_summary) {
    throw new Error(openapi_response)
}


Now that we have received the summary and the follow-up tasks from the OpenAI API, we can use the "Update Action" to update the meeting record accordingly:





Hope this automation will help you to improve your meeting experience in Tape!

:bulb: You can duplicate the app and the automation into your own Tape organization here: :point_down:

https://share.tapeapp.com/409/workspaces/openai-showcase?auth=wks77b61cd64ccbe266edcc3cbc18c9b5f9


AI guide:

3 Likes