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:

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. In the Configure Trigger section, select the Contentstack connector.
    Select-Connector.png
  2. Under Select a Trigger tab, select Workflow Trigger.
    Select-Workflow-Trigger.png
  3. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add-Contentstack-Account.png
  4. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize.
    Permissions-Authorize-Button.png

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

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

  7. Set the Account Name and click Save.
    Set-Account-Name.png
  8. Select the trigger event from the dropdown, i.e., Workflow Stage Changed.
    Select-Event.png

  9. Select a Stack from the LOOKUP dropdown where you want to apply the Automation.
    Select-Stack.png
  10. Select a Content Type from the LOOKUP list.
    Select-Content-Type.png
  11. Under Select Workflow, select your workflow from the LOOKUP list.
    Select-Workflow.png
  12. Click the Show optional fields toggle if you want to select a specific workflow stage.
    Select-Workflow-Stage.png
  13. Click Proceed.
    Proceed-To-Test-Trigger.png
  14. Click Test Trigger to execute and test the trigger that you configured.
    Test-Trigger.png
  15. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit.
    Save-Exit-Button.png

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 Select a Trigger tab, select Entry Trigger.
    Select-Action-Trigger.png

  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add-Account.png

  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize.
    Permissions-Authorize.png

  4. Select the Organization where you want to apply the Automation.
    Choose-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-Button.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-Event.png

    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
  8. Select a Stack to which the entry belongs from the Lookup dropdown. 
    Select-Stack.png
  9. [Optional] Enable the Show optional fields toggle button to display the Content Type, Environment and Parameters fields.
  10. Select the Content Type and Environment from the Lookup dropdown.
    Select-Content-Type-Environment.png
  11. 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. The details of the referenced entry is shown in the payload or output.

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

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

    Following is the output without reference::

    Without-Reference.png
  13. Click the + Add Query Parameters button to fetch the entry based on different parameters such as Locale, Workflow, Version etc. 
    Add-Query-Parameters.png
  14. You can fetch the details of the entry based on a query parameter and its value. 
    Query-Parameter-Output.png
  15. Click Proceed.
    Main-Proceed.png
  16. Click Test Trigger to execute and test the trigger that you configured.
    Test-Trigger-Main.png
  17. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit.
    Save-Exit-Main.png

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 Select a Trigger tab, select Release Trigger.
    Select-Release-Trigger-Action.png
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add-An-Account.png
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize.
    Permissions-Authorization.png

  4. Select the Organization where you want to apply the Automation.
    Choose-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-Button.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.
    Select-Event.png
  8. Select a Stack from the LOOKUP dropdown. Click Show optional fields to select a specific release name and environment to which you want to deploy the release.
    Select-Stack.png
  9. Click Proceed.
    Click-Proceed.png
  10. Click Test Trigger to execute and test the trigger that you configured.
    Test-Trigger.png
  11. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit.
    Save-Exit-Button.png

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 Select a Trigger tab, select Global Field Trigger.
    Select-Global-Trigger-Action.png
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add-An-Account.png
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize.
    Permissions-Authorize.png
  4. Select the Organization where you want to apply the Automation.
    Choose-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-Button.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.
    Select-Event.png
    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.
  8. Select a Stack from the LOOKUP dropdown . Click Show optional fields to select a specific global field.
    Select-Stack.png
  9. Click Proceed.
    Click-Proceed.png
  10. Click Test Trigger to execute and test the trigger that you configured.
    Test-Trigger.png
  11. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit.
    Save-Exit.png

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 Select a Trigger tab, select Asset Trigger.
    Select-Asset-Trigger-Action.png
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add-An-Account.png
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize.
    Permissions-Authorization.png

  4. Select the Organization where you want to apply the Automation.
    Choose-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-Button.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.
    Select-An-Event.png
    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.
  8. Select a Stack from the LOOKUP dropdown.
    Select-Stack.png
  9. Click Proceed.
    Click-Proceed.png
  10. Click Test Trigger to execute and test the trigger that you configured.
    Test-Trigger.png
  11. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit.
    Save-Exit-Button.png

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 Select a Trigger tab, select Content Type Trigger.
    Select-Content-Type-Trigger-Action.png
  2. In the Configure Trigger tab, click + Add New Account to add your Contentstack account.
    Add-An-Account.png
  3. A Permissions window opens. Provide the OAuth permissions for all the module-specific factors and click Authorize.
    Permissions-Authorization.png

  4. Select the Organization where you want to apply the Automation.
    Choose-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-Button.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.
    Select-Event.png

    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.
  8. Select a Stack from the LOOKUP dropdown. Click Show optional fields to select a specific content type.
    Select-Stack.png
  9. Click Proceed.
    Click-Proceed.png
  10. Click Test Trigger to execute and test the trigger that you configured.
    Test-Trigger.png
  11. If successful, you will see an output as follows. If it looks appropriate, click Save and Exit.
    Save-Exit.png

This sets your Content Type trigger.

Was this article helpful?

Thanks for your feedbackSmile-icon

More articles in "Triggers"

On This Page

^