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' and trashed = false\"}" --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 gws drive files list command in table format may return many columns by default, making it difficult to find the id and name of the form. It is highly recommended to use the fields parameter to limit the output to only the necessary fields for clarity.

Suggested change
1. Find your form ID: `gws drive files list --params "{\"q\": \"mimeType = 'application/vnd.google-apps.form' and trashed = false\"}" --format table`
1. Find your form ID: `gws drive files list --params "{\"q\": \"mimeType = 'application/vnd.google-apps.form' and trashed = false\", \"fields\": \"files(id, name)\"}" --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