Skip navigation

Integrate Zapier (automation)

Integrate your Kontent project with hundreds of other applications without having to write the code yourself. Use our native Zapier integrationOpens in a new window.

Table of contents

    What is Zapier?

    Zapier helps you automate tasks using triggers and actions in an easy-to-use interface. This enables your team to automatically perform complex tasks such as deploying websites without the need to write any code. You can find a detailed introduction to Zapier terminology and usageOpens in a new window in their guide. To get started with Zapier, create a free accountOpens in a new window.

    Watch a short demo to see Zapier in action.

    Creating a Zap

    An automated task in Zapier is called a ZapOpens in a new window. The first step in a Zap is always a trigger, which defines when the Zap will run. Create a new Zap in your Zapier projectOpens in a new window and search for “Kontent” to view the Kontent triggers.

    Choose Kontent app in Zapier when creating a Zap

    To use Kontent triggers and actions, you will need to register your project in Zapier. In the window that pops up, enter the keys found in {@icon-settings|Project settings} > API keys.

    Find your project API keys in Kontent to integrate it in Zapier

    If you have secure access enabled, you also need to provide the secure access key to use the “Taxonomy Group Changed” trigger.

    In the final Find data pane of the trigger, you can click Test & Review to see a sample of the trigger’s output, which will be available in subsequent steps. For the second step, you can choose any action – it doesn’t need to be a Kontent action. For example, you can use the Gmail > Send Email action to receive an email whenever a delete, create, or restore operation is performed on a language variant in Kontent. In the action, you can use the drop-down to populate the email with values from the trigger.

    Populate the email with values from the trigger

    Testing the Zap

    Once the trigger and actions are complete, you need to turn on the Zap. When you do, the integration will automatically create a webhook in Kontent—you don’t need to do anything! In Kontent, perform the action that should trigger your Zap. For example, if you chose the “Variant Created, Deleted, or Restored” trigger with this configuration, the Zap will execute when you create a new variant in any language.

    Example of a Zap setup

    Your Zap will execute after a few moments. You can debug your Kontent webhook and see the latest notifications to Zapier in {@icon-settings|Project settings}Webhooks. You can also click the Task historyOpens in a new window button in Zapier to view the executions and the output data of each step.

    Kontent integration

    With the native Kontent integration in Zapier, you can create triggersOpens in a new windowactionsOpens in a new window, and searchesOpens in a new window.

    Triggers

    Triggers are always the first step of a Zap because they define when a Zap should run. With the Kontent integration, you only need to configure the Zap in Zapier. The integration creates the webhook in Kontent automatically when you turn the Zap on and deletes it when you turn it off.

    Each trigger in the Kontent integration has an Events to watch field where you can specify one or more actions that trigger the Zap. For most triggers, if this is left empty, the Zap will run when any of the actions are performed.

    Setting up events to watch for in Zap

    There are currently 4 triggers in the integration:

    • Variant Workflow Step Changed: Choose one or more workflow steps from your project. Whenever a variant moves into that workflow step, the Zap will trigger.
    • Variant Published Status Changed: Choose Publish or Unpublish. Whenever a variant’s published status changes to that state, the Zap will trigger.
    • Variant Created, Deleted, or Restored: Choose CreateDelete, or Restore. The Zap will trigger whenever a variant gets created, deleted, or restored. 
    • Taxonomy Group Changed: Choose DeleteRestore, or Create/Update. The Zap will trigger, whenever a taxonomy group gets deleted, restored, created, or updated.

    The output of a trigger in Zapier is exactly what Kontent’s webhook POSTs to Zapier. It will look similar to this.

    • JSON
    {     data: {         items: [             {                 item: {                     id: '42c21e82-0772-4d79-a6b3-c916e51b24ff'                 },                 language: {                     id: '00000000-0000-0000-0000-000000000000'                 }             }         ]     },     message: {         id: 'a268da50-b3c5-4d09-9b36-6587c8dea500',         project_id: '11a3492b-cd32-0054-51d2-8234ec4244a6',         type: 'content_item_variant',         operation: 'create',         api_name: 'content_management',         created_timestamp: '2019-07-18T10:52:33.1059256Z',         webhook_url: 'https://hooks.zapier.com/hooks/standard/47992d003732'     } }
    {     data: {         items: [             {                 item: {                     id: '42c21e82-0772-4d79-a6b3-c916e51b24ff'                 },                 language: {                     id: '00000000-0000-0000-0000-000000000000'                 }             }         ]     },     message: {         id: 'a268da50-b3c5-4d09-9b36-6587c8dea500',         project_id: '11a3492b-cd32-0054-51d2-8234ec4244a6',         type: 'content_item_variant',         operation: 'create',         api_name: 'content_management',         created_timestamp: '2019-07-18T10:52:33.1059256Z',         webhook_url: 'https://hooks.zapier.com/hooks/standard/47992d003732'     } }

    Most triggers contain an optional Content Type For Samples field. When you select a content type, the output of the trigger contains the ID of a content item of that type. This will make it easier to test the Zap if it relies on loading data from a specific content type.

    Actions

    Actions are steps that allow you to modify your data in Kontent. There are currently 4 actions:

    • Create Content Item
    • Change Variant Workflow Step
    • Update Language Variant
    • Delete Language Variant

    For many of these steps, you need to enter data in a particular format that Kontent will understand. See a description of formatsOpens in a new window that Zapier expects in fields. As for the Kontent integration, here are some examples of the data to provide action steps:

    • Linked items: Accepted values are content item IDs and external IDs. You can combine them – for multiple linked items, some can be item IDs and some can be external IDs. You can use the Find Content Item action if you need to locate items for this field. You can also add a single value to each line or multiple values separated by a comma. For example, the output of a previous step might be an array such as external_item_1, external_item_2. You can refer to this output in the linked item field on a single line.
    Example of values for linked items in Zap
    • Taxonomy: This field accepts taxonomy IDs or codenames. Similarly to linked items, you can provide one value per line or comma-separated values on a single line.
    Example of values for taxonomy in Zap
    • Assets: Like taxonomy fields, you can provide the asset ID or codename of an asset. Values can be added on a single line separated by commas or on multiple lines. You can use the Find Asset action to locate assets in your project.
    Example of values for assets in Zap
    • Dates and times: This follows the formats specified by Zapier. You can also pass a value obtained from a previous step as in the screenshot above. Examples of acceptable dates and times:
      • 11/11/2011
      • 11/11/2011 4PM CST
      • next friday at 7pm
      • 2019-03-27T13:10:01.791Z
    Example of a date in Zap

    Searches

    Because the webhook notification from Kontent only contains basic information, such as a content item ID and language ID, you may need to search your project for more information. For example, to load all data about a content item, you can use a Find Content Item action. You can search for an item based on its id, codename, external_id, or any of the content type’s elements.

    There are currently 4 searches available:

    • Find Content Item
    • Find Workflow Step
    • Find Language
    • Find Asset

    Another useful example is to translate language or workflow step IDs into codenames. The webhook notification generally contains IDs, but if you need to compare a language codename (“en-US”, for example) later on in the Zap or if you’re writing values to a Google Sheet and want to add the user-friendly name, you could add a Find language step. You can search for the language via ID. You will find all the details of the language in the output.

    • JSON
    {     id: '1c37a40c-9158-031d-9d2d-adf65a568cd6',     name: 'Czech',     codename: 'cz-CZ',     external_id: 'lang_czech',     is_active: true,     is_default: false,     fallback_language: {         id: '00000000-0000-0000-0000-000000000000'     } }
    {     id: '1c37a40c-9158-031d-9d2d-adf65a568cd6',     name: 'Czech',     codename: 'cz-CZ',     external_id: 'lang_czech',     is_active: true,     is_default: false,     fallback_language: {         id: '00000000-0000-0000-0000-000000000000'     } }

    What's next?

    With these tools, you have everything you need to integrate your Kontent project with hundreds of other applications. To see an example Zap, you can check out creating Google Calendar eventsOpens in a new window using Zapier. If you have any ideas to improve the integration or if you run into issues, please submit a GitHub issueOpens in a new window.