[Feature Request] Custom Scripts in Workflows #6679
Unanswered
acul009
asked this question in
Feature Requests
Replies: 1 comment
-
Seems like probably a lot of work when all that's needed currently is understanding a little bit about mounting the hook script?
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Consider this an updated request of #4824
I would like to request fully integrated scripts within the workflows.
I'm not everly familiar with python, but I built several different Versions of this in PHP.
This feature request could take one of several forms:
"Simply" add a workflow action that allows pasting python code into a Textbox. This would work very similar to the Post-consumption script. This would already allow users to leverage the workflow engine for filtering and could enable easy third party integrations by exchanging those scripts between users.
Add a proper Action plugin system. On startup paperless would look for files in a plugin folder named like
UploadToNextcloudPlugin.py
which would in turn contain the classUploadToNextcloudPlugin
which would extend the base classPlugin
and implement methods such as:get_friendly_name
get_available_settings
execute
Either way, this would do a great deal to make paperless more flexible.
While the approach to build a "proper" Plugin-System would be quite a bit more polished, it would also be a lot more work.
Personally I'd be happy with either.
Why not just the hook scripts?
There are several reasons.
These scripts require working with bind mounts or accessing docker volumes, which can be kind of a pain on servers with only console access. This also prohibits people who are less tech-savy from using these hook scripts.
There is no hook for executing when a document has been saved ( read changed )
You can use more than one script at a time and control execution using the workflow filters.
Use Cases
Allow uploading documents to other systems when they are given a Tag. E.g.: uploading a document to Nextcloud by just adding the tag Nextcloud
Populating custom fields with information read from the document
referencing a document in a ticket system by inputting the ticket number in a custom field
Other
No response
Beta Was this translation helpful? Give feedback.
All reactions