Skip to content

Commit 3002c8d

Browse files
committed
fixed the name for google forms
1 parent b4086a2 commit 3002c8d

File tree

16 files changed

+125
-96
lines changed

16 files changed

+125
-96
lines changed

apps/docs/content/docs/en/tools/google_forms.mdx

Lines changed: 85 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ Integrate Google Forms into your workflow. Read form structure, get responses, c
3737

3838
### `google_forms_get_responses`
3939

40+
Retrieve a single response or list responses from a Google Form
41+
4042
#### Input
4143

4244
| Parameter | Type | Required | Description |
4345
| --------- | ---- | -------- | ----------- |
46+
| `formId` | string | Yes | The ID of the Google Form |
47+
| `responseId` | string | No | If provided, returns this specific response |
48+
| `pageSize` | number | No | Maximum number of responses to return \(service may return fewer\). Defaults to 5000. |
4449

4550
#### Output
4651

@@ -56,154 +61,178 @@ Integrate Google Forms into your workflow. Read form structure, get responses, c
5661

5762
### `google_forms_get_form`
5863

64+
Retrieve a form structure including its items, settings, and metadata
65+
5966
#### Input
6067

6168
| Parameter | Type | Required | Description |
6269
| --------- | ---- | -------- | ----------- |
70+
| `formId` | string | Yes | The ID of the Google Form to retrieve |
6371

6472
#### Output
6573

6674
| Parameter | Type | Description |
6775
| --------- | ---- | ----------- |
68-
| `response` | json | Operation response data |
69-
| `formId` | string | Form ID |
70-
| `title` | string | Form title |
71-
| `responderUri` | string | Form responder URL |
72-
| `items` | json | Form items |
73-
| `responses` | json | Form responses |
74-
| `watches` | json | Form watches |
76+
| `formId` | string | The form ID |
77+
| `title` | string | The form title visible to responders |
78+
| `description` | string | The form description |
79+
| `documentTitle` | string | The document title visible in Drive |
80+
| `responderUri` | string | The URI to share with responders |
81+
| `linkedSheetId` | string | The ID of the linked Google Sheet |
82+
| `revisionId` | string | The revision ID of the form |
83+
| `items` | array | The form items \(questions, sections, etc.\) |
84+
|`itemId` | string | Item ID |
85+
|`title` | string | Item title |
86+
|`description` | string | Item description |
87+
| `settings` | json | Form settings |
88+
| `publishSettings` | json | Form publish settings |
7589

7690
### `google_forms_create_form`
7791

92+
Create a new Google Form with a title
93+
7894
#### Input
7995

8096
| Parameter | Type | Required | Description |
8197
| --------- | ---- | -------- | ----------- |
98+
| `title` | string | Yes | The title of the form visible to responders |
99+
| `documentTitle` | string | No | The document title visible in Drive \(defaults to form title\) |
100+
| `unpublished` | boolean | No | If true, create an unpublished form that does not accept responses |
82101

83102
#### Output
84103

85104
| Parameter | Type | Description |
86105
| --------- | ---- | ----------- |
87-
| `response` | json | Operation response data |
88-
| `formId` | string | Form ID |
89-
| `title` | string | Form title |
90-
| `responderUri` | string | Form responder URL |
91-
| `items` | json | Form items |
92-
| `responses` | json | Form responses |
93-
| `watches` | json | Form watches |
106+
| `formId` | string | The ID of the created form |
107+
| `title` | string | The form title |
108+
| `documentTitle` | string | The document title in Drive |
109+
| `responderUri` | string | The URI to share with responders |
110+
| `revisionId` | string | The revision ID of the form |
94111

95112
### `google_forms_batch_update`
96113

114+
Apply multiple updates to a form (add items, update info, change settings, etc.)
115+
97116
#### Input
98117

99118
| Parameter | Type | Required | Description |
100119
| --------- | ---- | -------- | ----------- |
120+
| `formId` | string | Yes | The ID of the Google Form to update |
121+
| `requests` | json | Yes | Array of update requests \(updateFormInfo, updateSettings, createItem, updateItem, moveItem, deleteItem\) |
122+
| `includeFormInResponse` | boolean | No | Whether to return the updated form in the response |
101123

102124
#### Output
103125

104126
| Parameter | Type | Description |
105127
| --------- | ---- | ----------- |
106-
| `response` | json | Operation response data |
107-
| `formId` | string | Form ID |
108-
| `title` | string | Form title |
109-
| `responderUri` | string | Form responder URL |
110-
| `items` | json | Form items |
111-
| `responses` | json | Form responses |
112-
| `watches` | json | Form watches |
128+
| `replies` | array | The replies from each update request |
129+
| `writeControl` | json | Write control information with revision IDs |
130+
| `form` | json | The updated form \(if includeFormInResponse was true\) |
113131

114132
### `google_forms_set_publish_settings`
115133

134+
Update the publish settings of a form (publish/unpublish, accept responses)
135+
116136
#### Input
117137

118138
| Parameter | Type | Required | Description |
119139
| --------- | ---- | -------- | ----------- |
140+
| `formId` | string | Yes | The ID of the Google Form |
141+
| `isPublished` | boolean | Yes | Whether the form is published and visible to others |
142+
| `isAcceptingResponses` | boolean | No | Whether the form accepts responses \(forced to false if isPublished is false\) |
120143

121144
#### Output
122145

123146
| Parameter | Type | Description |
124147
| --------- | ---- | ----------- |
125-
| `response` | json | Operation response data |
126-
| `formId` | string | Form ID |
127-
| `title` | string | Form title |
128-
| `responderUri` | string | Form responder URL |
129-
| `items` | json | Form items |
130-
| `responses` | json | Form responses |
131-
| `watches` | json | Form watches |
148+
| `formId` | string | The form ID |
149+
| `publishSettings` | json | The updated publish settings |
150+
| `publishState` | object | The publish state |
151+
| `isPublished` | boolean | Whether the form is published |
152+
| `isAcceptingResponses` | boolean | Whether the form accepts responses |
153+
| `isPublished` | boolean | Whether the form is published |
154+
| `isAcceptingResponses` | boolean | Whether the form accepts responses |
132155

133156
### `google_forms_create_watch`
134157

158+
Create a notification watch for form changes (schema changes or new responses)
159+
135160
#### Input
136161

137162
| Parameter | Type | Required | Description |
138163
| --------- | ---- | -------- | ----------- |
164+
| `formId` | string | Yes | The ID of the Google Form to watch |
165+
| `eventType` | string | Yes | Event type to watch: SCHEMA \(form changes\) or RESPONSES \(new submissions\) |
166+
| `topicName` | string | Yes | The Cloud Pub/Sub topic name \(format: projects/\{project\}/topics/\{topic\}\) |
167+
| `watchId` | string | No | Custom watch ID \(4-63 chars, lowercase letters, numbers, hyphens\) |
139168

140169
#### Output
141170

142171
| Parameter | Type | Description |
143172
| --------- | ---- | ----------- |
144-
| `response` | json | Operation response data |
145-
| `formId` | string | Form ID |
146-
| `title` | string | Form title |
147-
| `responderUri` | string | Form responder URL |
148-
| `items` | json | Form items |
149-
| `responses` | json | Form responses |
150-
| `watches` | json | Form watches |
173+
| `id` | string | The watch ID |
174+
| `eventType` | string | The event type being watched |
175+
| `topicName` | string | The Cloud Pub/Sub topic |
176+
| `createTime` | string | When the watch was created |
177+
| `expireTime` | string | When the watch expires \(7 days after creation\) |
178+
| `state` | string | The watch state \(ACTIVE, SUSPENDED\) |
151179

152180
### `google_forms_list_watches`
153181

182+
List all notification watches for a form
183+
154184
#### Input
155185

156186
| Parameter | Type | Required | Description |
157187
| --------- | ---- | -------- | ----------- |
188+
| `formId` | string | Yes | The ID of the Google Form |
158189

159190
#### Output
160191

161192
| Parameter | Type | Description |
162193
| --------- | ---- | ----------- |
163-
| `response` | json | Operation response data |
164-
| `formId` | string | Form ID |
165-
| `title` | string | Form title |
166-
| `responderUri` | string | Form responder URL |
167-
| `items` | json | Form items |
168-
| `responses` | json | Form responses |
169-
| `watches` | json | Form watches |
194+
| `watches` | array | List of watches for the form |
195+
|`id` | string | Watch ID |
196+
|`eventType` | string | Event type \(SCHEMA or RESPONSES\) |
197+
|`createTime` | string | When the watch was created |
198+
|`expireTime` | string | When the watch expires |
199+
|`state` | string | Watch state |
170200

171201
### `google_forms_delete_watch`
172202

203+
Delete a notification watch from a form
204+
173205
#### Input
174206

175207
| Parameter | Type | Required | Description |
176208
| --------- | ---- | -------- | ----------- |
209+
| `formId` | string | Yes | The ID of the Google Form |
210+
| `watchId` | string | Yes | The ID of the watch to delete |
177211

178212
#### Output
179213

180214
| Parameter | Type | Description |
181215
| --------- | ---- | ----------- |
182-
| `response` | json | Operation response data |
183-
| `formId` | string | Form ID |
184-
| `title` | string | Form title |
185-
| `responderUri` | string | Form responder URL |
186-
| `items` | json | Form items |
187-
| `responses` | json | Form responses |
188-
| `watches` | json | Form watches |
216+
| `deleted` | boolean | Whether the watch was successfully deleted |
189217

190218
### `google_forms_renew_watch`
191219

220+
Renew a notification watch for another 7 days
221+
192222
#### Input
193223

194224
| Parameter | Type | Required | Description |
195225
| --------- | ---- | -------- | ----------- |
226+
| `formId` | string | Yes | The ID of the Google Form |
227+
| `watchId` | string | Yes | The ID of the watch to renew |
196228

197229
#### Output
198230

199231
| Parameter | Type | Description |
200232
| --------- | ---- | ----------- |
201-
| `response` | json | Operation response data |
202-
| `formId` | string | Form ID |
203-
| `title` | string | Form title |
204-
| `responderUri` | string | Form responder URL |
205-
| `items` | json | Form items |
206-
| `responses` | json | Form responses |
207-
| `watches` | json | Form watches |
233+
| `id` | string | The watch ID |
234+
| `eventType` | string | The event type being watched |
235+
| `expireTime` | string | The new expiration time |
236+
| `state` | string | The watch state |
208237

209238

apps/sim/tools/google_form/index.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/sim/tools/google_form/batch_update.ts renamed to apps/sim/tools/google_forms/batch_update.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type {
22
GoogleForm,
33
GoogleFormsBatchUpdateParams,
44
GoogleFormsBatchUpdateResponse,
5-
} from '@/tools/google_form/types'
6-
import { buildBatchUpdateUrl } from '@/tools/google_form/utils'
5+
} from '@/tools/google_forms/types'
6+
import { buildBatchUpdateUrl } from '@/tools/google_forms/utils'
77
import type { ToolConfig } from '@/tools/types'
88

99
interface BatchUpdateApiResponse {

apps/sim/tools/google_form/create_form.ts renamed to apps/sim/tools/google_forms/create_form.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type {
22
GoogleForm,
33
GoogleFormsCreateFormParams,
44
GoogleFormsCreateFormResponse,
5-
} from '@/tools/google_form/types'
6-
import { buildCreateFormUrl } from '@/tools/google_form/utils'
5+
} from '@/tools/google_forms/types'
6+
import { buildCreateFormUrl } from '@/tools/google_forms/utils'
77
import type { ToolConfig } from '@/tools/types'
88

99
export const createFormTool: ToolConfig<

apps/sim/tools/google_form/create_watch.ts renamed to apps/sim/tools/google_forms/create_watch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type {
22
GoogleFormsCreateWatchParams,
33
GoogleFormsCreateWatchResponse,
44
GoogleFormsWatch,
5-
} from '@/tools/google_form/types'
6-
import { buildCreateWatchUrl } from '@/tools/google_form/utils'
5+
} from '@/tools/google_forms/types'
6+
import { buildCreateWatchUrl } from '@/tools/google_forms/utils'
77
import type { ToolConfig } from '@/tools/types'
88

99
export const createWatchTool: ToolConfig<

apps/sim/tools/google_form/delete_watch.ts renamed to apps/sim/tools/google_forms/delete_watch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type {
22
GoogleFormsDeleteWatchParams,
33
GoogleFormsDeleteWatchResponse,
4-
} from '@/tools/google_form/types'
5-
import { buildDeleteWatchUrl } from '@/tools/google_form/utils'
4+
} from '@/tools/google_forms/types'
5+
import { buildDeleteWatchUrl } from '@/tools/google_forms/utils'
66
import type { ToolConfig } from '@/tools/types'
77

88
export const deleteWatchTool: ToolConfig<
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type {
22
GoogleForm,
33
GoogleFormsGetFormParams,
44
GoogleFormsGetFormResponse,
5-
} from '@/tools/google_form/types'
6-
import { buildGetFormUrl } from '@/tools/google_form/utils'
5+
} from '@/tools/google_forms/types'
6+
import { buildGetFormUrl } from '@/tools/google_forms/utils'
77
import type { ToolConfig } from '@/tools/types'
88

99
export const getFormTool: ToolConfig<GoogleFormsGetFormParams, GoogleFormsGetFormResponse> = {

apps/sim/tools/google_form/get_responses.ts renamed to apps/sim/tools/google_forms/get_responses.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type {
22
GoogleFormsGetResponsesParams,
33
GoogleFormsResponse,
44
GoogleFormsResponseList,
5-
} from '@/tools/google_form/types'
6-
import { buildGetResponseUrl, buildListResponsesUrl } from '@/tools/google_form/utils'
5+
} from '@/tools/google_forms/types'
6+
import { buildGetResponseUrl, buildListResponsesUrl } from '@/tools/google_forms/utils'
77
import type { ToolConfig } from '@/tools/types'
88

99
export const getResponsesTool: ToolConfig<GoogleFormsGetResponsesParams> = {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { batchUpdateTool } from '@/tools/google_forms/batch_update'
2+
import { createFormTool } from '@/tools/google_forms/create_form'
3+
import { createWatchTool } from '@/tools/google_forms/create_watch'
4+
import { deleteWatchTool } from '@/tools/google_forms/delete_watch'
5+
import { getFormTool } from '@/tools/google_forms/get_form'
6+
import { getResponsesTool } from '@/tools/google_forms/get_responses'
7+
import { listWatchesTool } from '@/tools/google_forms/list_watches'
8+
import { renewWatchTool } from '@/tools/google_forms/renew_watch'
9+
import { setPublishSettingsTool } from '@/tools/google_forms/set_publish_settings'
10+
11+
export const googleFormsGetResponsesTool = getResponsesTool
12+
export const googleFormsGetFormTool = getFormTool
13+
export const googleFormsCreateFormTool = createFormTool
14+
export const googleFormsBatchUpdateTool = batchUpdateTool
15+
export const googleFormsSetPublishSettingsTool = setPublishSettingsTool
16+
export const googleFormsCreateWatchTool = createWatchTool
17+
export const googleFormsListWatchesTool = listWatchesTool
18+
export const googleFormsDeleteWatchTool = deleteWatchTool
19+
export const googleFormsRenewWatchTool = renewWatchTool
20+
21+
export * from './types'

0 commit comments

Comments
 (0)