Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-collect-form-responses-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@googleworkspace/cli": patch
---

Fix recipe-collect-form-responses to use Drive API to list forms (Forms API has no list method)
5 changes: 3 additions & 2 deletions skills/recipe-collect-form-responses/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ metadata:
- gws
skills:
- gws-forms
- gws-drive
---

# Check Form Responses

> **PREREQUISITE:** Load the following skills to execute this recipe: `gws-forms`
> **PREREQUISITE:** Load the following skills to execute this recipe: `gws-forms`, `gws-drive`

Retrieve and review responses from a Google Form.

## Steps

1. List forms: `gws forms forms list` (if you don't have the form ID)
1. Find your form ID: `gws drive files list --params '{"q": "mimeType = \"application/vnd.google-apps.form\""}' --format table`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The Google Drive API query syntax requires single quotes for string literals (e.g., mimeType = '...'). Using escaped double quotes (\") inside the query string will likely cause the API to return a 400 "Invalid query" error. Additionally, it is recommended to include trashed = false in the query to avoid listing deleted forms, which can be confusing for users.

Suggested change
1. Find your form ID: `gws drive files list --params '{"q": "mimeType = \"application/vnd.google-apps.form\""}' --format table`
1. Find your form ID: gws drive files list --params "{\"q\": \"mimeType = 'application/vnd.google-apps.form' and trashed = false\"}" --format table

2. Get form details: `gws forms forms get --params '{"formId": "FORM_ID"}'`
3. Get responses: `gws forms forms responses list --params '{"formId": "FORM_ID"}' --format table`

Loading