Google Sheets Integration
The Google Sheets integration automatically saves form submissions to your Google Spreadsheet, making it easy to analyze responses, share data with your team, and create visualizations.
Overview
When a form is submitted, Axiforms will:
- Connect to your Google account (OAuth)
- Map form fields to spreadsheet columns
- Append a new row with the submission data
- Support nested paths for organized data storage
Setting Up Google Sheets Integration
Step 1: Connect Your Google Account
- Navigate to your form's Settings → Integrations
- Click on Google Sheets
- Click Connect Google Account
- You'll be redirected to Google to authorize Axiforms
- Grant permissions to access Google Sheets
- You'll be redirected back to Axiforms
Step 2: Select a Spreadsheet
After connecting, you'll see a dialog to select a spreadsheet:
- Choose from list: Select from your recent spreadsheets
- Enter ID manually: If you prefer, enter the spreadsheet ID from the URL
To find your Spreadsheet ID:
- Open your Google Spreadsheet
- Look at the URL:
https://docs.google.com/spreadsheets/d/{SPREADSHEET_ID}/edit - Copy the
{SPREADSHEET_ID}part
Step 3: Select a Sheet (Tab)
- After selecting a spreadsheet, choose which sheet (tab) to use
- The first sheet will be selected by default
- Data will be appended to this sheet
Step 4: Map Form Fields
- Click Add Field to start mapping
- For each form field:
- Select the Form Field from the dropdown
- Enter the Column Name in the spreadsheet
- Field mappings are saved and reused for all submissions
Step 5: Enable and Save
- Enable the integration toggle
- Click Create Integration or Update Integration
- Test by submitting your form and checking the spreadsheet
Field Mapping
How Field Mapping Works
Field mappings define how form responses are saved to your spreadsheet:
- Form Field: The field from your Axiforms form
- Column Name: The column header in your Google Sheet
Example Mapping
| Form Field | Column Name | Result |
|---|---|---|
| Email Address | Email addresses go to "Email" column | |
| Full Name | Name | Names go to "Name" column |
| Message | Comments | Messages go to "Comments" column |
Creating Column Headers
The first time data is added, Axiforms will create columns with the names you specify. If columns already exist, data will be appended to those columns.
Nested Paths
Google Sheets integration supports nested paths in your spreadsheet structure:
Example URL structure:
https://your-domain.com/f/survey/2024
This allows you to:
- Organize forms by category (e.g.,
survey/2024,contact,feedback) - Use the same form mapping with different path configurations
- Create a hierarchical structure in your spreadsheet
OAuth and Permissions
What Permissions Are Required?
Axiforms requests the following Google permissions:
- View and manage Google Sheets: To read spreadsheet metadata and append rows
- View Google Drive files (readonly): To list your spreadsheets for selection
Reconnecting Your Account
If you need to reconnect your Google account:
- Click Reconnect in the integration settings
- Re-authorize Axiforms
- Your existing mappings will be preserved
Security
- OAuth tokens are stored securely in Axiforms's database
- Tokens are automatically refreshed when they expire
- You can revoke access at any time from Google Account Settings
Data Format
Spreadsheet Structure
When data is appended, it follows your field mappings:
| Timestamp | Name | Message | |
|---|---|---|---|
| 2024-01-15 | user@example.com | John Doe | Hello... |
Value Types
Axiforms automatically handles different value types:
- Text: Saved as-is
- Numbers: Saved as numbers
- Dates: Saved in standard format
- Multiple selections: Joined with commas
- Objects/Arrays: Saved as JSON strings
Troubleshooting
"Failed to append row" error
Possible causes:
- Spreadsheet is deleted or moved
- You don't have edit permissions on the spreadsheet
- Sheet name doesn't exist
- Google account connection expired
Solutions:
- Verify the spreadsheet exists and you have access
- Check that the sheet name matches exactly (case-sensitive)
- Try reconnecting your Google account
- Verify column names match your field mappings
OAuth connection issues
If connection fails:
- Ensure you have a Google account
- Check that you granted all required permissions
- Try disconnecting and reconnecting
- Verify Axiforms is not blocked by your organization's security policies
Missing data in spreadsheet
- Check that field mappings are correct
- Verify the form fields match the mapped fields
- Ensure the integration is enabled
- Check Axiforms logs for error messages
Token expiration
OAuth tokens are automatically refreshed, but if refresh fails:
- Reconnect your Google account
- Ensure you granted offline access permissions
- Check that your Google account is active
Best Practices
- Pre-create columns: While Axiforms creates columns automatically, pre-creating them gives you better control over formatting and formulas
- Use consistent column names: Keep column names consistent across multiple forms for easier data consolidation
- Format your spreadsheet: Set up number formats, dates, and validation rules before data starts flowing
- Protect headers: Lock the header row in Google Sheets to prevent accidental changes
- Set up filters: Add filter views for easy data analysis
Advanced Usage
Multiple Forms, One Spreadsheet
You can use the same spreadsheet for multiple forms:
- Create separate sheets (tabs) for each form
- Configure each form's integration to use the appropriate sheet
- Or use a single sheet with a "Form Name" column to distinguish submissions
Data Validation
Set up Google Sheets data validation to ensure data quality:
- Email validation: Ensure email columns contain valid emails
- Number ranges: Validate numeric fields
- Dropdown lists: Restrict values to specific options
Formulas and Automation
Use Google Sheets formulas with your form data:
- COUNTIF: Count submissions matching criteria
- SUM: Aggregate numeric responses
- AVERAGE: Calculate averages
- Google Apps Script: Create custom automation
API Reference
Axiforms uses the Google Sheets API v4 to append data:
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}:append
For more information, see the Google Sheets API documentation.