Connect Contact Form 7 to Google Sheets in three steps
Use LeadToSheet to capture every Contact Form 7 submission, including custom validation, in a Google Sheet your entire team can use for automations.
CMS: WordPress
Overview
Because LeadToSheet listens to the browser submission event, you keep your existing CF7 email notifications and spam filtering. All field names are normalised before they land in Google Sheets, making it easy to map to CRMs or marketing tools.
Implementation checklist
- 1
Load the SDK once
Paste the script tag into your theme footer or use a header/footer plugin to inject it site-wide.
LeadToSheet snippet
<script>(function(w,d,s,u,k,e){if(w.__formsync){return}w.__formsync={q:[],k:k,endpoint:e};var js=d.createElement(s);js.src=u;js.async=1;js.onload=function(){w.__formsync.init&&w.__formsync.init({ clientKey:k })};d.head.appendChild(js);})(window,document,'script','https://www.leadtosheet.com/sdk.min.js','YOUR_CLIENT_KEY','https://www.leadtosheet.com/api/ingest');</script> - 2
Name your fields clearly
Match CF7 `name` attributes to the columns you want in Google Sheets. LeadToSheet uses them as headers.
Tip: Use snake_case or lowercase names to keep sheet columns neat.
- 3
Submit a validation-safe test
Send a test form and confirm spam protection (Akismet, reCAPTCHA) runs before the data syncs.
Customization ideas
Route to multiple sheets
Configure routing rules in the LeadToSheet dashboard to send different forms to specific Sheet tabs based on page URL or form fingerprint.
Capture UTM parameters
We store URL parameters automatically; append them to your test submission to verify inside Sheets.
Prefill CRM IDs
Use visible read-only text fields or data attributes mapped to CRM owner IDs so automations can assign follow-ups instantly. Note: hidden fields (input[type='hidden']) are excluded from capture.
Troubleshooting
Submissions not appearing?
Ensure the snippet loads once per page and that caching plugins are not stripping the script tag.
Duplicated rows
Disable conflicting CF7-to-sheet plugins to avoid duplicate posts.
reCAPTCHA errors
reCAPTCHA, hCaptcha, and Turnstile tokens are automatically excluded from captured data and will not appear in your sheet. This is expected and does not affect your spam protection.
Resources
Frequently asked questions
- Can I filter submissions by form?
- Yes. LeadToSheet records the CF7 form ID, page URL, and optional labels so you can pivot by campaign.
- Does file upload work?
- File uploads remain on your server. LeadToSheet captures text field values, so file inputs are not included in the synced data.
- How does spam filtering behave?
- LeadToSheet captures form data at browser submit time. For standard (non-AJAX) submissions, CF7 validates server-side before the page reloads. For AJAX submissions, the SDK captures data before server validation completes, so some invalid entries may appear in your sheet.
