diff --git a/content/guides/docgen/docgen-getting-started.md b/content/guides/docgen/docgen-getting-started.md index d8ba17b30..ca5f60200 100644 --- a/content/guides/docgen/docgen-getting-started.md +++ b/content/guides/docgen/docgen-getting-started.md @@ -62,10 +62,38 @@ After you generate the token, you can use it in cURL or other clients, such as [Postman][postman], to make calls. +## Using webhooks + +You can create webhooks to monitor Doc Gen events and automate your business process or workflow. + +Follow the instructions for [adding webhooks][webhooks]. Your content type is your Doc Gen template file or folder. + +The supported [events][events] are: + +* `DOCGEN_DOCUMENT_GENERATION_STARTED` +* `DOCGEN_DOCUMENT_GENERATION_SUCCEEDED` +* `DOCGEN_DOCUMENT_GENERATION_FAILED` + +![Doc Gen event triggers](./images/docgen-triggers.png) + +Information that is posted in a notification: + +* Trigger name. +* Webhook trigger timestamp. +* Template file ID. +* Template file version ID. +* Template file name. +* Destination folder. +* Generated file ID (if the document generation process succeeds). +* Output type (DOCX or PDF). +* Reason (if the document generation process fails). + [token]: g://authentication/tokens/developer-tokens [createapps]: g://applications/app-types/platform-apps [postman]: g://tooling/postman [settings]: https://support.box.com/hc/en-us/articles/4404822772755-Enterprise-Settings-Content-Sharing-Tab#h_01FYQGK5RW42T07GV985MQ9E9A [template-addin]: https://support.box.com/hc/en-us/articles/36587535449747-Installing-Box-Doc-Gen-Add-in [template-tags]: https://support.box.com/hc/en-us/articles/36151895655059-Creating-A-Box-Doc-Gen-Template-Manually -[json-template]: https://support.box.com/hc/en-us/articles/36148012877843-Creating-a-Box-Doc-Gen-Template-using-JSON-data \ No newline at end of file +[json-template]: https://support.box.com/hc/en-us/articles/36148012877843-Creating-a-Box-Doc-Gen-Template-using-JSON-data +[webhooks]: g://webhooks/v2/create-v2/ +[events]: g://webhooks/triggers diff --git a/content/guides/docgen/images/docgen-triggers.png b/content/guides/docgen/images/docgen-triggers.png new file mode 100644 index 000000000..102d26529 Binary files /dev/null and b/content/guides/docgen/images/docgen-triggers.png differ diff --git a/content/guides/webhooks/triggers.md b/content/guides/webhooks/triggers.md index 21908a90a..09f59d8e0 100644 --- a/content/guides/webhooks/triggers.md +++ b/content/guides/webhooks/triggers.md @@ -30,6 +30,9 @@ available for folders. | `COMMENT.CREATED` | A comment object is created. | Yes | Yes | | `COMMENT.UPDATED` | A comment object is edited. | Yes | Yes | | `COMMENT.DELETED` | A comment object is removed. | Yes | Yes | +| `DOCGEN_DOCUMENT_GENERATION_FAILED` | Doc Gen failed to generate a document. | Yes | No | +| `DOCGEN_DOCUMENT_GENERATION_STARTED` | Doc Gen started to create a document. | Yes | No | +| `DOCGEN_DOCUMENT_GENERATION_SUCCEEDED` | Doc Gen succeeded to create a document. | Yes | No | | `FILE.UPLOADED` | A file is uploaded or moved to this folder. | No | Yes | | `FILE.PREVIEWED` | A file is previewed. | Yes | Yes | | `FILE.DOWNLOADED` | A file is downloaded. | Yes | Yes |