Back to Gmail in Google Sheets
SheetXAI logo
Gmail logo
Gmail · Google Sheets Guide

Export All Gmail Filters Into a Sheet for a Security Audit

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a system administrator. A colleague on the security team pinged you this morning: someone may have added an unauthorized forwarding rule to the shared team Gmail inbox three weeks ago, and nobody noticed.

There are 45 filter rules on the inbox. You need to audit all of them, document the criteria and actions, and get the list to the security team by noon.

The bad version:

  • You open Gmail Settings > See all settings > Filters and Blocked Addresses
  • Gmail shows you 45 filter rules in a cramped table
  • You start copying each one into a sheet: from address, subject keyword, action (apply label, forward, delete, skip inbox)
  • Row 12 has two actions and does not fit cleanly into your columns
  • You lose your place twice
  • At noon you have 30 filters logged, 15 to go, and the security team is waiting.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI uses Gmail's filters API to pull every rule in one operation, so you are not reading a settings page and typing.

Open the SheetXAI sidebar and type:

List all Gmail filters for my account and write their filter ID, criteria (from address, subject, has words), and actions (apply label, forward to, delete, skip inbox) into this sheet. One row per filter, headers in row 1.

SheetXAI calls Gmail's filter list endpoint, fetches all 45 rules, and writes them into the sheet. Every filter, every criterion, every action — in under a minute.

What You Get

A complete filter audit sheet, one row per filter:

  • Column A — filter ID (needed if you want to delete specific filters later)
  • Column B — "from" criterion (sender address or domain)
  • Column C — "subject" criterion
  • Column D — "has words" criterion
  • Column E — actions: apply label, forward to address, delete, skip inbox

The forwarding rules are in column E. If anything says "forward to" with an address outside your company domain, that is the one to investigate first.

You can ask SheetXAI to flag suspicious rows immediately. Add "highlight any filter where the action includes forwarding to an address outside @company.com" and it writes a flag into column F.

What If the Data Is Not Quite Ready

Filter audits often require follow-up actions based on what you find.

When you want to flag forwarding rules automatically

You do not want to scan column E manually for forwarding addresses.

List all Gmail filters and write filter ID, criteria, and actions into columns A through E. In column F, write "FLAG — external forward" for any filter where the action forwards to an address that does not end in '@company.com'. Write "OK" otherwise.

When you need to delete specific filters after reviewing the list

You have identified the bad ones by filter ID in column A and marked them in column G.

Delete the Gmail filters whose IDs are listed in column A where column G says "delete". Leave all other filters untouched. Write "deleted" into column H for each one removed.

When you want a summary count by action type

The security report needs aggregate numbers, not just the raw list.

List all Gmail filters into columns A through E. On the Summary tab, write a count of filters by action type: how many apply labels, how many forward, how many delete, how many skip inbox.

When you want the full audit and an action plan in one pass

Security wants the list and an immediate recommendation on what to remove.

List all 45 Gmail filters into columns A through E. Flag any external forwarding rules in column F. Then on the Recommendations tab, write a list of the filter IDs I should delete (external forwards, overly broad "delete" rules) and a one-line reason for each.

The pattern: the Gmail filter API returns the full list in one call. SheetXAI handles the fetch, the formatting, and any follow-up logic you add to the same prompt.

Try It

Get the 7-day free trial of SheetXAI and open any sheet, then ask it to pull your Gmail filter list for review. The Gmail integration is included in every SheetXAI plan. For related workflows, see how to search Gmail and pull matching emails into a sheet or the Gmail in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more