Classify inbound email
In this recipe every e-mail sent to one address becomes a record in a table, an AI column labels it (an invoice, an order, a complaint or something else), and the right person is notified for each label. Nothing happens to mail that arrived before you switched it on, and you test every step before it goes live.
What you need: edit access to a project, a paid plan with credits for the AI column, and a few minutes. Automations are in beta.
Step 1: Create an inbox address
On the Integrations page, under Email, click Create address on Quanty inbox address, name it, for example Inbox, and click Create address. Copy the address from Your inbox address, then forward your mailbox to it or give it to your suppliers (How to use it shows how). A connected Gmail or other mailbox works too (see Mailboxes).
Step 2: Prepare the table
In your project, create a table Inbound e-mail with these columns:
| Column | Type |
|---|---|
| From | |
| Subject | Text |
| Body | Long text |
| Received | Date & time |
| Attachments | File |
| Category | Classify, with the Categories invoice, order, complaint, other and a prompt such as "What is this e-mail mainly about?" |
The Classify column is the AI part: it picks one category for each row (see Column types).
Step 3: Save each e-mail as a record
- Open Automations in the project rail, find Save incoming e-mails as records under Start from a template (shelf Email) and click it.
- In the builder, click the When card: pick the Mailbox, and under Which e-mails add filters if you want, for example Only e-mails with attachments.
- Under Save to the table, keep Save each e-mail as a new record and map Sender address, Subject, Body, Received at and Attachments to your columns.
- Under Then, add the step Run AI columns with the Category column, so each new record is labelled at once.
Step 4: Notify per label
Make a second automation from scratch on the same table, which reacts as soon as a record gets its label:
- When: Record matches conditions ("When a record starts matching the conditions (once, on change)").
- If: Category is
invoice. - Then: Notify people (or Send an e-mail) to the person who handles invoices, with the title
New invoice: {{Subject}}.
The label the AI column writes counts as a change, so the automation runs once, when the record starts to match. Keep Once per record on, so each e-mail is announced once. Duplicate the automation for order and complaint with other recipients. To route without AI, use the trigger's own filters instead, for example Subject contains faktura, invoice.
Step 5: Test, then switch on
Open each automation and click Test with Dry run on: "The test uses the newest e-mail in the mailbox, or a sample one when none has arrived yet." The result shows each step and what it would do. When it looks right, switch both automations on.
Then send yourself a test e-mail. Within a minute it is a record with its label, and the notification follows. History in each automation shows what ran.
Only new mail counts
"Only e-mails that arrive after the automation is turned on will run it." Switching it on never processes what is already in the mailbox.
Step 6: Check and correct labels
Open a record's Category cell details to see Why this value and correct a wrong label with Edit value. If a kind of e-mail is often mislabelled, make the prompt more specific or add an example to it; new e-mails use the new prompt.
Where to go next
- Triggers and conditions: every setting of E-mail received.
- Actions: notifications, e-mails and running AI columns.
- Mailboxes: inbox addresses, Gmail and IMAP.
- Testing and run history: tests, history and what it costs.