cs-icon.svg

Contentstack Delivery

The Contentstack Delivery Connector lets you fetch entries and assets published in the environment. The Contentstack Delivery connector currently contains four actions: Get All Assets, Get All Entries, Get a Single Asset, and Get a Single Entry.

Note: With the Contentstack Delivery connector, you can only fetch the published entries/assets.

Details of each action are covered in their respective sections.

Prerequisites

To use the Contentstack Delivery connector, you first need to add your Contentstack account. To do so, follow the steps given below:

Connect your Contentstack Account to Automate

  1. Click Configure Action Step from the left navigation panel.
  2. Click Action Step to configure third-party services.
  3. Within the Configure Action Step, click the Contentstack connector.
    Contentstack_Action.png
  4. Select the Contentstack Delivery connector to retrieve published entries and assets.
    Select_Category.png
  5. Under Choose an Action tab, select any one action from the list. Here, we are selecting the Get All Assets action.
    Get_All_Asset_Action.png
  6. On the Configure Action page, click the + Add New Account to add your Contentstack account.
  7. In the Authorize modal, enter a Title. Enter the Delivery Token of your stack. Click the Authorize button.
    Authorize_Button.png

    Additional Resource: To learn more about Delivery Tokens, refer to the Working with Delivery Tokens guide.

Once done, you can go ahead and set up your Contentstack Delivery connector.

Set up the Contentstack Delivery Connector

Perform the following steps to set up the Contentstack Delivery connector:

  1. From the left navigation panel, click Configure Action Step.
  2. Then, click Action Step to configure third-party services.
  3. Within the Configure Action Step, click the Contentstack connector.
    Contentstack_Action.png

    Note: You can sort and search the connector(s) based on the filter.

  4. Select the Contentstack Delivery connector to retrieve published entries and assets.
    Select_Category.png
  5. Under Choose an Action, you will see four actions: Get All Assets, Get All Entries, Get a Single Asset, and Get a Single Entry.
    Select_Action.png

Let’s look at each of them in detail.

Action 1: Select the Get All Assets action

The Get All Assets action lets you fetch details of all the published assets in a stack. To use the Get All Assets action, follow the steps below:

  1. Under Choose an Action tab, select the Get All Assets action.
  2. On the Get All Assets Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Select a Stack and an Environment from the Lookup list.
      Select_Fields.png
    3. Optionally, enable the Show Optional Fields toggle button to display the Branch, Locale, and Version fields.

      Note: By default, the main branch is selected (even if the Branch field is empty).

    4. You can also include the count of the assets, metadata details, fallback (to fetch the assets in the defined fallback language), and publish details by clicking the respective checkboxes.
      Show_Optional_Fields.png
  3. Once done, click Proceed.
  4. Click Test Action to test the configured action.
    Test_Action.png
  5. On successful configuration, you can see the below output. Click Save and Exit.
    Save-Exit.png

Action 2: Select the Get All Entries action

The Get All Entries action fetches all the published entries in a stack. To use the Get All Entries action, follow the steps below:

  1. Under Choose an Action tab, select the Get All Entries action.
  2. On the Get All Entries Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Select a Stack, Branch, Content Type, and Environment from the Lookup list.
      Select_Fields.png

      Note: By default, the main branch is selected (even if the Branch field is empty).

    3. Optionally, enable the Show Optional Fields toggle button to display the Entry Limit, Skip Entry (Pagination), Entry Version, and Select Locale fields. You can also include the count of the entries, fallback (to fetch the assets in the defined fallback language), metadata details, branch, and publish details by clicking the respective checkboxes.
    4. Provide your data in the Customized Data (query) field to filter the entry. Enter your data in the Key, Operator, and Value fields.

      In the Customized Data (query) field, you can filter the entry based on Updated At/Created At options. For example, you can fetch all the entries updated after a certain time and date as shown below:

      Show_optional_Fields.png

      You can view the Lookup data for all the fields present in the content type including Reference, Modular Blocks and Group fields. Using the Operator filter you can sort the data.

      In the Reference field, enter the ID of the reference field of your content type.

      Refeernce.png
  3. Click Proceed.
  4. Click Test Action to test the configured action.
    Test_Action.png
  5. The output will be shown as follows. Click the Save and Exit button.
    Save_Exit.png

Action 3: Select the Get a Single Asset action

The Get a Single Asset action lets you fetch details of a single asset published in a stack. To use the Get a Single Asset action, follow the steps below:

  1. Under Choose an Action tab, select the Get a Single Asset action.
  2. On the Get a Single Asset Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Select a Stack, Environment, and Asset from the Lookup list.
      Select_Fields.png

      Note: By default, the main branch is selected (even if the Branch field is empty).

    3. Optionally, enable the Show Optional Fields toggle button to display the Branch field. You can also include the publish and metadata details by clicking the respective checkboxes.
      Show_optional_Fields.png
  3. Once done, click Proceed.
  4. Click Test Action to test the configured action.
    Test_Action.png
  5. On successful configuration, you can see the below output. Click Save and Exit.
    Save_Exit.png

Action 4: Select the Get a Single Entry action

The Get a Single Entry action lets you fetch details of a single entry published in a stack. To use the Get a Single Entry action, follow the steps below:

  1. Under Choose an Action tab, select the Get a Single Entry action.
  2. On the Get a Single Entry Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Select a Stack, Branch, Content Type, Environment, and Entry from the Lookup list.
      Select_Fields.png

      Note: By default, the main branch is selected (even if the Branch field is empty).

    3. Optionally, enable the Show Optional Fields toggle button to display additional fields. Select the entry Locale and Reference fields.

      In the Reference field, enter the ID of the reference field of your content type. You can also include the metadata and publish details along with fallback (to fetch an entry defined in a particular fallback) and branch checkboxes to fetch these details in addition to the entry details.

      Show_Optional_Fields.png
  3. Once done, click Proceed.
  4. Click Test Action to test the configured action.
    Test_Action.png
  5. On successful configuration, you can see the below output. Click Save and Exit.
    Save_Exit.png

This sets the Contentstack Delivery connector.

Was this article helpful?
^