View as Markdown
Gmail icon

Gmail ACTION

Delete Filter

Permanently delete a Gmail filter from the authenticated user's settings. Mail already processed by the filter is not changed; the filter simply stops applying to future incoming mail. The Gmail API deletes by filter ID — call List Filters first to find the id of the filter to remove. See the documentation.
  • Action
  • Writes data
  • Destructive
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Gmail account once, then configure and run Delete Filter from your backend or agent.

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: "gmail-delete-filter",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    gmail: { authProvisionId: "apn_xxxxxxx" },
    filterId: "Filter ID",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Delete Filter inputs
Property Type Description
filterId Filter ID string
The ID of the filter to permanently delete (e.g. ANe1BmjXXXXXXXX). Use the List Filters action to look up filter IDs and inspect each filter's criteria before deleting.
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
gmail-delete-filter
Version
0.0.1
App
Gmail
Authentication
OAuth
Read-only
No
Destructive
Yes
Open world
Yes