Skip to content

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 -wparam .

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.

Events

Converted

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

Error

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