-
-
Notifications
You must be signed in to change notification settings - Fork 54
Call a Webhook on Conversion
Toby Allen edited this page Jan 12, 2020
·
6 revisions
DocTo can call out to a web hook URL with details of each event.
Webhooks are added by using the -w
param .
docto -f "C:\Dir\FilesToConvert\" -O "C:\DirToOutput" -T wdFormatPDF -W https://toflidium.com/webhooks/docto/webhook_test.php
The Url can be a plain or have some parameters. If it has parameters they will be preserved.
Each time a file is converted the url is called with the following parameters.
- action=convert
- type=Type of conversion as wdFormat value or integer as input
- inputfilename=Filename of input file
- outputfilename=Filename converted file was written to
eg.
http://www.example.com/webhooks/docto.php?action=convert&type=wdFormatText&inputfilename=c%3A%5Cmyfiles%5Cdocs%5Cmydoc.doc&outputfilename=c%3A%5Cmyfiles%5Cdocs%5Cmydoc.txt
Each time DocTo fails to convert.
- action=error
- type=Type of conversion as wdFormat value or integer as input
- inputfilename=Filename of input file
- outputfilename=Filename converted file was written to
- error=Error Text provided