> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerodrift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pre-Send Email Check

> Have the assistant check an email with ZeroDrift before it sends. How it works on the hooks version, and on the OpenAI directory plugin without.

**Install first.** These guides need the ZeroDrift plugin. Install it once from the ChatGPT plugin marketplace and it is available everywhere, in ChatGPT and in Codex. See [ChatGPT and Codex Plugin](https://docs.zerodrift.com/codex-plugin.md) for the steps.

[![](https://docs.zerodrift.com/images/openai-plugin/openai-logo-white.png)
Add to ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6af4ea9184388191b9ee1ff948e85d34)

Opens the ZeroDrift listing in the ChatGPT plugin directory. Installing it also enables the plugin in Codex.

Have ChatGPT or Codex check an email before it sends one. The two distributions of the plugin do this in different ways, so this guide has a section for each. Read the one that matches how you installed the plugin.

## The two distributions

| | Hooks version (open-source repo) | OpenAI directory plugin (no hooks) |
| - | - | - |
| Includes hooks | Yes. Hooks come only from this plugin. | No. The package bundles and declares no hooks. |
| How the pre-send check works | Enforced by hooks (Gmail) | Directed by a skill |
| Flagged email | `Blocked`: the action is stopped | The skill tells the assistant to withhold the send and let you decide |

For install steps and the full matrix, see [ChatGPT and Codex Plugin](https://docs.zerodrift.com/codex-plugin.md).

## What it looks like

**A clean email, checked before it sends (ChatGPT).** The assistant had rewritten a flagged draft as neutral market commentary. The user said "check with zerodrift before sending". ChatGPT ran a validation and a pre-send check on the final email, and both returned "ZeroDrift: Passed — no issues found", with 0 policy violations and a job ID for each. It then started the Gmail send.

![ChatGPT showing ZeroDrift Passed for a revised email, with validation and pre-send job IDs, and the Gmail send initiated](https://mintcdn.com/zerodrift/n_fJ7ezsGYCnEs_W/images/openai-plugin/pre-send-clean-email.png?fit=max\&auto=format\&n=n_fJ7ezsGYCnEs_W\&q=85\&s=214f53e5c6db690d0f13c125e1209594)

**A clean email, sent (Codex).** Codex drafted a thank-you email and the user said "just send it". It was sent, with a note that ZeroDrift passed it with no issues.

**A flagged email, held back (Codex).** Asked to email a long internal message to a colleague, Codex checked the full email before sending and got Flagged. Codex did not send it, and asked whether to send it as written or revise it.

The assistant can also decline a send on its own judgment, separately from ZeroDrift. In one ChatGPT run, the assistant declined to send a flagged draft and offered to rewrite it before ZeroDrift was called.

**Flagged checks are recorded in Activity (ChatGPT).** The Activity page in ZeroDrift Command lists the flagged checks from ChatGPT, with the rules violated, for example "Forward Looking Disclaimer Missing +12" and "Forward Looking Unqualified +5". Source is Direct API, Client is ChatGPT, and the API key is ZeroDrift MCP.

![ZeroDrift Command Activity page with two Flagged checks and several Passed checks from the ChatGPT client](https://mintcdn.com/zerodrift/WnYfzPOJ4zWh4vgY/images/openai-plugin/activity-flagged-chatgpt.png?fit=max\&auto=format\&n=WnYfzPOJ4zWh4vgY\&q=85\&s=fb069355f086dfc784cb58dd171a63a1)

The screenshot shows the flagged results recorded in Activity. For what each distribution does with a flagged email, see the sections below.

## Hooks version

Applies to the hooks version only.

Setup: run `/hooks` in Codex and trust the ZeroDrift hooks. Codex asks again when an update changes them. Until you trust the hooks, Gmail actions are not checked before they run.

What happens:

* **Covered actions.** Gmail send, draft, draft update and forward in Codex are checked before the action runs.
* **Flagged.** A do-not-send finding shows as `Blocked` and the action is stopped. This flow was tested on the hooks version.
* **Passed or Warned.** The action goes through.
* **Plain text.** The body of a Gmail action must be plain text, and the hooks require a `subject` field. If a body is multipart or base64, the hook asks Codex to resend it as plain text before the check runs.
* **Slack and other tools.** Not checked automatically. On request only.

## OpenAI directory plugin (no hooks)

Applies to the directory distribution only (package version 0.1.9).

This package has no hooks. Only the hooks version includes hooks. This package includes a skill that tells the assistant to validate the final email, subject and body, before it sends. Nothing at runtime enforces the block.

What the skill tells the assistant to do:

* **Flagged.** Withhold the send and let you decide. In testing, the skill withheld a flagged send in both ChatGPT chat and ChatGPT Work.
* **Passed or Warned.** Proceed, and show any warnings with the send.
* **Cannot be checked.** Withhold the send and report that it was not checked. This was tested for the case where the service is unreachable.

**The block is not technically enforced.** With no hooks, ZeroDrift does not stop the send at runtime. It depends on the assistant following the skill. A repeat run of the flagged flow behaved the same way. If the assistant sends a flagged message anyway, check Activity for the result and ask the assistant to run the check again before sending.

If you want hooks that enforce the check, install the open-source plugin yourself from [`ZeroDriftAI/zerodrift-codex-plugin`](https://github.com/ZeroDriftAI/zerodrift-codex-plugin).

## Ordinary emails without a check request

The plugin does not call ZeroDrift when you ask for an ordinary note and do not request a check. In testing, asking for a thank-you note did not call ZeroDrift. A check runs when you ask for one, or when the assistant is about to send an email and the skill directs a check first.

## Limits

* **A guardrail, not a security boundary.** An assistant with other tools can send content some other way.
* **Attachments.** ZeroDrift validates text, not files directly. To check an attachment, ask ChatGPT to extract and format its contents for validation. Only the text ChatGPT sends is checked.
* **Original message of a forward, and saved drafts sent as-is.** See the matrix on [ChatGPT and Codex Plugin](https://docs.zerodrift.com/codex-plugin.md) for how each distribution handles them.
* **ZeroDrift does not rewrite.** "Revise" means the assistant revises. ZeroDrift checks the new version only when you ask.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.