Back to Templates

Generate and host dynamic interactive forms from Google Sheets with CustomJS

Created by

Created by: CustomJS || customjs
CustomJS

Last update

Last update 3 days ago

Share


image.png

Hosting dynamic Interactive Forms with CustomJS

This workflow demonstrates how to automatically generate and host dynamic interactive forms from Google Sheets using CustomJS.

Instead of manually building HTML forms or relying on rigid form builders, the workflow fetches form configurations (fields, labels, dropdown options) from a spreadsheet, transforms them into JSON, and instantly generates a beautiful Tailwind CSS form. The hosted HTML page can be connected to a custom domain with one click.

The result is a fully responsive, production-ready feedback form that updates dynamically whenever you change your Google Sheet.


Why This Workflow?

Building custom forms manually and setting up backend webhooks is:

  • time-consuming
  • hard to style exactly how you want
  • requires developer maintenance for minor field changes

This workflow automates the entire process by using your Google Sheet as a CMS. It converts sheet rows into structured JSON and feeds it directly into a CustomJS HTML template, generating the UI elements instantly. It even provides a dedicated submission handler to catch the form data and save it right back to your spreadsheet!


What This Workflow Does

  • Fetches Form Configurations (Titles, Descriptions, Inputs, Textareas, Select Dropdowns) from Google Sheets
  • Converts the structured data into JSON for the frontend
  • Generates a beautiful static HTML page powered by Tailwind CSS and Alpine.js
  • Hosts the HTML page on CustomJS, optionally connected to a custom domain
  • Receives Submissions via Webhook and securely logs the responses back into Google Sheets

All without writing a single line of backend server code.


Key Features

  • Automated Form Generation
    Generate text fields, date pickers, and dropdowns instantly from Google Sheets data.

  • Static HTML Hosting
    Live forms are instantly deployable and accessible anywhere.

  • Custom Domains
    Connect your own domain with a single click via CustomJS.

  • Tailwind CSS & Alpine.js
    Premium aesthetics and smooth, dynamic client-side interactions out of the box.

  • Automated Submission Handling
    A built-in webhook automatically captures form data and appends timestamps before saving.

  • QR Code Ready
    Easily convert the form URL into a PDF/QR code for physical sharing (e.g., in-store feedback).


How It Works

  1. Manual or Scheduled Trigger
    Run the workflow on demand to deploy the form, or on a schedule to keep it synced.

  2. Load Configuration from Google Sheets
    Pull form metadata and field structures from the spreadsheet.

  3. Prepare Structured JSON
    Format sheet rows into a structured JSON payload for the UI.

  4. Generate HTML Form
    Feed the JSON into a CustomJS HTML template node to automatically build the form UI.

  5. Host Static HTML

    • Deploy instantly via CustomJS
    • Each update overwrites the previous form securely
  6. Handle Submissions
    A dedicated Webhook (POST) node catches form submissions, appends a server timestamp, and logs them to a "Responses" Google Sheet tab.


🛠️ Google Sheet Setup Guide

To use this template, you need to create a Google Sheet with two specific tabs.

Tab 1: Form_Config

This tab defines how your form looks and what fields it has. Create these exact column headers in the first row:
Setting_Type | Key | Value | Label | Options | Required

Example Configuration Data:

Setting_Type Key Value Label Options Required
Meta title Customer Feedback
Meta description We value your thoughts!
Field name text Full Name true
Field email email Email Address true
Field department select Department HR, IT, Sales true
Field comments textarea Your Comments false

Tab 2: Form_Responses

This tab will automatically collect the data submitted by users. Create column headers that match the Key values you defined in the Config tab, plus a column for the timestamp:

Example Response Headers:

name email department comments timestamp