← Features Feedback →

Example: Email Assistant

This guide builds up an email assistant in three stages — starting with sending, then adding receive, and finally automating inbox triage with channels and scheduled prompts. Each stage teaches you a new part of how Prosponsive and n8n work together.

Prerequisites: Complete the Install Guide and read through Prosponsive Basics before starting here.

1. Add the Send Email Tool

The first thing the Email Assistant needs is the ability to send email. You'll install this from the tool catalog — which also walks you through adding your SMTP credentials to n8n.

Email Assistant is an example agent that ships with Prosponsive. If you don't see it in the Agents tab, make sure you're on v1.0.28 or later.

Step 1: Open the Email Assistant agent

  1. Click the Agents tab in the sidebar.
  2. Select Email Assistant.

Step 2: Add the Send Email tool

  1. In the agent editor, click Add Tool in the tools panel.
  2. In the tool catalog, type Send Email to filter the list, then select Send EmailEmailSend.
  3. A credential prompt appears with a dropdown. Click + Add new SMTP Credential… — this opens the n8n Credentials page in your browser.

Step 3: Create an SMTP credential in n8n

  1. On the n8n Credentials page, click the orange Create Credential button in the top-right corner. Search for and select SMTP. Fill in your mail server details:
    FieldGmailOutlook / Microsoft 365iCloud
    Hostsmtp.gmail.comsmtp.office365.comsmtp.mail.me.com
    Port465587465
    PasswordApp passwordYour password or app passwordApp-Specific Password
    SSL/TLSEnabledEnabledEnabled
  2. Click Save to store the credential.

Gmail users: Gmail requires an App Password instead of your account password. Go to myaccount.google.com/apppasswords, generate one for "Prosponsive", and use that here.

iCloud users: Go to your iCloud account page → App-Specific Passwords, generate one for "Prosponsive", and use that here.

Outlook / Microsoft 365 users: You may need to ensure "Authenticated SMTP" is enabled for your specific mailbox in the Microsoft 365 admin center.

Step 4: Install the tool

  1. Switch back to Prosponsive. The credential dropdown automatically refreshes — if you created one credential, it's selected for you. If you created more than one, pick the right one from the dropdown.
  2. Click Add Tool. Prosponsive generates a workflow in n8n and adds the tool to the Email Assistant agent automatically.

Step 5: Add your from email address to the agent

The Send Email tool requires a From address with every message. You'll add your email address directly to the agent definition so it always knows to use it.

  1. Open the Email Assistant agent editor in Prosponsive.
  2. Near the bottom of the agent definition, in the Guardrails section, add a line:

    My email address for sending is you@example.com. Always use this as the fromEmail parameter when calling send tools.

  3. Replace you@example.com with your actual SMTP account email address, then save.

2. Compose and Send Your First Email

With Send Email installed, try it out.

  1. Create a channel by typing "Hello Prosponsive" — this starts a new channel and activates the channel controls.
  2. Share the channel to the Email Assistant using the controls panel that appears above the message list.
  3. Now ask the agent to send something:

    Send a quick note to alex@example.com — subject "Checking in", body "Hey Alex, just following up on our conversation from last week. Let me know if you have time to chat."

  4. The agent will show you the full draft before sending — review it, then reply "Send it" to confirm. If it skips straight to the send card, reply "Show me the draft first" to get a preview.

The agent won't send without your confirmation unless you explicitly tell it to proceed directly. This is the default guardrail — you can remove it from the agent definition once you're comfortable.


3. Set Up Email Receiving

Now let's give the agent the ability to read your inbox. This step uses a pre-built workflow you import into n8n and configure with your IMAP credentials. IMAP is the protocol for reading email — separate from SMTP, which you set up in Section 1 for sending. Most mail providers support both.

Step 1: Import the Email Receive workflow into n8n

  1. Click the n8n tab in the sidebar and open Workflows.
  2. Click the orange Create workflow button to open a blank canvas. In the canvas editor, click the menu in the top-right corner and select Import from file. Select email-receive.json from the Tools folder inside the Prosponsive project directory you selected at install time.
  3. The workflow opens with three nodes: Tool WebhookRead InboxFormat Emails.

Step 2: Add your IMAP credential

Same account, different protocol. SMTP (which you set up in Section 1) is the send protocol. IMAP is the read protocol. Your email provider uses both — same username and password, just a different credential type in n8n.

  1. Double-click the Email Read IMAP (Prosponsive) node on the canvas, then click the Set up Credential button that appears in the node panel.
  2. Fill in your server details:
    FieldGmailOutlookiCloud
    Hostimap.gmail.comoutlook.office365.comimap.mail.me.com
    Port993993993
    PasswordApp passwordYour password or app passwordApp-Specific Password
    SSL/TLSEnabledEnabledEnabled
  3. Click the orange Create Credential button in the top-right corner of n8n.

Outlook / Microsoft 365 users: You may need to ensure IMAP access is enabled for your specific mailbox in the Microsoft 365 admin center.

Step 3: Save and activate

  1. After filling in your credentials, click Save in the credential form. This closes the form and returns you to the node panel.
  2. Close the node panel (click the or click outside it). The workflow saves automatically.
  3. Click Publish (top-right). A version note popup appears — leave it as-is and click Publish again to confirm.

Step 4: Add the tool to the Email Assistant

  1. Back in Prosponsive, open the Email Assistant agent editor and click Add Tool.
  2. Under Workflows, find Email Receive: Read Inbox — it appears now that the workflow is active. If you don't see it, click the refresh button (the circular arrow icon at the top-right of the tool catalog) to pull the latest list from n8n.
  3. Select it and click Add.

Test it:

Check my email

The tool fetches up to 20 emails per run and tracks its position using the IMAP UID of the last message it processed. Each subsequent run picks up where the previous one left off — only new emails are submitted. Your inbox read/unread state is never touched. Each email is submitted individually for agent inference and appears as its own thread in the Email channel. Switch to the Email channel to see them arrive. The tool returns a count of emails processed, but the actual content and agent responses are in the Email channel, not in the channel where you typed the command.

You can control how many emails are fetched in a single run by telling the agent how many you want — up to 50:

Check my last 5 emails


4. Automate with a Channel and Scheduled Prompt

Instead of asking the agent to check email manually, set up a channel and a scheduled prompt so it runs on its own.

Step 1: Add a scheduled prompt

  1. Open SettingsScheduled Prompts and click Add Scheduled Prompt.
  2. Configure it:
    FieldValue
    PromptCheck for new emails and summarize what needs my attention.
    AgentEmail Assistant
    ChannelEmail
    ScheduleEvery 30 minutes (or whatever cadence suits you)
  3. Click Save and toggle it on.

The Email Assistant now checks your inbox on the schedule you set. Each new email appears as its own thread in the Email channel automatically — no manual prompting needed.


5. Organize with Channels

As the agent's summaries arrive in the Email channel, you can move threads to project-specific channels to keep things organized.

Move a thread manually

  1. Open the Email channel and find a thread you want to move.
  2. Reply to it:

    Move this to Project Zen

  3. The agent proposes a move-thread tool card targeting "Project Zen". Approve it.

The thread moves to the Project Zen channel (created automatically if it doesn't exist). A tombstone link is left behind in Email so you can find it later.

Teach the agent to route automatically

Add routing rules to the agent definition so it proposes moves on its own. Open the Email Assistant agent editor and add a new ## Routing Rules section at the end of the agent description with a table like this:

## Routing Rules

| Channel | When to route |
|---|---|
| `Project Zen` | Email is about Project Zen — mentions the project name, related people, or deliverables. |
| `Approvals` | Email is requesting my approval or sign-off. |

Save the agent. It will now propose move-thread cards automatically for emails matching these rules.


6. Bulk Actions and Auto-Approval

Once routing rules are in place and a few emails have arrived, you can review and approve proposed actions in bulk.

Group by tool name

  1. In the Email channel, move your cursor toward the top of the message list — a Filter & Group control bar slides down from the top edge. Click it to expand the options.
  2. Set Group by to Tool.
  3. Set Filter to Move Thread.
  4. All "Move Thread" proposals appear together under a single group header.

Bulk-approve the group

  1. Review the grouped cards to confirm the routing looks right.
  2. Click Approve All on the group header.
  3. All pending move-thread actions execute at once.

Set up auto-approval

Once you're confident a routing rule is correct, you can stop seeing approval cards for it entirely. To get a fresh card to work with, send yourself a test email that will trigger the rule — for example, an email mentioning "Project Zen". When the approval card appears:

  1. Find the Move Thread approval card for the channel you want to auto-approve.
  2. Open the dropdown on the card and choose Auto-approve.
  3. Prosponsive creates the rule for you — no manual configuration needed.

Future Project Zen routing happens silently. You only see a card for channels you haven't auto-approved yet, or when the agent is unsure about a match.


7. Add Trash Rules

To move emails to trash on your mail server, you'll install the Email Move To Folder tool — a separate n8n workflow that issues IMAP move commands. Once it's installed, you teach the agent which folder is your trash and when to use it.

Step 1: Import and activate the Email Move To Folder workflow

  1. Click the n8n tab in the sidebar and open Workflows.
  2. Click the orange Create workflow button, then click the menu in the top-right corner of the canvas and select Import from file. Select email-move-to-folder.json from the Tools folder inside your Prosponsive project directory.
  3. Double-click the IMAP Move Email node and set the same IMAP credential you created in Section 3.
  4. Click Publish to activate the workflow.
  5. Back in Prosponsive, open the Email Assistant agent editor and click Add Tool. Under Workflows, find Email Move To Folder and add it. If you don't see it, click the refresh button at the top-right of the tool catalog.

Step 2: Find your trash folder name

The trash folder name varies by provider:

ProviderTrash folder name
Gmail[Gmail]/Trash
Outlook / Microsoft 365Deleted Items
iCloudDeleted Messages
OtherTrash (most providers)

Step 3: Add trash rules to the agent definition

Open the Email Assistant agent editor and add a new ## Trash Rules section at the end of the agent description:

## Trash Rules

- **CRITICAL: Evaluate trash rules BEFORE routing rules.** If a trash rule matches, move to trash immediately — do not evaluate routing rules.
- Apply these trash rules when deciding `email_move_to_folder` trash actions:
  - **Thread participation override**: NEVER trash if the thread contains a previous reply from me. If I have participated in the thread, skip all trash rules.
  - **Unsubscribe signals**: Trash when the HTML body contains any unsubscribe, manage preferences, or opt-out link.
  - **Marketing / promotional content**: Trash bulk marketing — product recommendations, promotional offers, newsletters, "shop now" calls-to-action.
  - **Cold sales solicitation**: Trash unsolicited outreach attempting to sell a product or service — no prior relationship, generic pitch, book-a-demo CTA.

In the Tool Parameter Guidance section, add:

When calling `email_move_to_folder` to trash an email, provide these parameters:
- **folderName**: The trash folder for this account (e.g. `[Gmail]/Trash`, `Deleted Items`, `Deleted Messages`, or `Trash`)
- **uid**: The numeric IMAP UID from the Request Context (always a plain integer, never a UUID)
- **mailbox**: From the Request Context (default to `INBOX` if missing)

In the Guardrails section, add:

- First evaluate trash rules. If a match, call `email_move_to_folder` with the trash folder. Then evaluate channel routing rules. If a match, call `move-thread`. If no rules match and no action needed, summarize and ask me.

Test it

Wait for a marketing email or newsletter to arrive. The Email Assistant will propose an email_move_to_folder card targeting your trash folder with a reason. Approve it and the email moves to trash on your mail server — recoverable any time from your email client.


← Features Feedback →