https://api.us.nylas.com/v3/rulesCreate a rule
Creates a rule for your application. A rule defines a trigger (inbound or outbound), conditions against
sender or recipient fields, and actions to apply when the conditions match. Inbound rules run on incoming
messages; outbound rules run on sends before they're submitted to the email provider. Inbound and outbound
rules are isolated — inbound rules never run during sends, and outbound rules never run on message receipt.
Inbound rules can match from.address, from.domain, or from.tld. Outbound rules can match
from.address, from.domain, from.tld, recipient.address, recipient.domain, recipient.tld, or
outbound.type (compose or reply). Link inbound rules to a policy to apply them to specific Agent
Accounts. Outbound rules are currently evaluated from the sending application's enabled outbound rules.
The application_id and organization_id are derived from your API key and are read-only.
triggerWhen the rule is evaluated. inbound runs the rule on incoming messages; outbound runs the rule
on sends before they're submitted to the email provider. Inbound rules accept only from.*
conditions. Outbound rules accept from.*, recipient.*, and outbound.type.
field*The field to match against. from.* fields match the normalized sender address,
domain, or top-level domain. Inbound rules accept only from.*. Outbound rules also
accept recipient.* and outbound.type. For outbound rules, recipient.* matches
against any recipient — To, CC, BCC, and SMTP envelope recipients. outbound.type
classifies the send as compose (new message) or reply (replying to an existing
thread).