Skip to main content
By the end of this guide, each new email in your inbox is read by an agent that sorts it into urgent, needs a reply, FYI or junk. Urgent mail is summarized in an email to you, and mail that needs a reply gets a fixed acknowledgement in its own thread. The agent has no tools, so the workflow is a no-machine run and keeps working when your computer is off. The Gmail integration delivers each new inbox message as a trigger event and does the reading and sending, so the agent only decides.

Before you begin

  • The reliant CLI, v1.21 or later, signed in (Sign in and tokens), and a Reliant project for the repository the workflow lives in.
  • The Gmail integration connected under Settings → Integrations.
  • In an organization with other members: an organization AI account that can run the fast model. See What this does not do.
1

Write the workflow

.reliant/workflows/email-triage.yaml
The trigger fires for each message added to the inbox; Gmail is polled about every five minutes. Its filter skips noreply and bounce senders, so the acknowledgement never answers a machine. The payload has headers and a snippet, not the body, so read fetches the message. The agent sees the body as quoted data and answers only through the triage tool, whose category is one of four values.No text the model writes is ever sent to the sender: the acknowledgement is your fixed ack_text, and only you receive the summary.
2

Test it with scenarios

A scenario fires the trigger with a payload and mocks Gmail and the agent:
.reliant/workflows/email-triage/scenarios/question_gets_an_acknowledgement.yaml
Add one scenario per path (urgent, newsletter, unreadable message, refused send), then run them:
terminal
reliant workflow lint reports 0 lint error(s), 0 warning(s) once every ending has a scenario.
3

Enable it with no machine

Commit the workflow, set notify_to to your address, and enable it. In the app: Workflows → Library → email-triage → Enable, with Runs on set to No machine. From a terminal:
terminal
It listens through your default Gmail connection; --connection gmail=<connection-id> picks another mailbox; reliant integrations list --integration gmail prints the ids.
4

Send a test email and verify

From another account, email the connected mailbox a question such as “Can I move my plan to annual billing?”. Within about five minutes:
terminal
The newest row should say launched with a chat ID. The sender should get the acknowledgement as a reply in the same thread, and the run’s last message reads needs_reply: <subject> (<summary>). Open it under Workflows → Runs to see how the agent classified the mail.

What this does not do

  • It doesn’t label, archive or mark mail read. The Gmail connection can send and read, not change the mailbox, so the classification lives in the run, not in Gmail.
  • It doesn’t write replies for you. The acknowledgement is fixed text. A model-written reply sent to a stranger, unattended, could be steered by the email it answers. Draft replies yourself, or extend the urgent branch to include a suggested answer in the email to you.
  • It doesn’t wait for your approval. Automation runs never pause for a person: an approval in a triggered workflow resolves as unattended at once.
  • In an organization with other members, runs spend only the organization’s AI accounts. Without one that can serve the model, nothing is classified, and reliant trigger events or the run says why.

Troubleshooting

Only mail added to the inbox fires; sent mail, drafts and mail filtered past the inbox never do. Allow about five minutes for polling. reliant trigger events shows skipped with the filter for a noreply sender.
The message was deleted, or belongs to another mailbox, before the run read it. The run ends at read_failed and sends nothing.
Google stopped accepting the stored sign-in, and sends fail at send_failed. Reconnect Gmail under Settings → Integrations.

Next steps

Build a Slack bot agent

Post urgent mail to a channel instead of your inbox.

Answer texts with an agent

The same pattern for SMS and WhatsApp.

Gmail integration

Every Gmail action, the trigger payload and its match attributes.

Test workflows with scenarios

Mock every node and cover each ending.