cs-icon.svg

Contentstack Trigger

The Contentstack trigger lets you add Contentstack-specific trigger events, such as the creation/updating/publishing/unpublishing/deletion/deployment, etc., of workflows, entries, releases, global fields, assets, and/or content types.

Set up Contentstack

You will find the following trigger events for the Contentstack trigger:

Note: After successfully configuring a trigger, if you re-configure any other trigger you will be prompted to revert to the previously configured trigger. You can revert back to the last trigger configurations by clicking the Revert Changes button.

Let’s look at each of them in detail.

Workflow Trigger

The Workflow Trigger event lets you trigger an automation when a workflow stage changes.

Let’s look at the steps to set up the trigger event.

  1. Click Configure Trigger from the left navigation panel.
  2. Within the Configure Trigger step, click the Contentstack connector.
    Select_Contentstack_Trigger
  3. Under the Choose Trigger tab, select Workflow Trigger.
    Select_the_Workflow_Trigger_Event
  4. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add_New_Account
  5. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize .
    Authorize-Popup

    Note: Contentstack offers support for branches in Automation Hub. You must authenticate and re-authorize your existing account by checking all the permissions to add your Contentstack account.

  6. Select the Organization where you want to apply the Automation.
    Select-Organization.png.png
  7. In the pop-up that appears, view the module-specific access rights provided to the app. Click Authorize to complete authorization.
    Authorize-Organization.png.png

    Note: You need to scroll down to view all the permissions.

  8. Set the Account Name and click Save .
    Set-Account-Name.png.png
  9. Select the trigger event from the dropdown, i.e., Workflow Stage Changed . Select_An_Event
  10. Select a Stack , Branch, Content Type , and Workflow from the Lookup dropdown.
    Select_Different_Fields

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

  11. [Optional] Enable the Show optional fields toggle button to display the Workflow Stage field.
    Select_Show_Optional_Field_Workflow_Stage
  12. Click Proceed .
  13. Click Test Trigger to execute and test the trigger that you configured.
    Test_Trigger
  14. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit .
    Click_the_Save_and_Exit_Button

This sets your Workflow trigger.

Entry Trigger

The Entry Trigger event lets you trigger an automation when you create/update/publish/unpublish/delete entries.

Let’s look at the steps to set up the trigger event.

  1. Under the Choose Trigger tab, select Entry Trigger .
    Select_the_Entry_Trigger_Event
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add_New_Account
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize .
    Authorize-Popup.png

    Note: Contentstack offers support for branches in Automation Hub. You must authenticate and re-authorize your existing account by checking all the permissions to add your Contentstack account.

  4. Select the Organization where you want to apply the Automation.
    Select-Organization.png
  5. In the pop-up that appears, view the module-specific access rights provided to the app. Click Authorize to complete authorization.
    Authorize-Organization.png.png

    Note: You need to scroll down to view all the permissions.

  6. Set the Account Name and click Save .
    Set-Account-Name.png
  7. Select the trigger event from the dropdown, i.e, All . Select a Stack , and Branch from the Lookup dropdown.
    For Entries, you will find the following module-specific sub-events:
    • Entry Created: Triggers when you create a new entry
    • Entry Updated: Triggers when you update an entry
    • Entry Deleted: Triggers when you delete an entry
    • Entry Published: Triggers when you publish an entry
    • Entry Unpublished: Triggers when you unpublish an entry
    • Entry Publish Failed: Triggers when an entry publish activity fails
    • Entry Unpublish Failed: Triggers when an entry unpublish activity fails
    • ALL: Triggers when you perform any of the above activities on an entry
    Select_Different_Fields

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

  8. [Optional] Enable the Show optional fields toggle button to display the Content Type , Environment , and Parameters fields.
    Select_the_Show_Optional_Fields
  9. Click the + Add Reference Parameters button to display the details of the referenced entry.

    In the Reference Parameters Value field, provide the unique_id of the content type containing the reference field from the Lookup data dropdown. The details of the referenced entry are shown in the payload or output.

    Reference_Parameters_Dropdown

    Here is the syntax to display nested references:
    parent_content_type_uid.referenced_content_type_uid

    Reference-Parameters.png
  10. Click Proceed and then click Test Trigger to see the output.
    Save-Exit-Reference-Parameters.png

    Following is the output without reference:

    Output_Without_Reference_Parameters
  11. Click the + Add Query Parameters button to fetch the entry based on different parameters such as Locale , Workflow , Version etc.
    Query-Parameters.png
  12. You can fetch the details of the entry based on a query parameter and its value.
    Reference_Parameters_Output
  13. Click Proceed .
  14. Click Test Trigger to execute and test the trigger that you configured.

    Note: You can preview the latest data created in Contentstack without performing the trigger event. The latest data will be fetched and displayed to you after you test the trigger. You must click Retest to fetch the data you created in Contentstack.

    Test_Trigger
  15. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit .
    Locale_Output

This sets your Entry trigger.

Release Trigger

The Release Trigger event lets you trigger an automation when you deploy a release in an environment.

Let’s look at the steps to set up the trigger event.

  1. Under the Choose Trigger tab, select Release Trigger .
    Select_the_Release_Trigger_Event
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add_New_Account
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize .
    Authorize-Popup.png

    Note: Contentstack offers support for branches in Automation Hub. You must authenticate and re-authorize your existing account by checking all the permissions to add your Contentstack account.

  4. Select the Organization where you want to apply the Automation.
    Select-Organization.png
  5. In the pop-up that appears, view the module-specific access rights provided to the app. Click Authorize to complete authorization.
    Authorize-Organization.png.png

    Note: You need to scroll down to view all the permissions.

  6. Set the Account Name and click Save .
    Set-Account-Name.png
  7. Select the trigger event from the dropdown, i.e., Release Deployed and select a Stack , and Branch from the Lookup dropdown.
    Select_Different_Fields

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

  8. [Optional] Enable the Show optional fields toggle button to display the Release , and Environment fields.
    Show_Optional_Fields
  9. Click Proceed.
  10. Click Test Trigger to execute and test the trigger that you configured.

    Note: You can preview the latest data created in Contentstack without performing the trigger event. The latest data will be fetched and displayed to you after you test the trigger. You must click Retest to fetch the data you created in Contentstack.

    Test_Trigger
  11. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit .
    Save_And_Exit

This sets your Release trigger.

Global Field Trigger

The Global Field Trigger event lets you trigger an automation when you create/update/delete global fields.

Let’s look at the steps to set up the trigger event.

  1. Under the Choose Trigger tab, select Global Field Trigger .
    Select_the_Global_Field_Trigger_Event
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add_New_Account
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize .
    Authorize-Popup.png

    Note: Contentstack offers support for branches in Automation Hub. You must authenticate and re-authorize your existing account by checking all the permissions to add your Contentstack account.

  4. Select the Organization where you want to apply the Automation.
    Select-Organization.png
  5. In the pop-up that appears, view the module-specific access rights provided to the app. Click Authorize to complete authorization.
    Authorize-Organization.png.png

    Note: You need to scroll down to view all the permissions.

  6. Set the Account Name and click Save .
    Set-Account-Name.png
  7. Select the trigger event from the dropdown, i.e., Global Field Created and select a Stack, and Branch from the Lookup dropdown.
    For Global Field, you will find the following events:
    • Global Field Created: When you create a global field.
    • Global Field Updated: When you update a global field.
    • Global Field Deleted: When you delete a global field.
    • ALL: When you perform any of the above activities on a global field.
    Select_Different_Fields

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

  8. [Optional] Enable the Show optional fields toggle button to display the specific Global Field .
    Show_Optional_Fields
  9. Click Proceed .
  10. Click Test Trigger to execute and test the trigger that you configured.

    Note: You can preview the latest data created in Contentstack without performing the trigger event. The latest data will be fetched and displayed to you after you test the trigger. You must click Retest to fetch the data you created in Contentstack.

    Test_Trigger
  11. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit .
    Save_And_Exit

This sets your Global Field trigger.

Asset Trigger

The Asset Trigger event lets you trigger an automation when you create/update/publish/unpublish/delete assets.

Let’s look at the steps to set up the trigger event.

  1. Under the Choose Trigger tab, select Asset Trigger .
    Select_the_Asset_Trigger_Event
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add_An_Account
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize .
    Authorize-Popup.png

    Note: Contentstack offers support for branches in Automation Hub. You must authenticate and re-authorize your existing account by checking all the permissions to add your Contentstack account.

  4. Select the Organization where you want to apply the Automation.
    Select-Organization.png
  5. In the pop-up that appears, view the module-specific access rights provided to the app. Click Authorize to complete authorization.
    Authorize-Organization.png.png

    Note: You need to scroll down to view all the permissions.

  6. Set the Account Name and click Save .
    Set-Account-Name.png
  7. Select the trigger event from the dropdown, i.e., Asset Created and select a Stack, and Branch from the Lookup dropdown.
    For Asset Trigger, you will find the following events:
    • Asset Created: When you create a new asset in your stack.
    • Asset Updated: When you update an asset.
    • Asset Deleted: When you delete an asset.
    • Asset Published: When you publish your assets to a publishing environment.
    • Asset Publish Failed: When asset publishing fails due to error.
    • Asset Unpublished: When you unpublish or remove your assets from a publishing environment.
    • Asset Unpublish Failed: When the asset unpublishing activity fails.
    • ALL: When you perform any of the above activities on an asset.
    Select_Different_Fields

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

  8. Click Proceed .
  9. Click Test Trigger to execute and test the trigger that you configured.
    Test_Trigger
  10. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit .
    Save_And_Exit

This sets your Asset Trigger.

Content Type Trigger

The Content Type Trigger event lets you trigger an automation when you create/update/delete content types.

Let’s look at the steps to set up the trigger event.

  1. Under the Choose Trigger tab, select Content Type Trigger .
    Select_the_Content_Type_Trigger_Event
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add_An_Account
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize .
    Authorize-Popup.png

    Note: Contentstack offers support for branches in Automation Hub. You must authenticate and re-authorize your existing account by checking all the permissions to add your Contentstack account.

  4. Select the Organization where you want to apply the Automation.
    Select-Organization.png
  5. In the pop-up that appears, view the module-specific access rights provided to the app. Click Authorize to complete authorization.
    Authorize-Organization.png.png

    Note: You need to scroll down to view all the permissions.

  6. Set the Account Name and click Save .
    Set-Account-Name.png
  7. Select the trigger event from the dropdown, i.e., Content Type Created and select a Stack, and Branch from the Lookup dropdown
    For Content Type Trigger, you will find the following events:
    • Content Type Created: When you create a new content type.
    • Content Type Updated: When you update a content type.
    • Content Type Deleted: When you delete a content type.
    • ALL: When you perform any of the above activities on a content type.
    Select_Different_Fields

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

  8. [Optional] Enable the Show optional fields toggle button to display the specific Content Type .
    Show_Optional_Fields
  9. Click Proceed .
  10. Click Test Trigger to execute and test the trigger that you configured.

    Note: You can preview the latest data created in Contentstack without performing the trigger event. The latest data will be fetched and displayed to you after you test the trigger. You must click Retest to fetch the data you created in Contentstack.

    Test_Trigger
  11. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit .
    Save_And_Exit

This sets your Content Type trigger.

Was this article helpful?
^