gws-forms

Create, read, and update Google Forms through the gws CLI.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill gws-forms-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gws-forms
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/gws-forms
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill gws-forms-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing Google Forms programmatically requires learning the Forms API structure and authentication flow, which slows down tasks like bulk form creation, response retrieval, and publish settings management. ## Core Features & Use Cases - Form Lifecycle Management: Create empty forms with a title, then add items via batchUpdate, and retrieve form definitions with get. - Responses and Watches: Access form responses and manage watches for change notifications through dedicated sub-resources. - Schema Discovery: Inspect any method's required parameters, types, and defaults with gws schema forms.<resource>.<method> before building requests. - Use Case: A team lead needs to spin up a weekly feedback form, add questions, and later pull all responses. They create the form, batch-update it with items, and fetch responses, all from the terminal. ## Quick Start Ask the assistant to create a new Google Form titled "Team Feedback" and then list its responses using the gws forms commands.

Frequently Asked Questions about gws-forms

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Google Form from the command line?

Use gws forms create with a form message containing only the title and optional document title. Then call forms batchUpdate to add items, since create does not accept questions or settings directly.

How do I add questions to a Google Form via API?

Call the forms batchUpdate method with a batch of update requests after creating the form. Inspect the exact request structure first with gws schema forms.batchUpdate to build correct --params and --json flags.

Can I retrieve Google Form responses with gws?

Yes, the forms resource exposes a responses sub-resource for reading submitted answers. Run gws forms --help to browse available response methods and gws schema to check their parameters.

Why can't I set publish settings on my Google Form?

The setPublishSettings method does not support legacy forms because they lack the publish_settings field. Only newer forms created with the current Forms API support updating publish settings.

What do I need before using the gws forms commands?

You need the gws binary installed and the gws-shared skill available for authentication, global flags, and security rules. If gws-shared is missing, run gws generate-skills to create it.