Utilizing webhooks

Discover webhooks, how they work, and see how you could integrate them into your workflows

Learn about webhooks – in this topic. You’ll get introduced to what they are. But you’ll also see how to use them in your technical workflows. Learn how to take advantage of them and get notified of events within your organization’s environment. At the end of this topic, you’ll know how to track and control real-time activities using webhooks.

Prerequisites:

  • You know about users and API keys
  • You understand how documents are generated
  • You understand roles and permissions
  • You are aware of folders, their settings, and folder sharing

Read more about:

What are webhooks?

Simply put, webhooks are similar to alerts or notifications.

They allow you to get updated when something happens within your Inkit environment. Meaning whenever someone or a system does something, you can get pinged about their activities.

From a management & security standpoint, this is an essential feature of which you’ll want to make use. In short, webhooks are invaluable for monitoring and tracking your environment.

To make use of them, all you have to do is provide an endpoint for Inkit Render to ping you on whenever you send a request.

One widespread use case for webhooks is to link them to your document generation. By doing so, you can get notified when your documents are done rendering.

You could, for example, include an endpoint in your document create requests.

Then, as the API completes turning your HTML data into a PDF document, it automatically alerts you about its completion.

Why use webhooks

Let’s continue with the example of using webhooks to notify us when documents are completed.

Here’s a scenario to illustrate, say you have decided to generate reports based on weekly user data. You’ve created a technical process where you pull the data from your database, send the HTML document to the Inkit Render API, and then send those reports to your management.

However, you’re not currently doing this automatically.

To optimize this flow even further, you could utilize webhooks to get notified when those reports are completed. Then, you could set up a system that fetches the reports. Right as you get notified.

Making use of webhooks

In the current version of Inkit Render, you can make use of webhooks when sending create requests. Include the endpoint of your webhook handler in your requests, and you will be notified when your document has finished rendering.

Include the “render_completed_webhook” body parameter in your request body, with your endpoint URL as its value, and you are set.

If you would like to make use of a step-by-step guide, then please refer to this topic: