Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion content/guides/docgen/docgen-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
[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
Binary file added content/guides/docgen/images/docgen-triggers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions content/guides/webhooks/triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Loading