Form Submission with Google Sheets#
Learn how to automatically process web form submissions and save them to Google Sheets with conditional logic and email notifications.
π― What You'll Build#
A donation form automation that: - Collects user information via web form - Saves data to Google Sheets - Sends personalized thank you emails based on donation amount - Notifies the team of new submissions
π Requirements#
- Google account with access to Google Sheets
- Gmail account for sending notifications
- n8n instance running
π§ Workflow Overview#
Key Components#
- Form Trigger - n8n form with multiple fields
- Google Sheets - Automatic data storage and VIP status calculation
- Conditional Logic - Branch based on donation amount
- Email Notifications - Personalized responses and team alerts
π Step-by-Step Guide#
1. Set Up the Form Trigger#
- Add a Form Trigger node
- Configure form fields: - First Name (required) - Last Name (required) - Email (required, email type) - Project (dropdown with donation options) - Amount (number, required) - Receipt (dropdown: Yes/No) - Note (textarea, optional)
2. Connect to Google Sheets#
- Add Google Sheets node
- Configure connection:
- Operation: AppendOrUpdate
- Select your spreadsheet and sheet
- Map form fields to spreadsheet columns
- Add VIP status calculation:
{{ $if($json.Amount >= "5000", "TRUE", "FALSE") }}
3. Add Conditional Logic#
- Add Switch node
- Create conditions based on donation amount: - Route 1: Amount < 5000 (Normal donors) - Route 2: Amount >= 5000 (VIP donors)
4. Set Up Email Notifications#
- Add two Gmail nodes (one for each donor type)
- Configure personalized messages: - VIP donors get premium thank you message - Normal donors get standard thank you message
- Add merge Gmail node to send team notification
π¨ Customization Options#
- Form Fields: Add custom fields for your specific use case
- VIP Threshold: Adjust the amount that qualifies for VIP status
- Email Templates: Create personalized email content
- Spreadsheet Layout: Customize columns and calculations
- Team Notifications: Add multiple recipients or different notification rules
π Testing Your Workflow#
- Test the form by submitting different donation amounts
- Check Google Sheets for proper data storage
- Verify email delivery and content
- Test the VIP status calculation
π Real-World Applications#
- Donation Processing: Fundraising campaigns and charitable donations
- Event Registration: Conference registrations with VIP tiers
- Product Orders: E-commerce with premium customer tiers
- Contact Forms: Lead qualification and routing
- Surveys: Response collection and analysis
β οΈ Common Issues & Solutions#
Issue: Data not saving to Google Sheets#
Solution: Check Google Sheets API permissions and spreadsheet sharing settings
Issue: Emails not sending#
Solution: Verify Gmail credentials and check if sender address is verified
Issue: VIP status not calculating correctly#
Solution: Check the conditional logic and data types in the calculation
π Advanced Enhancements#
- Data Validation: Add validation rules for form inputs
- Duplicate Prevention: Check for existing entries before saving
- Analytics Dashboard: Create summary reports and visualizations
- SMS Notifications: Add SMS alerts for high-value donations
- Payment Integration: Connect with payment gateways for automatic processing
π Related Tutorials#
- Email Newsletter Automation - For sending regular updates
- Webhook Basic - For receiving external data
- Automated Reporting - For creating donation reports
Duration: 10 minutes Difficulty: Beginner Prerequisites: Google account, Gmail account