diff --git a/docs/usage.md b/docs/usage.md
index 7a93e16bc..0979c859f 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -322,6 +322,8 @@ fields and permissions, which will be merged.
### Workflow Triggers
+#### Types
+
Currently, there are three events that correspond to workflow trigger 'types':
1. **Consumption Started**: _before_ a document is consumed, so events can include filters by source (mail, consumption
@@ -380,25 +382,49 @@ Workflows allow you to filter by:
### Workflow Actions
-There are currently two types of workflow actions, "Assignment", which can assign:
+#### Types
-- Title, see [title placeholders](usage.md#title-placeholders) below
+The following workflow action types are available:
+
+##### Assignment
+
+"Assignment" actions can assign:
+
+- Title, see [workflow placeholders](usage.md#workflow-placeholders) below
- Tags, correspondent, document type and storage path
- Document owner
- View and / or edit permissions to users or groups
- Custom fields. Note that no value for the field will be set
-and "Removal" actions, which can remove either all of or specific sets of the following:
+##### Removal
+
+"Removal" actions can remove either all of or specific sets of the following:
- Tags, correspondents, document types or storage paths
- Document owner
- View and / or edit permissions
- Custom fields
-#### Title placeholders
+##### Email
-Workflow titles can include placeholders but the available options differ depending on the type of
-workflow trigger. This is because at the time of consumption (when the title is to be set), no automatic tags etc. have been
+"Email" actions can send documents via email. This action requires a mail server to be [configured](configuration.md#email-sending). You can specify:
+
+- The recipient email address(es) separated by commas
+- The subject and body of the email, which can include placeholders, see [placeholders](usage.md#workflow-placeholders) below
+- Whether to include the document as an attachment
+
+##### Webhook
+
+"Webhook" actions send a POST request to a specified URL. You can specify:
+
+- The URL to send the request to
+- The request body as text or as key-value pairs, which can include placeholders, see [placeholders](usage.md#workflow-placeholders) below.
+- The request headers as key-value pairs
+
+#### Workflow placeholders
+
+Some workflow text can include placeholders but the available options differ depending on the type of
+workflow trigger. This is because at the time of consumption (when the text is to be set), no automatic tags etc. have been
applied. You can use the following placeholders with any trigger type:
- `{correspondent}`: assigned correspondent name
@@ -424,6 +450,7 @@ The following placeholders are only available for "added" or "updated" triggers
- `{created_month_name_short}`: created month short name
- `{created_day}`: created day
- `{created_time}`: created time in HH:MM format
+- `{doc_url}`: URL to the document in the web UI. Requires the `PAPERLESS_URL` setting to be set.
### Workflow permissions
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index 7e828b278..e17f6168a 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -1476,11 +1476,11 @@
src/app/components/admin/trash/trash.component.html
- 72
+ 67src/app/components/admin/trash/trash.component.html
- 81
+ 76src/app/components/admin/trash/trash.component.ts
@@ -2199,25 +2199,25 @@
dayssrc/app/components/admin/trash/trash.component.html
- 63
+ 58Restoresrc/app/components/admin/trash/trash.component.html
- 71
+ 66src/app/components/admin/trash/trash.component.html
- 78
+ 73{VAR_PLURAL, plural, =1 {One document in trash} other { total documents in trash}}src/app/components/admin/trash/trash.component.html
- 94
+ 89
@@ -2300,7 +2300,7 @@
src/app/components/document-detail/document-detail.component.ts
- 847
+ 846
@@ -2577,19 +2577,19 @@
src/app/components/document-detail/document-detail.component.ts
- 871
+ 870src/app/components/document-detail/document-detail.component.ts
- 1171
+ 1169src/app/components/document-detail/document-detail.component.ts
- 1210
+ 1207src/app/components/document-detail/document-detail.component.ts
- 1251
+ 1248src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -3019,11 +3019,11 @@
src/app/components/document-list/document-card-large/document-card-large.component.html
- 63
+ 68src/app/components/document-list/document-card-small/document-card-small.component.html
- 135
+ 140
@@ -3172,7 +3172,7 @@
src/app/components/document-detail/document-detail.component.ts
- 824
+ 823src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -3293,7 +3293,7 @@
Delete original document after successful splitsrc/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.html
- 51
+ 49
@@ -3312,7 +3312,7 @@
src/app/components/document-list/document-card-large/document-card-large.component.html
- 60
+ 62
@@ -4285,6 +4285,10 @@
src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.html14
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts
+ 101
+ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html10
@@ -4788,6 +4792,76 @@
301
+
+ Email subject
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 329
+
+
+
+ Email body
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 330
+
+
+
+ Email recipients
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 331
+
+
+
+ Attach document
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 332
+
+
+
+ Webhook url
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 340
+
+
+
+ Use parameters for webhook body
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 341
+
+
+
+ Webhook params
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 343
+
+
+
+ Webhook body
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 345
+
+
+
+ Webhook headers
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 347
+
+
+
+ Include document
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+ 348
+
+ Consume Folder
@@ -4869,18 +4943,25 @@
97
+
+ Webhook
+
+ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts
+ 105
+
+ Create new workflowsrc/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts
- 172
+ 180Edit workflowsrc/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts
- 176
+ 184
@@ -4901,7 +4982,7 @@
Createsrc/app/components/common/filterable-dropdown/filterable-dropdown.component.html
- 58
+ 50src/app/components/common/share-links-dropdown/share-links-dropdown.component.html
@@ -4928,21 +5009,21 @@
Applysrc/app/components/common/filterable-dropdown/filterable-dropdown.component.html
- 64
+ 56Click again to exclude items.src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
- 71
+ 63Not assignedsrc/app/components/common/filterable-dropdown/filterable-dropdown.component.ts
- 370
+ 351Filter drop down element to filter for documents with no correspondent/type/tag assigned
@@ -4950,7 +5031,7 @@
Open filtersrc/app/components/common/filterable-dropdown/filterable-dropdown.component.ts
- 486
+ 463
@@ -5094,6 +5175,17 @@
29
+
+ Add
+
+ src/app/components/common/input/entries/entries.component.html
+ 8
+
+
+ src/app/components/common/permissions-select/permissions-select.component.html
+ 17
+
+ Upload
@@ -5146,7 +5238,7 @@
src/app/components/document-list/document-card-small/document-card-small.component.ts
- 79
+ 86
@@ -5283,13 +5375,6 @@
45
-
- Add
-
- src/app/components/common/permissions-select/permissions-select.component.html
- 17
-
- Change
@@ -5308,14 +5393,7 @@
Error loading previewsrc/app/components/common/preview-popup/preview-popup.component.html
- 10
-
-
-
- Open preview
-
- src/app/components/common/preview-popup/preview-popup.component.ts
- 37
+ 4
@@ -5929,11 +6007,11 @@
src/app/components/document-list/document-card-large/document-card-large.component.html
- 74
+ 79src/app/components/document-list/document-list.component.html
- 328
+ 323
@@ -5944,11 +6022,11 @@
src/app/components/document-list/document-card-large/document-card-large.component.html
- 80
+ 85src/app/components/document-list/document-list.component.html
- 335
+ 330
@@ -6209,7 +6287,7 @@
src/app/components/document-detail/document-detail.component.ts
- 1228
+ 1225src/app/guards/dirty-saved-view.guard.ts
@@ -6573,36 +6651,36 @@
Document saved successfully.src/app/components/document-detail/document-detail.component.ts
- 738
+ 737src/app/components/document-detail/document-detail.component.ts
- 752
+ 751Error saving documentsrc/app/components/document-detail/document-detail.component.ts
- 756
+ 755src/app/components/document-detail/document-detail.component.ts
- 797
+ 796Do you really want to move the document "" to the trash?src/app/components/document-detail/document-detail.component.ts
- 825
+ 824Documents can be restored prior to permanent deletion.src/app/components/document-detail/document-detail.component.ts
- 826
+ 825src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -6613,7 +6691,7 @@
Move to trashsrc/app/components/document-detail/document-detail.component.ts
- 828
+ 827src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -6624,7 +6702,7 @@
Reprocess confirmsrc/app/components/document-detail/document-detail.component.ts
- 867
+ 866src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -6635,123 +6713,123 @@
This operation will permanently recreate the archive file for this document.src/app/components/document-detail/document-detail.component.ts
- 868
+ 867The archive file will be re-generated with the current settings.src/app/components/document-detail/document-detail.component.ts
- 869
+ 868Reprocess operation will begin in the background. Close and re-open or reload this document after the operation has completed to see new content.src/app/components/document-detail/document-detail.component.ts
- 879
+ 878Error executing operationsrc/app/components/document-detail/document-detail.component.ts
- 890
+ 889Page Fitsrc/app/components/document-detail/document-detail.component.ts
- 963
+ 962Split confirmsrc/app/components/document-detail/document-detail.component.ts
- 1169
+ 1167This operation will split the selected document(s) into new documents.src/app/components/document-detail/document-detail.component.ts
- 1170
+ 1168Split operation will begin in the background.src/app/components/document-detail/document-detail.component.ts
- 1186
+ 1184Error executing split operationsrc/app/components/document-detail/document-detail.component.ts
- 1195
+ 1193Rotate confirmsrc/app/components/document-detail/document-detail.component.ts
- 1208
+ 1205src/app/components/document-list/bulk-editor/bulk-editor.component.ts
- 788
+ 787This operation will permanently rotate the original version of the current document.src/app/components/document-detail/document-detail.component.ts
- 1209
+ 1206Rotation will begin in the background. Close and re-open the document after the operation has completed to see the changes.src/app/components/document-detail/document-detail.component.ts
- 1225
+ 1222Error executing rotate operationsrc/app/components/document-detail/document-detail.component.ts
- 1237
+ 1234Delete pages confirmsrc/app/components/document-detail/document-detail.component.ts
- 1249
+ 1246This operation will permanently delete the selected pages from the original document.src/app/components/document-detail/document-detail.component.ts
- 1250
+ 1247Delete pages operation will begin in the background. Close and re-open or reload this document after the operation has completed to see the changes.src/app/components/document-detail/document-detail.component.ts
- 1265
+ 1262Error executing delete pages operationsrc/app/components/document-detail/document-detail.component.ts
- 1274
+ 1271
@@ -7096,6 +7174,13 @@
This operation will permanently rotate the original version of document(s).
+
+ src/app/components/document-list/bulk-editor/bulk-editor.component.ts
+ 788
+
+
+
+ This will alter the original copy.src/app/components/document-list/bulk-editor/bulk-editor.component.ts789
@@ -7130,21 +7215,21 @@
src/app/components/document-list/document-list.component.html
- 304
+ 299View notessrc/app/components/document-list/document-card-large/document-card-large.component.html
- 69
+ 74Created: src/app/components/document-list/document-card-large/document-card-large.component.html
- 93,94
+ 98,99src/app/components/document-list/document-card-small/document-card-small.component.html
@@ -7159,7 +7244,7 @@
Added: src/app/components/document-list/document-card-large/document-card-large.component.html
- 94,95
+ 99,100src/app/components/document-list/document-card-small/document-card-small.component.html
@@ -7174,7 +7259,7 @@
Modified: src/app/components/document-list/document-card-large/document-card-large.component.html
- 95,96
+ 100,101src/app/components/document-list/document-card-small/document-card-small.component.html
@@ -7189,7 +7274,7 @@
{VAR_PLURAL, plural, =1 {1 page} other { pages}}src/app/components/document-list/document-card-large/document-card-large.component.html
- 112
+ 117src/app/components/document-list/document-card-small/document-card-small.component.html
@@ -7200,7 +7285,7 @@
Sharedsrc/app/components/document-list/document-card-large/document-card-large.component.html
- 122
+ 127src/app/components/document-list/document-card-small/document-card-small.component.html
@@ -7219,7 +7304,7 @@
Score:src/app/components/document-list/document-card-large/document-card-large.component.html
- 127
+ 132
@@ -7473,21 +7558,14 @@
Edit documentsrc/app/components/document-list/document-list.component.html
- 296
-
-
-
- Preview document
-
- src/app/components/document-list/document-list.component.html
- 297
+ 295Yessrc/app/components/document-list/document-list.component.html
- 356
+ 351src/app/pipes/yes-no.pipe.ts
@@ -7498,7 +7576,7 @@
Nosrc/app/components/document-list/document-list.component.html
- 356
+ 351src/app/pipes/yes-no.pipe.ts
@@ -9119,259 +9197,259 @@
English (US)src/app/services/settings.service.ts
- 51
+ 46Afrikaanssrc/app/services/settings.service.ts
- 57
+ 52Arabicsrc/app/services/settings.service.ts
- 63
+ 58Belarusiansrc/app/services/settings.service.ts
- 69
+ 64Bulgariansrc/app/services/settings.service.ts
- 75
+ 70Catalansrc/app/services/settings.service.ts
- 81
+ 76Czechsrc/app/services/settings.service.ts
- 87
+ 82Danishsrc/app/services/settings.service.ts
- 93
+ 88Germansrc/app/services/settings.service.ts
- 99
+ 94Greeksrc/app/services/settings.service.ts
- 105
+ 100English (GB)src/app/services/settings.service.ts
- 111
+ 106Spanishsrc/app/services/settings.service.ts
- 117
+ 112Finnishsrc/app/services/settings.service.ts
- 123
+ 118Frenchsrc/app/services/settings.service.ts
- 129
+ 124Hungariansrc/app/services/settings.service.ts
- 135
+ 130Italiansrc/app/services/settings.service.ts
- 141
+ 136Japanesesrc/app/services/settings.service.ts
- 147
+ 142Koreansrc/app/services/settings.service.ts
- 153
+ 148Luxembourgishsrc/app/services/settings.service.ts
- 159
+ 154Dutchsrc/app/services/settings.service.ts
- 165
+ 160Norwegiansrc/app/services/settings.service.ts
- 171
+ 166Polishsrc/app/services/settings.service.ts
- 177
+ 172Portuguese (Brazil)src/app/services/settings.service.ts
- 183
+ 178Portuguesesrc/app/services/settings.service.ts
- 189
+ 184Romaniansrc/app/services/settings.service.ts
- 195
+ 190Russiansrc/app/services/settings.service.ts
- 201
+ 196Slovaksrc/app/services/settings.service.ts
- 207
+ 202Sloveniansrc/app/services/settings.service.ts
- 213
+ 208Serbiansrc/app/services/settings.service.ts
- 219
+ 214Swedishsrc/app/services/settings.service.ts
- 225
+ 220Turkishsrc/app/services/settings.service.ts
- 231
+ 226Ukrainiansrc/app/services/settings.service.ts
- 237
+ 232Chinese Simplifiedsrc/app/services/settings.service.ts
- 243
+ 238ISO 8601src/app/services/settings.service.ts
- 251
+ 246Successfully completed one-time migratration of settings to the database!src/app/services/settings.service.ts
- 584
+ 574Unable to migrate settings to the database, please try saving manually.src/app/services/settings.service.ts
- 585
+ 575You can restart the tour from the settings page.src/app/services/settings.service.ts
- 655
+ 645
diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts
index a0e23193d..702a8dc6a 100644
--- a/src-ui/src/app/app.module.ts
+++ b/src-ui/src/app/app.module.ts
@@ -131,6 +131,7 @@ import { GlobalSearchComponent } from './components/app-frame/global-search/glob
import { HotkeyDialogComponent } from './components/common/hotkey-dialog/hotkey-dialog.component'
import { DeletePagesConfirmDialogComponent } from './components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component'
import { TrashComponent } from './components/admin/trash/trash.component'
+import { EntriesComponent } from './components/common/input/entries/entries.component'
import {
airplane,
archive,
@@ -522,6 +523,7 @@ function initializeApp(settings: SettingsService) {
HotkeyDialogComponent,
DeletePagesConfirmDialogComponent,
TrashComponent,
+ EntriesComponent,
],
bootstrap: [AppComponent],
imports: [
diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
index 907af6c9e..042729f2f 100644
--- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html
@@ -322,6 +322,33 @@
}
+ @case (WorkflowActionType.Email) {
+