GPT Summary

How to incorporate AI into your Summit model

🎓

In this tutorial, you'll learn how to ...

❗️

Use the Vault

To keep your API keys to OpenAI and other services secure and encrypted, use the Vault feature of your Summit account. This allows you to then pass in your key securely without entering it as text, like so:

=Gpt("gpt-4-turbo", "{{ MY_OPENAI_KEY }}")

ℹ️

Model Template

The model created in this video can be found in its entirety and copied into your Summit account at no cost by following this link and clicking the big "Start from this model" button:

Reservation Outlook Model Template

Video Walkthrough

Step by Step

This playbook describes how to create a no-code model using the Summit platform to summarize Google Sheet data using GPT. The model is then integrated with Zapier to schedule and execute the summarization automatically, with results shared via email.

Step 1: Preparation

Familiarize yourself with Summit platform basics by watching the introductory "Hello, World!" Tutorial. Ensure you have a base understanding of how to create a simple model, publish an API, and integrate it with external services like Zapier.

Step 2: New Model

Go to the Summit platform and click on 'New Model' to begin with a blank canvas for creating your no-code GPT integration.

Step 3: Add CSV Request

Locate and add a request snippet from the snippets gallery specifically designed for CSV files. This snippet will provide the necessary steps to fetch a CSV file from a Google Sheet.

Step 4: Publish Google Sheet

Ensure your Google Sheet with reservation data is published to the web as a CSV file and obtain the URL for accessing it (File > Share > Publish to Web). Paste this URL into the appropriate field in your Summit model to fetch the data.

Step 5: Adjust Fetch Query

Modify the default SQL that queries the Google Sheet data to remove the "LIMIT 2" expression, allowing you to retrieve the entire set of records.

Step 6: Insert GPT Step

Add a GPT step to your model by locating the corresponding snippet with the robot icon and placing it on the canvas. This step will be responsible for providing a prompt to GPT and receiving the summarized response.

Step 7: Set GPT API Key

Choose a suitable model (e.g., 'Turbo') for quicker processing by passing in the model name as the first argument to the Gpt event.

Step 8: Fix Data Formatting

Address any formatting issues in your CSV file by adjusting column headers to be more code-friendly, such as using underscores instead of spaces.

Step 9: Configure GPT Prompt

Tailor the GPT prompt to provide specific instructions for the GPT model. Use liquid syntax to dynamically insert the fetched and formatted CSV data into the prompt.

Step 10: Execute and Debug

Run the GPT step and check the output. Solve any potential race conditions by adjusting the flow of events within Summit to ensure data is ready before GPT attempts to process it. Often, having a continuous flow of events will eliminate these issues.

Step 11: Refine Prompt

Refine the GPT prompt by incorporating details like special instructions or specific questions. Iterate on this step to improve the quality and accuracy of the GPT-generated summaries. Great prompts set expectations and include examples.

Step 12: Set Live

Once the model is functioning as expected, set it live within Summit to allow external API calls to the model.

Step 13: Zapier Integration

Connect your Summit model to Zapier using the Summit companion app, "Models by Summit" (ask for access if you don't already have it). Use a scheduling trigger in Zapier to execute your model on a daily basis and email the summarized results.

Step 14: Finalize and Test

Complete the setup by testing the full Zapier workflow to ensure the scheduled GPT summary is generated correctly and the email with the summary is sent as expected.

General Notes

Liquid Syntax

Become familiar with Liquid syntax as it is used to efficiently format strings and insert dynamic data into prompts within the Summit platform.

API Keys

Handle API keys securely. The tutorial specifies that the GPT API key will be revoked after recording. Always keep your API keys confidential and rotate them regularly.

Summit Updates

Summit platform undergoes regular updates; you should check for any UI/UX changes that may have occurred after this tutorial was published.

Data Privacy

Ensure the data in your Google Sheets contain no sensitive information before publishing and using in a Summit model, especially if you are sharing your model or creating a public tutorial.