-
-
Notifications
You must be signed in to change notification settings - Fork 54
Call a Webhook on Conversion
Toby Allen edited this page Jul 5, 2018
·
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 http://toflidium.com/webhooks/docto/webhook_test.php
The Url can be a plain file or have some parameters. The following events call a webhook.
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?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