AI Survey → Google Forms Builder

Describe the survey you want. Get Google-Forms-ready JSON.

How it works

Need help describing your survey?

Pick a template to auto-fill a strong description. You can edit it.

0/1000

Tip: Include what you're measuring, who it's for, and any constraints (budget/timeline).

Coming soon — rewrites your draft into a perfect survey prompt.

No spam. Only updates about this tool.

Apps Script (Copy/Paste)

Note: Browser.inputBox is not supported in some Apps Script contexts, so this version uses a hardcoded JSON string variable.

/**
 * Google Apps Script to create a Google Form from JSON
 * 
 * INSTRUCTIONS:
 * 1) Replace PASTE_JSON_HERE with your JSON
 * 2) Run createFormFromJson
 * 3) Open View > Logs (or Execution log) to get the form link
 * 
 * Note: Browser.inputBox is not supported in some Apps Script contexts,
 * so this version uses a hardcoded JSON string variable.
 */

function createFormFromJson() {
  // 1) Replace PASTE_JSON_HERE with your JSON
  var jsonString = `PASTE_JSON_HERE`;
  
  try {
    // Parse the JSON
    var surveyData = JSON.parse(jsonString);
    
    // Validate structure
    if (!surveyData.title || !surveyData.questions) {
      throw new Error('Invalid JSON structure: missing title or questions');
    }
    
    // Create a new Google Form
    var form = FormApp.create(surveyData.title);
    
    // Set description if provided
    if (surveyData.description) {
      form.setDescription(surveyData.description);
    }
    
    // Loop through questions and add them to the form
    surveyData.questions.forEach(function(question) {
      var item;
      
      switch(question.type) {
        case 'short_answer':
          item = form.addTextItem();
          item.setTitle(question.title);
          if (question.helpText) {
            item.setHelpText(question.helpText);
          }
          item.setRequired(false);
          break;
          
        case 'paragraph':
          item = form.addParagraphTextItem();
          item.setTitle(question.title);
          if (question.helpText) {
            item.setHelpText(question.helpText);
          }
          item.setRequired(false);
          break;
          
        case 'multiple_choice':
          item = form.addMultipleChoiceItem();
          item.setTitle(question.title);
          if (question.helpText) {
            item.setHelpText(question.helpText);
          }
          if (question.options && question.options.length > 0) {
            var choices = question.options.map(function(opt) {
              return item.createChoice(opt);
            });
            item.setChoices(choices);
          }
          item.setRequired(false);
          break;
          
        case 'checkbox':
          item = form.addCheckboxItem();
          item.setTitle(question.title);
          if (question.helpText) {
            item.setHelpText(question.helpText);
          }
          if (question.options && question.options.length > 0) {
            var choices = question.options.map(function(opt) {
              return item.createChoice(opt);
            });
            item.setChoices(choices);
          }
          item.setRequired(false);
          break;
          
        case 'linear_scale':
          item = form.addScaleItem();
          item.setTitle(question.title);
          if (question.helpText) {
            item.setHelpText(question.helpText);
          }
          if (question.scale) {
            item.setBounds(question.scale.min, question.scale.max);
            if (question.scale.minLabel) {
              item.setLabels(question.scale.minLabel, question.scale.maxLabel || '');
            }
          }
          item.setRequired(false);
          break;
          
        default:
          Logger.log('Unknown question type: ' + question.type);
          break;
      }
    });
    
    // Log the edit URL
    var editUrl = form.getEditUrl();
    Logger.log('Form created: ' + editUrl);
    
  } catch (error) {
    Logger.log('Error: ' + error.toString());
    throw error;
  }
}

How it works

Google permission prompt (first-time setup)

Running the Apps Script will ask for permission to create a Google Form in your Google account.

Steps: Advanced → Go to [named project] → Allow

Reassurance: This script only creates a Google Form. It does not read your Gmail or contacts.

  1. Generate JSON and click Copy JSON - Copy the generated survey JSON above.
  2. Open Google Apps Script and paste the script - Go to script.google.com, create a new project, and paste the Apps Script code above (use the Copy Script button).
  3. Paste the JSON into the script variable and Run - Replace PASTE_JSON_HERE in the script with your copied JSON, then run the createFormFromJson function. Check View > Logs (or Execution log) to get the form link.