Repository navigation
[Feature Improvement Suggestion]: More reliable Webhook in Workflows #14842
Unanswered
knebb
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AI usage
No AI tools were used
Description
I use the webhook feature in workflows to send documents. Additionally there is a timeout of five seconds for successful transfer.
Unfortunately, PaperlessNGX does not do any error handling when the transfer fails. This results in:
Only way to check are the logs where you can see the transfer fails ALWAYS when it reaches a five second timeout. Which might be too short for larger documents or slow lines.
Obviously no one will check the logs every time to verify the transfer was successful. Workflows are made to simplyfy your live not to make it more complicated. Paperless should have an error handling at all so the following actions are not performed. At least.
Other
As I can not change the architecture of the webhook/workflow stuff I decided to minimize the problems arising when the transfer fails for whatever reason.
So I designed a little Python proxy script which does the following:
What it does not change:
However, this is a "works for me" solution which fixes major issues I was having with the webhook feature:
How does it work
Install
paperless-proxy.pyto match your needs (restart service every time when you change something there!)That's it!
Use your webhook feature as before and be happy of fine filenames and more reliable document transfers
The zipo contains three files:
INSTALL.dm with install instructions
paperless-relay-py as the main script
paperless-relay.service as the unit file for systemd
Enjoy!
paperless-relay-optional.zip
All reactions