Push Ninja Forms data to Google Sheets
Add LeadToSheet to capture Ninja Forms submissions - including action-triggered confirmations and conditional field data - in a Google Sheet for reporting and team workflows.
CMS: WordPress
Overview
Ninja Forms uses a modular action/trigger architecture for post-submission processing, making it highly extensible through its add-on marketplace. However, getting form data into a shared spreadsheet typically requires a paid add-on or Zapier. LeadToSheet bypasses both by capturing submissions at the browser level, automatically syncing every field, action result, and conditional value to Google Sheets.
Implementation checklist
- 1
Add the LeadToSheet SDK to your site
Paste the script tag into your theme footer or use a code snippets plugin. Ninja Forms uses AJAX submissions by default. LeadToSheet captures form data at the browser submit event, before the AJAX request is sent. This means some server-rejected submissions may appear in your sheet.
LeadToSheet snippet
<script async src="https://www.leadtosheet.com/api/sdk?k=YOUR_CLIENT_KEY"></script> - 2
Audit your field keys and actions
In the Ninja Forms builder, each field has a Key (under Administration). These keys map directly to Google Sheet columns. Also check your Emails & Actions tab to ensure you understand which actions fire on submission - LeadToSheet runs alongside all of them.
Tip: Set custom field keys before launch. Ninja Forms defaults to generic keys like "textbox_1" which produce unhelpful column headers.
- 3
Test with conditional logic active
Create a test submission that triggers different conditional branches. Ninja Forms hides fields dynamically, and LeadToSheet only captures fields that are visible and filled at the time of submission.
Customization ideas
Use Ninja Forms merge tags for contextual metadata
Ninja Forms merge tags can inject {wp:user_id}, {wp:post_title}, or custom values into form fields. Note that LeadToSheet excludes hidden fields (input[type='hidden']), so use visible text fields or Ninja Forms' built-in submission export to get merge tag values into your Google Sheet.
Route add-on form types to separate sheets
If you use Ninja Forms add-ons like User Analytics or Conditional Logic Pro, map those specialised form types to dedicated Google Sheets in the LeadToSheet dashboard. The SDK auto-identifies each form via fingerprinting for cleaner data segmentation.
Trigger post-submission workflows from Sheets
While Ninja Forms actions handle email and CRM pushes, use Google Sheets + Apps Script to build workflows Ninja Forms does not natively support, like Slack alerts with custom formatting or multi-step approval chains.
Troubleshooting
AJAX submission completes but sheet row is empty
Ninja Forms clears the DOM on successful AJAX submission by default. LeadToSheet captures field values at submit time, before Ninja Forms clears the DOM. If you are using a custom success action that redirects immediately, ensure the redirect delay is at least 500ms so the sync completes.
Add-on fields not appearing in Sheets
Some Ninja Forms add-ons (like Layout & Styles) add display-only elements with no input name. These are intentionally excluded. Verify the add-on field has a real input name by inspecting the HTML - if it is a layout container, it has no submittable data.
Ninja Forms debug mode interfering with capture
When Ninja Forms debug mode is enabled (common during development), it may prevent the success response from reaching the browser cleanly. Disable debug mode in Ninja Forms > Settings before testing the LeadToSheet integration.
Frequently asked questions
- Does LeadToSheet replace the Ninja Forms Google Sheets add-on?
- It can. The official Ninja Forms Sheets add-on is a paid marketplace extension. LeadToSheet provides equivalent functionality plus UTM tracking and device context, without needing a separate paid add-on.
- How does LeadToSheet handle Ninja Forms' action/trigger system?
- LeadToSheet captures at the browser submit event. Server-side actions (emails, webhooks, redirects) run independently after the form data is sent. It does not interfere with any action/trigger execution. Your existing workflow remains unchanged.
- Will submissions from the Ninja Forms Layout & Styles add-on be captured?
- Layout containers and styling elements are not form fields and carry no submitted data. Actual input fields within styled layouts are captured normally.
