Auto-Route Invoices With Inbound Email Rules Nylas introduced inbound email rules for Agent Accounts, enabling automatic invoice routing by matching sender fields and assigning messages to folders before application code runs. The rules support up to 50 conditions and 20 actions, and can reference domain lists for dynamic vendor management without redeployment. A single inbound email rule can carry up to 50 match conditions and 20 actions — and it runs inside the mail infrastructure itself, before your webhook handler, your queue, or any line of your application code gets involved. That changes how you build something like invoice routing. The usual approach is: receive message.created , fetch the message, check the sender, call the folders endpoint to move it. Four network hops and a handler you have to deploy and monitor. With Agent Accounts https://developer.nylas.com/docs/v3/agent-accounts/ — programmatic mailboxes currently in beta — there's a declarative alternative: Rules that match sender fields and run assign to folder so invoices are already sitting in the finance folder when your application first sees them. The Policies, Rules, and Lists docs https://developer.nylas.com/docs/v3/agent-accounts/policies-rules-lists/ define a chain: block , mark as spam , assign to folder , mark as read , mark as starred , archive , or trash .None of them attach to an individual mailbox. Instead, a workspace carries one policy id plus an array of rule ids , and every agent mailbox in that workspace inherits the lot. Each application gets a default workspace that holds any account you haven't placed elsewhere — attach your rules there once and every unassigned mailbox picks them up. All of this is optional, too: with no workspace policy attached, an account simply runs at your billing plan's maximum limits and delivers every inbound message straight to the inbox. Say invoices arrive from a handful of vendors. One rule, OR'd conditions, two actions: curl --request POST \ --url "https://api.us.nylas.com/v3/rules" \ --header "Authorization: Bearer