Skip to main content
googleForms.addQuestion adds one question. Use googleForms.addItem for grids, sections, text, images, or videos.

Example

Inputs

Provide form, title, and question. description, optional quiz grading, one-based position, and requiredRevisionId are optional. Question types are shortText, paragraph, multipleChoice, checkbox, dropdown, scale, date, time, duration, and rating. Choice questions require options. Scale uses low 0 or 1 and high 2–10. Rating uses 3–10 levels, and icon accepts star, heart, or thumbUp. Every question can set required. Choices can set shuffle. Date can set includeTime and includeYear. grading is { correctAnswers: string[]; points: number; generalFeedback?: string; whenRight?: string; whenWrong?: string }. Second argument { account } selects the Google Account binding.

Output

Returns the updated Form. Omit position to append. A stale requiredRevisionId rejects the write instead of overwriting newer changes.