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

# Email Execution

> Triggering agent executions by sending an email

## What is Email Execution?

Email execution allows you to trigger an agent execution by sending an email to a unique email address. The email subject, body, and any attachments will be used as input for the execution.

This is useful when you want to integrate an agent into an email-based workflow without writing any code or calling the API directly.

## Enabling Email Execution

To enable email execution for an agent, follow these steps:

1. Open the agent in the editor.
2. Navigate to the **Entrypoints** section.
3. Find the **Email** card.
4. Toggle the switch on the **Email** card to enable it.

Once enabled, a unique execution email address will be generated for your agent.

<img src="https://mintcdn.com/logic/JFme65otZYsTtNer/screenshots/email_execution_disabled.png?fit=max&auto=format&n=JFme65otZYsTtNer&q=85&s=bf2b04ae15ccd7ad36040847a0e7fa24" alt="email execution disabled" width="3840" height="2160" data-path="screenshots/email_execution_disabled.png" />

<Warning>
  The execution email address acts as a secret credential. Anyone with the
  address can trigger executions on your agent. Treat it like an API key and do
  not share it publicly.
</Warning>

## Your Execution Email Address

After enabling email execution, you can view and copy your agent's execution email address from the **Email** card in the **Entrypoints** section.

<img src="https://mintcdn.com/logic/JFme65otZYsTtNer/screenshots/email_execution_enabled.png?fit=max&auto=format&n=JFme65otZYsTtNer&q=85&s=00e656fd57690830684f38bf2e848141" alt="email execution enabled" width="3840" height="2160" data-path="screenshots/email_execution_enabled.png" />

The email address is hidden by default. Click the eye icon to reveal it, then use the **Copy** button to copy it to your clipboard.

## Sending an Email

To trigger an execution, send an email to your agent's execution email address. The following parts of the email are passed as input to the agent:

* **Subject** — the email subject line
* **Body** — the plain text body of the email
* **Attachments** — any files attached to the email

### Targeting a Specific Version

By default, the live (published) version of the agent will be executed. To execute a different version, add one of the following tags to the email subject line:

* `[draft]` — Execute the current draft version
* `[<version-uuid>]` — Execute a specific version by its UUID

For example, an email with the subject `Process this report [draft]` would execute the current draft version of the agent.

### Attachments

Email execution supports file attachments. Attachments are uploaded and passed to the agent as part of the execution input.

<Note>
  The total size of all attachments must not exceed 25 MB. The email body
  (excluding attachments) must not exceed 100 KB.
</Note>

## Viewing Execution Results

Executions triggered via email appear in the agent's execution history alongside API-triggered executions. You can view the input, output, and status of each execution in the agent's **Execution history**.

If an email fails validation (for example, if the agent has no published version), a failed execution record will still appear in the history so you can diagnose the issue.

## Regenerating the Email Address

If you need to replace your agent's execution email address, click the **Regenerate** button on the **Email** card in the **Entrypoints** section.

<Warning>
  The old email address will stop working immediately. Any integrations using
  the old address will need to be updated with the new one.
</Warning>

## Disabling Email Execution

To disable email execution, toggle the switch on the **Email** card off. This will revoke the current email address and prevent any further email-triggered executions.

<Warning>
  The current email address will stop working immediately. Any integrations
  using this address will no longer be able to trigger executions.
</Warning>

## Requirements

The agent must have a published version for email execution to work, unless you are targeting the draft version by adding `[draft]` in the subject.

<Info>
  Learn more about publishing and versioning in the [Spec
  History](/guides/versions-and-history/spec-history) section.
</Info>
