Blog

Trigger an AI Agent When an Email Arrives

Tutorial

ยท

Quick answer: To trigger an AI agent when an email arrives, add the Email Trigger to a BuildShip workflow and ship it. BuildShip gives the workflow a unique address in the form workflowId@buildship.email. Every message sent to that address starts a run, and the workflow can read the subject, body, attachments and metadata. Forward tenders from tenders@yourcompany.com to that address, let an AI step parse the brief, write a structured bid record to your database, and reply with a confirmation and a checklist of anything that is missing. A general chat agent cannot own an inbox, store the attachment or leave a log of what it filed.

Trigger an AI agent when an email arrives: a message hits the BuildShip email trigger, then an AI agent writes a bid record and replies

Most teams still treat inbound email as a pile. A tender lands at 16:40 on a Thursday, sits in a shared inbox, and someone opens it on Friday morning. By then the attachment has been forwarded twice, the deadline is in the subject line, and nobody has written a record of what was asked.

You do not need a new mail product for this. You need an address that starts an AI agent, and a backend that can file what the agent finds.

Why an email-triggered agent is different from โ€œask ChatGPT to summarise thisโ€

If you paste a tender into ChatGPT, you can get a neat summary. That is useful, and it is also a dead end:

  • You had to notice the email and paste it in.

  • The file is not stored against a bid record.

  • There is no reply with a missing-info checklist, unless you send it yourself.

  • There is no log of which message produced which summary.

The Email Trigger closes that gap. It is not a Gmail poller, and it is not a โ€œsearch my inbox every 15 minutesโ€ job. When you add the trigger, BuildShip generates a custom address for that workflow. Mail to that address is the event. The agent runs as the message arrives.

This is also different from our Gmail nodes, which search, read and send from a connected Gmail account, and from the invoice-in-Gmail walkthrough. Those posts start from Gmail. This one starts from mail that is sent, or forwarded, to a BuildShip address.

What the Email Trigger actually does

When you add an Email Trigger to a workflow, BuildShip creates an address in this form:

workflowId@buildship.email

If your workflow id is E0J4S2eQy5ND8fTXCCns, the address is E0J4S2eQy5ND8fTXCCns@buildship.email. You will see the actual address in the trigger once it is set up. Send a message to that address, and the workflow starts.

The entire email is available to the workflow as the request body: subject, body, attachments and metadata. You can reach those fields from the context menu in later nodes, the same way you map any other trigger payload.

You do not configure a third-party webhook, and you do not paste an API key into a mail vendor. The address is the trigger.

Two practical ways to use it:

  • Give the raw address to a small internal group, for example the bid team, as a drop-box.

  • Keep a public or shared address you already own, such as tenders@yourcompany.com or rfps@yourcompany.com, and forward that mailbox to the BuildShip address. People keep writing to a normal-looking address. The agent still wakes on every message.

An email sent or forwarded to a unique workflowId@buildship.email address starts the Email Trigger and hands the subject, body, attachments and metadata to a BuildShip AI agent

The address is the trigger. Keep a familiar public address and forward it, or send straight to the BuildShip inbox.

A concrete case: file a tender and reply with what is missing

Take a services firm that receives requests for proposal by email. The messages are uneven. Some have a clear deadline, budget and scope in a PDF. Some are a short paragraph with a file that does not open cleanly. The bid team wants a record in their database the moment a tender arrives, and a polite reply that confirms receipt and lists anything they still need.

Here is the path I would build:

  1. A sender writes to tenders@yourcompany.com. The mailbox forwards the message to the workflowโ€™s @buildship.email address.

  2. The Email Trigger starts the workflow with the full message.

  3. The workflow stores the raw attachments in file storage, so you keep the original files even if the agent misreads one.

  4. An AI step reads the subject, body and attachments, and extracts a structured brief: client name, deadline, budget if stated, scope, and a list of missing items (deadline, contact, file, budget band).

  5. That brief is written to a bids table or collection, with a status such as new and a link to the stored files.

  6. The workflow replies to the sender: we have the request, here is the reference id, and here is what we still need, if anything. If the brief is complete, the reply can be a simple confirmation.

The model is there to read messy language and messy PDFs. The database row, the stored files and the reply are the parts a chat window cannot do.

Do not use this pattern to extract vendor invoices. We already have a Gmail invoice post for that. This agent files a bid, not a bill.

A forwarded tender is parsed by an AI agent, a structured bid record is written to the database, and a confirmation email goes back with a missing-info checklist

Store the original files first. Then let the agent extract the brief, write the bid record and reply with a reference id.

Set up the trigger

  1. Create a new workflow, or open one you want to start from email. If a workflow already has a different trigger you do not want, the docs note that you can remove it and add the Email Trigger instead. You can also keep multiple triggers on one workflow if you want the same logic to start from more than one place.

  2. Click Add a Trigger and choose Email Trigger.

  3. Save or ship the workflow and copy the custom address that BuildShip generates.

  4. Send a test email to that address from your own inbox, with a short subject, a body and, if you can, a PDF attachment.

  5. In the workflow, open the context menu and map the email fields you need: subject, body, sender, attachments, received time. Use those as workflow inputs.

There is very little else to configure. The interesting work is in what the workflow does with the message.

If you are forwarding from an existing mailbox, set up the forward in that host (Google Workspace, Microsoft 365 or whoever holds tenders@) after the test message has come through the raw BuildShip address. Then send a second test to the public address and confirm a new run appears.

Build the tender agent

Keep the original. Before any model runs, save attachments to BuildShip file storage or your own bucket, and keep the storage URLs on the bid record. If a PDF is scanned or password-protected, you still have the file to open by hand.

Extract a brief, not an essay. Add an AI node (keyless nodes run on your BuildShip credits, or you can bring your own provider key) with a tight instruction:

> You are filing an incoming tender for a bid team. From the email subject, body and attachments, extract: client or sender name, a one-paragraph scope, deadline if present, budget if present, submission instructions, and a list of missing items that a bidder would usually need. If a field is not in the email, leave it empty and add it to the missing list. Do not invent a deadline or a budget.

Ask for structured output so you can write columns rather than a blob of prose.

Write the record. Create a row in your bids table with the extracted fields, the sender, the storage URLs, the raw subject, and a status of new. Give it a short public reference, such as BID-1842, so the reply can quote it and the team can find it.

Reply once, clearly. Send a reply to the original sender. If the missing list is empty, confirm receipt and the reference id. If something is missing, include the checklist and invite them to reply to the same thread. You can send from your own domain with an email node. A Branch node can skip the reply if the message is an auto-acknowledgement or an out-of-office, which you can often detect from headers or a short script check on the subject.

Tell the team. A Slack or email notification to the bid channel, with the reference id, client name and deadline, is enough. The database is the source of truth, not the chat thread.

If you would rather not wire the canvas by hand, click Build with AI to open Compass and describe the flow in plain language. It builds on your actual canvas, so you can still test and edit every step. For bids that need a longer review, the workflow can hand off to an AI agent built with Agent Max, which can call your other workflows as tools.

A chat agent can summarise a tender only after you paste it. A BuildShip email agent receives the message, stores the files, writes a bid record and replies, with a log of the run

The value is not a better summary. It is a record, a stored attachment and a reply that already went out.

Test it, ship it and watch the first real tender

  1. Send a test message to the @buildship.email address with a dummy brief and a PDF.

  2. Confirm a run appears, the attachment was stored, and the bid record looks right.

  3. Click Ship if you have not already, then send a second test through your public forwarding address.

  4. Read the reply as if you were the sender. Adjust the prompt if the missing-info list is too eager or too shy.

Open the logging panel at the bottom of the workspace to see what happened. You can switch from the Workflow view to the Node view to read the logs for a single step, and test runs show live logs as they happen. Production logs usually show up within about 45 seconds, and the refresh icon loads them straight away. To add your own messages, use the Log Message to Console node, or call logging.log inside any nodeโ€™s code.

See the logging docs and the node failure docs for retries and errors. Use version history before you change a live reply prompt, because this agent writes to customers.

A few guardrails are worth adding early:

  • Ignore obvious auto-replies, so you do not file an out-of-office as a new tender or start a reply loop.

  • Cap attachment size in your own checks, and log a human task if a file cannot be parsed.

  • Do not let the agent send a bid, commit a price or accept a deadline. It files and confirms. People decide whether to bid.

Built for teams that run this in production

Inbound-email agents end up in production quickly, so a few things matter beyond the first test:

  • Full code access. Open any node to read or change its JavaScript or TypeScript.

  • Team access control. Role-based access lets you decide who can view a workflow, who can edit it and who can ship it.

  • Your own Google Cloud. Workflows run on Google Cloud, and you can run them in your own Google Cloud project as an enterprise option.

  • A log per message. When a client says they sent a tender yesterday, you can open the run and see whether it arrived, what was extracted and what was sent back.

Email is one of the listeners we talk about in Why AI Agents Need Listeners, Not Cron Jobs. If your team still forwards tenders into a shared inbox and hopes someone sees them, this is a better first listener than a Friday reminder.

FAQ

Can I trigger an AI agent when an email arrives?

Yes. Add the Email Trigger to a BuildShip workflow. BuildShip gives you a unique workflowId@buildship.email address. Every message sent to that address starts the workflow, and an AI node in the same workflow can read the subject, body and attachments.

What is the email address format?

It follows workflowId@buildship.email. You copy the exact address from the trigger after you add it. You can send to it directly, or forward mail from an address you already own.

Can the agent read attachments?

Yes. Attachments are part of the email content the trigger exposes to the workflow. Store the files first, then pass them to an AI step to extract a structured brief.

Is this the same as the Gmail nodes?

No. Gmail nodes connect to a Gmail account and can search, read and send from that account. The Email Trigger is a dedicated BuildShip inbox that starts a workflow when a message arrives at its address. You can still use email nodes in the same workflow to send the reply from your own domain.

Will this work with a shared tenders@ address?

Yes. Keep tenders@yourcompany.com as the address people already use, and forward that mailbox to the BuildShip address. Test the raw BuildShip address first, then test the forward.

How do I stop auto-replies from creating bid records?

Add a Branch or script node early in the workflow that drops out-of-office messages, delivery failures and messages you have already filed. Check the subject, headers and whether a bid with the same sender and subject already exists.

How much does it cost to try?

BuildShip plans start with a 7-day trial, and a card is required to start it. See the pricing page for plans and credits.

Start building

Start your 7-day trial (a card is required), add the Email Trigger, and send yourself a dummy tender. If you are building inbound agents for a larger team, talk to us about enterprise.

You might also like

All it takes is an idea.

Imagine. Build. Ship.

Subscribe to our newsletter

Stay in the loop with product updates and news.

ยฉ 2026 BuildShip, Rowy Inc.

All it takes is an idea.

Imagine. Build. Ship.

Subscribe to our newsletter

Stay in the loop with product updates and news.

ยฉ 2026 BuildShip, Rowy Inc.

All it takes is an idea.

Imagine. Build. Ship.

Subscribe to our newsletter

Stay in the loop with product updates and news.

ยฉ 2026 BuildShip, Rowy Inc.