create_mail_rule
Create a Paperless mail rule to automate email processing. Define filters and actions to sort, tag, and route incoming mail.
Instructions
Create a Paperless mail rule. Use list_mail_accounts first to choose account. Prefer attachment-only rules for invoices unless the full mail must be archived.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| order | No | ||
| owner | No | ||
| action | No | Mail rule action: 1=Delete, 2=Move to specified folder, 3=Mark as read/don't process read mails, 4=Flag/don't process flagged mails, 5=Tag/don't process tagged mails | |
| folder | Yes | ||
| account | Yes | ||
| enabled | No | ||
| filter_to | No | ||
| pdf_layout | No | PDF layout for full-mail consumption: 0=System default, 1=Text then HTML, 2=HTML then text, 3=HTML only, 4=Text only | |
| assign_tags | No | ||
| filter_body | No | ||
| filter_from | No | ||
| maximum_age | No | ||
| filter_subject | No | ||
| attachment_type | No | Attachment type: 1=Only process attachments, 2=Process all files including inline attachments | |
| action_parameter | No | ||
| assign_title_from | No | Title assignment: 1=Use subject as title, 2=Use attachment filename as title, 3=Do not assign title from rule | |
| consumption_scope | No | Consumption scope: 1=Only process attachments, 2=Process full mail as .eml, 3=Process full mail and attachments separately | |
| assign_correspondent | No | ||
| assign_document_type | No | ||
| assign_owner_from_rule | No | ||
| assign_correspondent_from | No | Correspondent assignment: 1=Do not assign, 2=Use mail address, 3=Use sender name or address, 4=Use assign_correspondent | |
| filter_attachment_filename_exclude | No | ||
| filter_attachment_filename_include | No |