---
title: "Using Repeat Paths to Automate Repetitive Tasks"
description: "Using Repeat Paths to Automate Repetitive Tasks"
url: "https://www.contentstack.com/docs/developers/automation-hub-guides/using-repeat-paths-to-automate-repetitive-tasks"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2024-05-14"
---

# Using Repeat Paths to Automate Repetitive Tasks

This use case covers a scenario where you can dynamically create multiple entries in Contentstack using the Repeat Path feature.

In this use case, we send bulk data via Postman and fetch the data in the HTTP trigger. Once the data is fetched, you need to configure the Repeat Path. Select the HTTP trigger data via the Data source field in the Repeat Path configuration.

**Note:** You can use any trigger or action to fetch the data from any source.

Configure the Contentstack action and select the Create an Entry action inside the repeat path. In the Create an Entry action, fetch the current-item value from the Repeat Path step. The current\_item will iterate through each item in the data array and create the entries in Contentstack.

Let's break this scenario to see what must be the trigger event and the consequent action required to execute the Automation:

*   **Set up the “HTTP'' Trigger Event:** This trigger event is activated whenever a user makes a HTTP GET/POST request to the configured URL. In this case, the data is collected from Postman to the HTTP trigger.
*   **Set up the Contentstack “Repeat Path”:** Once the above event triggers the automation, it checks for the configuration provided within the repeat path.
*   **Set up the Contentstack “Create an Entry” action:** When the Repeat Path configurations are set, the create an entry action will create different entries in Contentstack.
    
    **Note:** Once you configure any action inside the Repeat Path, it will execute the action step repeatedly until the condition is met.
    

The steps to set up the Automation are as follows:

1.  [Configure HTTP Trigger](#configure-http-trigger)
2.  [Configure Repeat Path](#configure-repeat-path)
3.  [Configure Contentstack Connector within the Repeat Path Step](#configure-contentstack-connector-within-the-repeat-path-step)

Let’s look at the setup in detail.

1.  ## Configure HTTP Trigger
    
    1.  Log in to your [Contentstack account](https://www.contentstack.com/login/) and click the “Automate” icon.
    2.  Click **\+ New Project** to add a new project.
    3.  Click **\+ New Automation**.
    4.  Enter the **Automation Name** and **Description**.
    5.  Click **Create**.
    6.  Select **Configure Trigger** from the left navigation panel.  
        ![Configure\_Trigger.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt9d8264ef7df01d1a/6602dc97c340ad05ecf67b75/Configure_Trigger.png)
    7.  Within the **Configure Trigger** step, click the **HTTP** trigger connector.  
        ![Click\_HTTP\_Connector.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt0d102958d2ed00e5/6602dc968f44444a96c3b224/Click_HTTP_Connector.png)
    8.  Select **HTTP Request Trigger**. This trigger will be activated whenever you make an HTTP GET/POST request to a specific webhook URL.  
        ![Select\_HTTP\_Trigger.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blted3d78295677ac15/6602dcb1aabcc9a37f2f4bc5/Select_HTTP_Trigger.png)
    9.  Select a **Method**, i.e., **GET/POST**.  
        ![Select\_HTTP\_Method.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt889d672879df0dd4/6602dcb1cddae07150b016c8/Select_HTTP_Method.png)
    10.  Click the **Proceed** button.
    11.  You will find the applicable input “URL.” This URL will be the webhook URL to see the rule working. To send the data, hit the URL with a POST call in Postman.
         
         **Note:** Let’s consider the following dummy data from Postman.
         
         {  
         "Students":  
         \[                   {"studentName":"test1","studentClass":"6","studentSection":"A"},  
                             {"studentName":"test2","studentClass":"7","studentSection":"B"},  
                             {"studentName":"test3","studentClass":"8","studentSection":"C"},  
                             {"studentName":"test4","studentClass":"9","studentSection":"D"}  
         \]}
         
    12.  Click the **Test Trigger** button to test the configured trigger.  
         ![Test\_Trigge.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt73f567079bec47cb/66042bebaabcc98d1e2f53d2/Test_Trigge.png)
    13.  On successful configuration, you can see the below output. Click the **Save and Exit** button.  
         ![Save\_Exit\_Trigge.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt562abc0999c72733/66042beb6f2eed3febc2fd63/Save_Exit_Trigge.png)
2.  ## Configure Repeat Path
    
    1.  Click **Configure Action Step** from the left navigation panel.  
        ![Click\_Configure\_Action\_Step.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt8e492f3523425d55/6602dc966f2eed7dc4c2f506/Click_Configure_Action_Step.png)
    2.  Click **Repeat Path** to configure and select the Repeat type.
        
        ![Select\_Repeat\_Path.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt4af495579509878e/6602dcb12531f46438ee5401/Select_Repeat_Path.png)
    3.  In the Repeat Path Configurations, select the **Data source** to iterate the array received in the trigger.  
        ![Repeat\_Path\_Configuration.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt9d8241f648d3244b/6602dca59497241d05f635cb/Repeat_Path_Configuration.png)
    4.  Click **Save Configuration**.  
        ![Save\_Configuration.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt6cf4577e56ac2813/6602dca6d057551183001074/Save_Configuration.png)
    5.  You can click the **Reload** icon to access the most recent data fetched from the **Data Source** field for the Repeat Path output without affecting the configuration.  
        ![Reload.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/bltf6a05a4ef0b494f2/65fd8ee64cea192334b84933/Reload.png)
3.  ## Configure Contentstack Connector within the Repeat Path Step
    
    Configuring an action step inside the Repeat Path will iterate and run the action until the end of the data source is reached.
    
    1.  Click **\+ Add Step** under the Repeat Path from the left navigation panel.  
        ![Add\_Step.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt047e8867e174bfd8/6602dc9683fdf3717a9659a9/Add_Step.png)
    2.  Within the **Configure Action Step**, click the **Contentstack** connector.  
        ![Contentstack\_Action.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt75327c4fb14e2d91/6602dc970061c781121037e7/Contentstack_Action.png)
    3.  Select the **Contentstack Management** connector to perform CMS tasks.  
        ![Select\_Connector\_Category.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt25213d80e04c56b4/6602de7e3caa571b29cfc6ec/Select_Connector_Category.png)
    4.  Under **Choose an Action** tab, select the **Create an Entry** action.  
        ![Create\_an\_Entry\_Action.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt81d3bbad4e14440e/6602dca5c1951038f1ded644/Create_an_Entry_Action.png)
    5.  In the **Configure Action** tab, click **\+ Add New Account** to add your Contentstack account.  
        ![Add\_New\_Account.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/bltbaacfb3dd88849d9/6602dc960061c737e61037e3/Add_New_Account.png)
    6.  Select a way to add a new account. You can authenticate your account in two ways: **Contentstack OAuth** or **Management Token**.  
        ![Authorize\_Account.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt583530c9a76bca24/66042d3f0a7895c103d7f6ea/Authorize_Account.png)
        1.  If you select **Contentstack OAuth** and click **Proceed**, the Manage Permissions modal will open, as shown below. Provide the OAuth permissions for all the values by checking the boxes and click **Authorize**.   
            ![Authorize\_Contentstack.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt96e2cc3dc4535ae2/66042d3f626e800628957f8c/Authorize_Contentstack.png)
        2.  In the pop-up that appears, select your organization to complete the authorization.  
            ![Select\_Organization.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt186020291c130b16/6602df12d05755cdf10010a1/Select_Organization.png)
        3.  In the pop-up that appears, view the module-specific access rights provided to the app. Click **Authorize** to complete authorization.  
            ![Authorize\_Organization.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/bltc14717a94926f294/6602de7ed057550cc2001092/Authorize_Organization.png)
        4.  Provide an **Account Name** and click the **Save** button.  
            ![Set-Account-Name](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt4f93c8d80ea0a3dc/644664b87f34014b36bee46c/Set-Account-Name.png)
    7.  Select a **Stack**, **Branch**, and a **Content Type** from the **Lookup** list.  
        ![Select\_Different\_Fields.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/bltc3c641fdb94034e3/6602dca6bcecd45133f5a05e/Select_Different_Fields.png)
    8.  Provide your entry data in the **Entry Data** field. Fetch the data from the Repeat Path step.
        
        **Note:** Provide your entry data as per your content type schema in [JSON format](/docs/developers/create-content-types/json-schema-for-creating-a-content-type/) only.
        
        ![Entry\_Data.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt51c780b1d2083e5f/6602dca53caa574deecfc6a4/Entry_Data.png)
    9.  Click the **Proceed** button.
    10.  Click the **Test Action** button to test the configured action.  
         ![Test\_Action.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/bltab4c350b63a84f20/6602dcb1626e804cbb957677/Test_Action.png)
    11.  Click the **Save and Exit** button.  
         ![Save\_Exit\_Action.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/bltbced0b5a9bb594d3/6602dca59497241af2f635cd/Save_Exit_Action.png)
    
    You can also add another action step using the Quick Select screen after you have configured the Contentstack connector.
    
    ![Create\_Action\_Step.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt5f850f617432a552/6602dc97bdfec332f7583154/Create_Action_Step.png)
    
      
    In the output, you will see one entry. To view all the entries created, you must activate the automation.
    
    ![Activate\_Automation.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/bltd4e9dcca1bfc75bd/6602dc96fc58c8a212143261/Activate_Automation.png)
    
      
    After activating the automation, you must send the data via Postman to the HTTP trigger URL. Navigate to Contentstack to view the entries in the selected content type.
    
    ![Entry\_Ouput\_1.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt1c629d9a685126a9/6603ed360a78958f32d7f4a9/Entry_Ouput_1.png)
    
      
    You can view the details of the entry as shown below:
    
    ![Entry\_Output\_2.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/bltdec92afc47263f5a/6603ed366f7fa77366eadec7/Entry_Output_2.png)