Add Closed-Ended Question
Adds a closed-ended question (multiple choice, checkbox, or dropdown) to a Google Form.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Form Id - The unique identifier of the Google Form to which the question should be added.
- Question Title - The title or text of the question to be added.
- Answers - An array of possible answer options for the question.
- Index - The position (1-based) where the question should be inserted in the form.
Options
- Required - If enabled, respondents must answer this question before submitting the form.
- Type - The type of closed-ended question:
- Radio - Single choice question (radio buttons)
- Checkbox - Multiple choice question (checkboxes)
- Dropdown - Single choice question (dropdown menu)
- Correct Answers - (Optional) An array of correct answer options for quiz forms.
- Point - (Optional) The point value for correctly answering this question in quiz forms.
How It Works
The Add Closed-Ended Question node inserts a new closed-ended question into an existing Google Form. When executed, the node:
- Validates the required inputs (Form Id, Question Title, Answers, and Index)
- Retrieves the Google Form using the provided Form Id
- Parses the answer options into the appropriate format
- If specified, parses the correct answers for quiz forms
- Constructs a request to create a new item with the specified question properties
- If correct answers are provided, includes grading information in the request
- Uses the Google Forms API to insert the question at the specified index position
- The form is updated with the new question
Requirements
- A valid Google Forms form ID
- Appropriate permissions to modify the form
- Valid question title and answer options
- Valid index position (must be greater than 0)
- For quiz forms, valid correct answers if specified
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Form Id
- Empty or invalid Question Title
- Empty or invalid Answers
- Empty or invalid Index
- Invalid Index value (0 or negative)
- Invalid Type selection
- Google Forms API errors during question creation
- Insufficient permissions to modify the form
- Invalid correct answers (if specified)
- Invalid point value (if specified)
Usage Notes
- The Index is 1-based, meaning position 1 is the first question in the form
- For Radio and Dropdown questions, respondents can only select one answer
- For Checkbox questions, respondents can select multiple answers
- When used in quiz forms, correct answers and point values can be specified
- Answer options should be provided as an array of strings
- Correct answers (if specified) should match values from the Answers array
- The question will be inserted at the specified position, shifting existing questions down
- You must use OpenForm or CreateForm node before this node to establish a connection
Example Use Cases
Customer Satisfaction Survey with Rating
Form Id: {{form_id}}
Question Title: "How satisfied are you with our service?"
Answers: ["Very Satisfied", "Satisfied", "Neutral", "Dissatisfied", "Very Dissatisfied"]
Index: 1
Type: Radio
Required: true
Use Case: Collect satisfaction ratings with predefined options
Multiple Selection Preferences
Form Id: {{form_id}}
Question Title: "Which features are you interested in? (Select all that apply)"
Answers: ["Mobile App", "API Access", "Custom Reporting", "24/7 Support", "Training Sessions"]
Index: 2
Type: Checkbox
Required: false
Use Case: Allow users to select multiple options from a list
Quiz Question with Grading
Form Id: {{form_id}} (created as Quiz type)
Question Title: "What is the capital of France?"
Answers: ["London", "Paris", "Berlin", "Madrid"]
Correct Answers: ["Paris"]
Point: 5
Index: 1
Type: Radio
Required: true
Use Case: Create educational quiz with automatic grading
Dropdown Selection for Categories
Form Id: {{form_id}}
Question Title: "Select your department"
Answers: ["Sales", "Marketing", "Engineering", "HR", "Finance", "Operations"]
Index: 3
Type: Dropdown
Required: true
Use Case: Compact single-choice selection from many options
Multi-Answer Quiz Question
Form Id: {{form_id}}
Question Title: "Which of the following are primary colors? (Select all that apply)"
Answers: ["Red", "Green", "Blue", "Yellow", "Purple", "Orange"]
Correct Answers: ["Red", "Blue", "Yellow"]
Point: 10
Index: 2
Type: Checkbox
Required: true
Use Case: Quiz question where multiple answers are correct
Tips for Effective Use
-
Question Type Selection:
- Use Radio for single choice with 2-6 options that users should see all at once
- Use Dropdown for single choice with many options (7+) to save space
- Use Checkbox when multiple selections are allowed
-
Answer Design:
- Keep answer options concise and clear
- Use consistent formatting across all options
- Include "Other" or "N/A" options when appropriate
- Order options logically (alphabetically, by frequency, or by scale)
-
Quiz Configuration:
- Always specify Point value when providing Correct Answers
- Ensure Correct Answers exactly match values in the Answers array (case-sensitive)
- For checkbox quizzes, list all correct options in Correct Answers array
-
Data Structure:
- Answers must be an array:
["Option 1", "Option 2", "Option 3"] - Correct Answers must also be an array:
["Option 2"] - Point must be a number as a string:
"5"or"10"
- Answers must be an array:
Common Errors and Solutions
Error: "Form not found. Please use Open Form node first"
Cause: The form_id doesn't exist in the current session or OpenForm/CreateForm wasn't called first. Solution: Ensure you use OpenForm or CreateForm node before this node in your flow.
Error: "Form ID cannot be empty"
Cause: The Form Id input is empty or not set. Solution: Pass the form_id from CreateForm or OpenForm node output to this input.
Error: "Question title cannot be empty"
Cause: The Question Title input is empty. Solution: Provide a clear, descriptive question title.
Error: "Answers cannot be empty"
Cause: The Answers input is empty or not an array.
Solution: Provide an array of answer options, e.g., ["Yes", "No", "Maybe"]
Error: "Index must be at least 1"
Cause: Index is set to 0 or negative. Solution: Use 1-based indexing (1 for first question, 2 for second, etc.).
Error: "Type must be selected"
Cause: The Type option is not selected. Solution: Choose Radio, Checkbox, or Dropdown from the Type dropdown.
Error: "Invalid point value format"
Cause: The Point value is not a valid number.
Solution: Enter a numeric value as a string, e.g., "5" or "10". Leave empty if not a quiz.
Error: "Failed to add question"
Cause: API error during question creation. Solution:
- Verify edit permissions for the form
- Check that Correct Answers match values in Answers array exactly
- Ensure the form was created as a Quiz if using grading features
- Validate that the index is within acceptable range
Integration Examples
Build Quiz from Database
1. Create Form
- Title: "Math Quiz - Chapter 5"
- Type: Quiz
- Output: form_id
2. Query Database: SELECT question, options, correct_answer, points FROM quiz_questions
3. For Each row in database results:
- Add Closed-Ended Question
- Form Id: {{form_id}}
- Question Title: {{row.question}}
- Answers: {{row.options}} (e.g., ["5", "10", "15", "20"])
- Correct Answers: [{{row.correct_answer}}] (e.g., ["15"])
- Point: {{row.points}}
- Index: {{loop.index + 1}}
- Type: Radio
- Required: true
Dynamic Survey with Conditional Questions
1. Open Form
- URL: "https://docs.google.com/forms/d/xyz/edit"
- Output: form_id
2. Add Closed-Ended Question (Screening)
- Form Id: {{form_id}}
- Question Title: "Are you a current customer?"
- Answers: ["Yes", "No"]
- Index: 1
- Type: Radio
- Required: true
3. Add Closed-Ended Question (Follow-up if Yes)
- Form Id: {{form_id}}
- Question Title: "How long have you been a customer?"
- Answers: ["Less than 6 months", "6-12 months", "1-2 years", "2+ years"]
- Index: 2
- Type: Dropdown
- Required: true
Event Registration with Multiple Options
1. Create Form
- Title: "Conference Registration 2024"
- Type: Form
- Output: form_id
2. Add Closed-Ended Question (Session Selection)
- Form Id: {{form_id}}
- Question Title: "Which workshop sessions would you like to attend?"
- Answers: ["AI in Business", "Cloud Architecture", "DevOps Best Practices", "Data Analytics"]
- Index: 1
- Type: Checkbox
- Required: true
3. Add Closed-Ended Question (Meal Preference)
- Form Id: {{form_id}}
- Question Title: "Lunch Preference"
- Answers: ["Vegetarian", "Vegan", "Gluten-Free", "No Restrictions"]
- Index: 2
- Type: Radio
- Required: true
4. Add Closed-Ended Question (T-Shirt Size)
- Form Id: {{form_id}}
- Question Title: "T-Shirt Size"
- Answers: ["XS", "S", "M", "L", "XL", "XXL"]
- Index: 3
- Type: Dropdown
- Required: true
A/B Testing Survey
Flow: Create two versions of a question for testing
Version A:
- Question Title: "How likely are you to recommend us? (1-5 scale)"
- Answers: ["1 - Not at all likely", "2", "3", "4", "5 - Extremely likely"]
- Type: Radio
Version B:
- Question Title: "Would you recommend us to a friend?"
- Answers: ["Definitely yes", "Probably yes", "Not sure", "Probably not", "Definitely not"]
- Type: Radio
Use conditional logic to show different versions to different users