n8n

How to Automate Google Docs Form Document Creation?

Turn form responses into finished Google Docs in minutes. Great for client intake, quotes, agreements, and service reports where a clean document is needed fast and with the right details.

A secure form collects the data and starts the flow. Google Drive makes a copy of a template and names the file using the form field called name. Code steps gather every form field and turn them into simple key value pairs. The script removes system fields like submittedAt and formMode. The flow then sends a request to the Google Docs API to replace each matching placeholder like {{address}} in the document. You do not need to map fields one by one. Any field you add to the form becomes a usable variable in your template.

Setup needs a Google account with Drive and Docs access and credentials in n8n. Add Basic Auth to the form to control access. Place placeholders in your Google Doc that match your form field names. Expect faster document prep, fewer mistakes, and consistent output. Use it for client onboarding, sales quotes, service orders, and HR letters where standard templates save time.

What are the key features?

  • Secure form capture with Basic Auth so only approved users can submit.
  • Template copy in Google Drive with a dynamic file name based on the name field.
  • Automatic variables from form fields so placeholders like {{field}} work without manual mapping.
  • Code step filters out system fields and prepares replace requests for each key value pair.
  • Google Docs API batch update replaces all placeholders in one request.
  • Separate OAuth credentials for Google Drive and Google Docs for safe access control.
  • Works with any number of form fields and adapts as you add more.
  • Stores new documents in your Drive so your team can find and share them easily.

What are the benefits?

  • Reduce manual work from 30 minutes to 2 minutes per document
  • Automate up to 90 percent of repetitive text entry
  • Improve data accuracy by removing copy and paste errors
  • Handle up to 10 times more submissions without extra staff
  • Connect Google Drive and Google Docs in one flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Drive and Google Docs. See the Tools Required section above for links to create accounts with these services.
  3. Open the Form Trigger node. Turn on Basic Auth and set a username and password to control access to the form.
  4. Double click the Copy template file node. In the fileId field, paste the ID from your Google Doc template URL. Keep the name expression using the name field or change it to match your form.
  5. Create Google Drive credentials in n8n Cloud. In the node, choose Credential to connect with, click Create new credential, and follow the on screen steps to connect your Google account.
  6. Open the Replace data in Google Doc node. For Authentication, choose Predefined Credential Type and select Google Docs OAuth API. If needed, click Create new credential and complete the Google sign in.
  7. Edit your Google Doc template. Insert placeholders like {{address}} or {{company}}. The words inside the braces must match the form field labels exactly.
  8. Add any extra fields you need in the Form Trigger node so they become variables available to the template.
  9. Activate the workflow. Copy the form URL from the Form Trigger node and submit a test with sample data.
  10. Check Google Drive for a new file. Open it and confirm that all placeholders were replaced with the test data.
  11. If replacements do not work, make sure the placeholder spelling matches your form fields, the template file is owned or shared with the connected Google account, and both Google Drive and Google Docs credentials are selected on their nodes.
  12. If the form rejects access, confirm the Basic Auth username and password and that you are using the correct form URL from the node.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Docs

Sign up

Free: $0, Google Docs API usage at no additional cost (quota limits apply)

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.