Create workflow
create_workflowCreate Paperless-ngx automation rules that run automatically on future documents. Define triggers and actions to assign metadata, remove fields, send emails, or call webhooks.
Instructions
Create an automation rule. Workflows run automatically against future documents, so a mistake here silently mis-files everything that arrives afterwards. Read an existing workflow with get_workflow to copy the exact shape, and confirm the rule with the user before creating it. Trigger object. type: 1=consumption started, 2=document added, 3=document updated, 4=scheduled. Common fields: sources (1=consume folder, 2=API upload, 3=mail fetch), filter_filename, filter_path, filter_mailrule, match + matching_algorithm, filter_has_tags / filter_has_all_tags / filter_has_not_tags, filter_has_any_correspondents, filter_has_any_document_types, filter_custom_field_query, and for scheduled triggers schedule_offset_days, schedule_is_recurring, schedule_recurring_interval_days, schedule_date_field (added|created|modified|custom_field). Action object. type: 1=assignment, 2=removal, 3=email, 4=webhook, 5=..., 6=... Assignment actions use assign_title, assign_tags, assign_correspondent, assign_document_type, assign_storage_path, assign_owner, assign_view_users/groups, assign_custom_fields. Removal actions use the remove_* counterparts. Email and webhook actions nest their own config object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| order | No | Lower numbers run first. | |
| actions | Yes | Action object. type: 1=assignment, 2=removal, 3=email, 4=webhook, 5=..., 6=... Assignment actions use assign_title, assign_tags, assign_correspondent, assign_document_type, assign_storage_path, assign_owner, assign_view_users/groups, assign_custom_fields. Removal actions use the remove_* counterparts. Email and webhook actions nest their own config object. | |
| enabled | No | ||
| triggers | Yes | Trigger object. type: 1=consumption started, 2=document added, 3=document updated, 4=scheduled. Common fields: sources (1=consume folder, 2=API upload, 3=mail fetch), filter_filename, filter_path, filter_mailrule, match + matching_algorithm, filter_has_tags / filter_has_all_tags / filter_has_not_tags, filter_has_any_correspondents, filter_has_any_document_types, filter_custom_field_query, and for scheduled triggers schedule_offset_days, schedule_is_recurring, schedule_recurring_interval_days, schedule_date_field (added|created|modified|custom_field). |