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
- Click Configure Action Step from the left navigation panel.
- Click Action Step to configure third-party services.
- Within the Configure Action Step, click the Contentstack connector.
- Select the Contentstack Delivery connector to retrieve published entries and assets.
- Under Choose an Action tab, select any one action from the list. Here, we are selecting the Get All Assets action.
- On the Configure Action page, click the + Add New Account to add your Contentstack account.
- In the Authorize modal, enter a Title. Enter the Delivery Token of your stack. Click the Authorize button.
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:
- From the left navigation panel, click Configure Action Step.
- Then, click Action Step to configure third-party services.
- Within the Configure Action Step, click the Contentstack connector.
Note: You can sort and search the connector(s) based on the filter.
- Select the Contentstack Delivery connector to retrieve published entries and assets.
- Under Choose an Action, you will see four actions: Get All Assets, Get All Entries, Get a Single Asset, and Get a Single Entry.
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:
- Under Choose an Action tab, select the Get All Assets action.
- On the Get All Assets Configure Action page, enter the details given below:
- Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
- Select a Stack and an Environment from the Lookup list.
- 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).
- 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.
- Once done, click Proceed.
- Click Test Action to test the configured action.
- On successful configuration, you can see the below output. Click Save and Exit.
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:
- Under Choose an Action tab, select the Get All Entries action.
- On the Get All Entries Configure Action page, enter the details given below:
- Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
- Select a Stack, Branch, Content Type, and Environment from the Lookup list.
Note: By default, the main branch is selected (even if the Branch field is empty).
- 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.
- 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:
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.
- Click Proceed.
- Click Test Action to test the configured action.
- The output will be shown as follows. Click the Save and Exit button.
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:
- Under Choose an Action tab, select the Get a Single Asset action.
- On the Get a Single Asset Configure Action page, enter the details given below:
- Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
- Select a Stack, Environment, and Asset from the Lookup list.
Note: By default, the main branch is selected (even if the Branch field is empty).
- 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.
- Once done, click Proceed.
- Click Test Action to test the configured action.
- On successful configuration, you can see the below output. Click Save and Exit.
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:
- Under Choose an Action tab, select the Get a Single Entry action.
- On the Get a Single Entry Configure Action page, enter the details given below:
- Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
- Select a Stack, Branch, Content Type, Environment, and Entry from the Lookup list.
Note: By default, the main branch is selected (even if the Branch field is empty).
- 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.
- Once done, click Proceed.
- Click Test Action to test the configured action.
- On successful configuration, you can see the below output. Click Save and Exit.
This sets the Contentstack Delivery connector.