Webhook integration guides
In this section we've included some examples of how you can make use of the Dynamic Content webhook customization features to build webhook integrations with other apps. We've included examples of integrating with Slack and the Algolia search API, but we'll be adding guides for integrating with other apps soon.
In this section
- Slack integration guides
- Algolia integration guides
Slack integration guides
Slack is a good choice for building a Dynamic Content integration because it has a well defined API and it's a messaging tool that many teams already use as part of their workflow. We've got two Slack integration guides, each of which is self contained and takes you through building the integration step by step.
Slack integration Part 1: Send a message when a content item is created or updated
This guide shows you how to create a webhook integration between Dynamic Content and Slack to post a message in your specified Slack channel when a content item is created or updated in Dynamic Content.
Slack integration Part 2: Send a message when a content item is assigned to one or more users
The second Slack integration is self contained, so you don't need to follow the steps in Part 1 before going through it. The guide demonstrates how you can send a message to a Slack channel when a content item is assigned to one or more users. It also hows to include the following in the message:
- the content item URL. So you can click the link and open the content item in Dynamic Content
- the Slack name of each assignee. So they will be notified when a content item is assigned to them
Algolia integration guides
Search is a key feature for most websites and we've created several guides for creating integrations between Dynamic Content and the Algolia search API. The 3 guides build on each other, adding optimizations to the way the Algolia index is updated when a specified action occurs in Dynamic Content.
Algolia integration part 1: Update an Algolia search index when a content item is created or updated
In the first part of the Algolia integration guide series, we show you how to update an Algolia search index when a content item is updated or created in Dynamic Content.
This example shows how to index staged content, because it uses the "content item created" and "content item updated" webhook events as triggers. However we've also included details of how to index production content using the "Snapshot published" webhook event as the trigger.
Algolia integration part 2: Optimizing the Algolia record size
Algolia recommends that, for performance reasons, the maximum size of a record should not exceed 5KB. In part 2 we build on the webhook created in Part 1 and explain how you can refine the custom payload to optimize the size of the record created in Algolia by including only those properties that you want to be searchable.
Algolia integration part 3: Splitting large content items in multiple Algolia records
In the cases where the Algolia record created from a content item is expected to be above 5KB, the best practice is to split the output into multiple records. To do this you need to use the Algolia batch end point.
In Part 3 we walk you through the steps required to update the configuration and custom payload of the webhook you built in parts 1 and 2 to create multiple records from a blog content item and link them together in Algolia.