Overview
Connect your design to Google Sheets to automatically save data. This is perfect for collecting emails, contact forms, waitlists, or anything that requires a very light database.
Step by Step Tutorial
1. Get Your Custom Apps Script
First, switch to /Ask mode in Magic Patterns to ask what columns and Apps Script you need for your specific design:
Example Prompt:
The Magic Patterns AI will generally guide you on Step 2 and 3 after the
prompt from Step 1, but we have included the steps below for reference.
2. Create Your Google Sheet
- Go to sheets.google.com and create a new sheet
- Add the column headers from Step 1 in the first row
3. Set Up Google Apps Script
- In your Google Sheet, go to Extensions > Apps Script
- Paste the Apps Script code from step 1
- Click Deploy > New deployment
- Click the gear icon and choose Web app
- Set “Execute as” to Me
- Click Deploy
- IMPORTANT: Set “Who has access” to Anyone
- Authorize the app when prompted
- Copy the Web app URL (looks like:
https://script.google.com/macros/s/.../exec)
IMPORTANT: Set “Who has access” to Anyone, otherwise you will likely get a
CORS error.
4. Connect Your Design
Use this prompt in Magic Patterns, replacing the URL with your Web app URL from step 3:
Example Prompt: