# Create Choice Question — Google Forms

> Adds one multiple-choice (radio), checkbox, or dropdown question to a Google Form. Use it when the user asks for a question where responders pick from a fixed list of answers. To add a short-answer or paragraph question, use Create Text…

- Key: `google_forms-create-choice-question`
- Type: Action (Write)
- Version: 0.0.1
- App: Google Forms (`google_forms`) — https://pipedream.com/apps/google-forms.md
- This page (HTML): https://pipedream.com/apps/google-forms/actions/create-choice-question
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/google_forms/actions/create-choice-question/create-choice-question.mjs

## Description

Adds one multiple-choice (radio), checkbox, or dropdown question to a Google Form. Use it when the user asks for a question where responders pick from a fixed list of answers. To add a short-answer or paragraph question, use **Create Text Question** instead. When `index` is omitted the question is appended to the end of the form (the form is fetched to count its items; if someone else edits the form in between, the call fails instead of inserting mid-form, so call it again). `includeOther` works only with `RADIO` or `CHECKBOX`; the tool throws an error for `DROP_DOWN`. Each call adds exactly one question; call it again to add more. Returns the new question's `itemId`, `questionId`, `index`, `title`, `type`, `options` (the choice values), and `required`. Example: formId=`1FAIpQLSdExampleFormId`, title=`Preferred meeting day`, type=`RADIO`, options=[`Monday`,`Wednesday`,`Friday`], required=true → returns the new item's itemId and its position in the form. [See the documentation](https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate#createitemrequest)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `formId` | `string` | Yes | The ID of the form to add the question to, e.g. 1FAIpQLSdExampleFormId. It is the formId returned by Create Form or Get Form. |
| `title` | `string` | Yes | The question text shown to responders, e.g. Preferred meeting day. |
| `type` | `string` | Yes | How responders choose, e.g. RADIO: RADIO (pick one), CHECKBOX (pick several), or DROP_DOWN (pick one from a dropdown). |
| `options` | `string[]` | Yes | The answer choices, in display order, e.g. ["Monday", "Wednesday", "Friday"]. Provide at least one. |
| `description` | `string` | No | Optional helper text shown under the question, e.g. Pick the day that suits you best. |
| `required` | `boolean` | No | Set to true to make an answer mandatory, e.g. true. When omitted the question is optional. |
| `includeOther` | `boolean` | No | Set to true to add a free-text "Other" choice, e.g. true. Only valid with RADIO or CHECKBOX. When omitted no "Other" choice is added. |
| `shuffle` | `boolean` | No | Set to true to show the options in random order to each responder, e.g. true. When omitted the order is kept. |
| `index` | `integer` | No | 0-based position to insert the question at, e.g. 0 for the top of the form. Must be between 0 and the current number of items. When omitted the question is appended to the end. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "google_forms",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "google_forms-create-choice-question",
  arguments: {
    formId: "Form ID",
    title: "Title",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "google_forms-create-choice-question",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_forms: { authProvisionId: "apn_xxxxxxx" },
    formId: "Form ID",
    title: "Title",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "google_forms-create-choice-question",
    "configured_props": {
      "google_forms": { "authProvisionId": "apn_xxxxxxx" },
      "formId": "Form ID",
      "title": "Title"
    }
  }'
```

---

- App: https://pipedream.com/apps/google-forms.md · All apps: https://pipedream.com/apps
