Before you begin
- The
reliantCLI, 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
fastmodel. See What this does not do.
1
Write the workflow
.reliant/workflows/email-triage.yaml
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:Add one scenario per path (urgent, newsletter, unreadable message, refused send), then run them:
.reliant/workflows/email-triage/scenarios/question_gets_an_acknowledgement.yaml
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 It listens through your default Gmail connection;
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
--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:The newest row should say
terminal
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
unattendedat 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 eventsor the run says why.
Troubleshooting
New mail starts no run
New mail starts no run
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.Could not read message
Could not read message
The message was deleted, or belongs to another mailbox, before the run read it. The run ends at
read_failed and sends nothing.The connection needs to be reconnected
The connection needs to be reconnected
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.