# Delete Form Item — Google Forms

> Permanently deletes one item (question, image, video, or page break) from a Google Form by its item ID. Use it when the user asks to delete, remove, or drop a question from a form. Deletion cannot be undone through the API: before calling…

- Key: `google_forms-delete-item`
- 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/delete-item
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/google_forms/actions/delete-item/delete-item.mjs

## Description

Permanently deletes one item (question, image, video, or page break) from a Google Form by its item ID. Use it when the user asks to delete, remove, or drop a question from a form. Deletion cannot be undone through the API: before calling this, ask the user to confirm, and always do so for bulk requests such as "delete every question" (name the items and wait for a yes). Call it only after the user has confirmed. To find an item's ID, use **Get Form** and read `items[].itemId`. The tool looks up the item's current position itself, so earlier deletions never shift which item is removed; if someone else edits the form in between, the call fails without deleting anything, so call it again. Returns the deleted item's `itemId`, `title`, and former `index`. Example: formId=`1FAIpQLSdExampleFormId`, itemId=`3f9a21c0` → returns itemId `3f9a21c0`, its title, and the position it held. [See the documentation](https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate#deleteitemrequest)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `formId` | `string` | Yes | The ID of the form to delete the item from, e.g. 1FAIpQLSdExampleFormId. It is the formId returned by Create Form or Get Form. |
| `itemId` | `string` | Yes | The stable ID of the item to delete, e.g. 3f9a21c0. Use Get Form and read items[].itemId to find it. |

## 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-delete-item",
  arguments: {
    formId: "Form ID",
    itemId: "Item ID",
  },
})
```

**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-delete-item",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_forms: { authProvisionId: "apn_xxxxxxx" },
    formId: "Form ID",
    itemId: "Item ID",
  },
})

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-delete-item",
    "configured_props": {
      "google_forms": { "authProvisionId": "apn_xxxxxxx" },
      "formId": "Form ID",
      "itemId": "Item ID"
    }
  }'
```

---

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