This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
Send notifications to third-party services #510
Tooa
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to receive the import successful or import failed notification introduced in
v1.1.0
on my phone as push notification. I know there is a variety of applications such as discord, telegram, etc. users might want to receive their notifications to. But this discussion is about receiving the notifications to a so called web hook endpoint. The receiving end then forwards the notification to the platform of interest.Workflow is as follows then:
I have a workaround to accomplish the same thing but it requires more effort and is less user friendly. I have configured a pre and post hook script with POST requests to a third-party application. When I receive the pre hook call and no post hook call within a certain amount of time, the third-party application sends a "document processing failed" message to my phone. I need this custom logic because the post consumption script is not called when the document processing fails.
Unfortunately, this approach is also not error-prone to importing multiple documents at once. When you consume document A and document B at the same time and document B is finished before document A, then this approach notifies success for document A.
I would like to discuss different options with you regarding this topic. I'm also fine if the use case is out of scope, because it is very tailored to me and not useful for other users.
Proposals for discussion
Option 1
Option 2
PAPERLESS_FAILED_CONSUME_SCRIPT
(name for discussion) with the error message as argument to the provided scriptOption 3
PAPERLESS_NOTIFICATION_WEBHOOK
(name for discussion):Option 4
PAPERLESS_IMPORT_FAILED_WEBHOOK
andPAPERLESS_IMPORT_SUCCESS_WEBHOOK
PAPERLESS_IMPORT_SUCCESS_WEBHOOK
provides the same arguments as passed to the post consumption script in a JSON bodyPAPERLESS_IMPORT_FAILED_WEBHOOK
provides the document name and error message in the JSON bodyOption 5
PAPERLESS_IMPORT_FAILED_WEBHOOK
since it delivers the most important informationMy current workaround (for anyone interested)
Pre-consumption script
Post-consumption script
Home Assistant automation
Beta Was this translation helpful? Give feedback.
All reactions