Skip to main content
Question

Creating a Google Form with dynamic questions based on input number


I want to create a google forms that takes a number i input for example 70, and then creates that same amount of questions to be answered in thst forms. Say for example i recieve 70 batteries, when i input the amount of batteries (being 70) the forms will create 70 blank spaces where i can introduce the date and voltage these batteries were recieved. i want the date to be in julian calendar, For example if a battery was recieved january 1st 2024 the date will display 4001-1  (the one after the dash meaning its the first battery)

Did this topic help you find an answer to your question?

2 replies

Hafiz_usama123
Forum|alt.badge.img+1

Here's how:

1. Set Up Google Sheets as a Data Source

  • Create a Google Sheet with columns:
    • Number of Batteries (Input)
    • Date (Julian Format)
    • Voltage

2. Use Zapier to Trigger Google Apps Script

  1. Trigger: Use a Google Forms submission or a manual trigger (e.g., a Google Sheet update) as the starting point.
  2. Action 1: Run a Google Apps Script via Zapier to:
    • Generate a Google Form dynamically with the required number of entries.
    • Convert standard dates into Julian format automatically.

3. Write a Google Apps Script to Modify Google Forms

  • Go to Google Apps Script inside your Google Drive and create a script that:
    • Reads the input number from Google Sheets.
    • Generates a new Google Form with n input fields.
    • Formats the date in Julian format (YYYYDDD-Battery#).

4. Automate Execution via Zapier

  • Set up Zapier with the following workflow:
    • Trigger: When a new row (number of batteries) is added to Google Sheets.
    • Action: Use the Google Apps Script Webhook (Custom Request) action to run the script.
    • Output: The script generates a Google Form dynamically and returns the form URL.

5. Share the Google Form

  • Once Zapier runs the script, it will generate and return the Google Form link.
  • You can send the form via email or store it in the Google Sheet for easy access.

JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2789 replies
  • March 24, 2025

Hi ​@lsk_leo,
 
We just wanted to see how everything is going with your Zap. Feel free to reach out if you need further assistance with your Zap. We're glad to address any concerns and assist you.
 
We're looking forward to your response.


Reply