cs-icon.svg

Data Store

The Data Store connector helps you store keys and their corresponding values within a database, that you can retrieve later. With the Data Store connector, you can also store and fetch the data stored in the instance of an execution.

Note: The limit for the key value pair is 5 KB.

Set up Data Store

Perform the following steps to set up the Data Store action connector:

  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 Data Store connector.
    Select_the_Connector_Datastore.png
  4. Under Choose an Action tab, you will see three actions: Get Data (retrieve data stored in Data Store) and Set Data (add data into Data Store), and Append Data (append new data to an existing data in the form of an array)
    Action 1: Select the Set Data action:
    Select_Set_Action
    1. On the Set Data Configure Action page, you need to provide at what level you need to store your data, i.e., at Automation Level, Organizational Level, and Execution Level. Lets see their difference:
      1. Automation Level: Data set at this level can be retrieved when working only on the current automation you are setting it for.
      2. Organizational Level: Data set at this level can be retrieved when working with any automation within the organization.
      3. Execution Level: Data set at this level can be retrieved when working for one completed execution of an automation. Even with parallel executions of an automation, the data is tightly coupled to an individual execution.

      Note: You can store the data inside the steps of the Conditional Path statement and access the data outside of it, as the output data for the conditional path steps is not accessible otherwise. This is applicable for all the storage levels.

      Once you select the Store At value, enter the Data values, i.e., Key and corresponding Value for the same.
      Data_Store_Action_SET_Data_Configure_Action
    2. Click Proceed.
    3. You will see the input values which you have configured in the Set Data Configure Action modal.
      Data_Store_Action_SET_Data_Input
    4. Check if the details are correct. If yes, click Test Action.
      Data_Store_Test_Action
    5. Once set, click Save and Exit.
      Data_Store_Action_SET_Data_Output

    Action 2: Select the Get Data action

    Select_Get_Action
    1. On the Get Data Configure Action page, you need to provide at what level you need to get/retrieve your data, i.e., at Automation Level, Organizational Level, and Execution Level. Lets see their difference:

      1. Automation Level: This will retrieve data stored at Automation Level.

      2. Organization Level: This will retrieve data stored at Organization Level.

      3. Execution Level: This will retrieve data stored at Execution Level.

      Once you select the Get Value At value in the Keys field, you need to enter the keys you want to retrieve. For the Execution Level, the data will be retrieved only at the time of execution and not at the time of configuration of automation.

      Note: For retrieving multiple values, enter the keys in a comma-separated manner.

      Get_Data_Fields
    2. Click Proceed.
    3. You will see the input values which you have configured in the Get Data Configure Action modal.
    4. Check if the details are correct. If yes, click Test Action.
      Test_Action
    5. Once set, click Save and Exit.

    Action 3: Select the Append Data action:
    Select_Apped_Action
    1. On the Append Data Configure Action page, you need to provide at what level you need to store your data, i.e., at Automation Level, Organizational Level, and Execution Level. Lets see their difference:
      1. Automation Level: Data set at this level can be retrieved when working only on the current automation you are setting it for.
      2. Organizational Level: Data set at this level can be retrieved when working with any automation within the organization.
      3. Execution Level: Data set at this level can be retrieved when working for one completed execution of an automation. Even with parallel executions of an automation, the data is tightly coupled to an individual execution.

      Once you select the Store At value, enter the Data values, i.e., Key and corresponding Value for the same.

      Append_Select_Fields
  5. Click the Proceed button.
  6. You will see the input values which you have configured in the Append Data Configure Action modal.
  7. Check if the details are correct. If yes, click the Test Action button.
    Test_Action
  8. Once set, click the Save and Exit button.
    Save_Exit_Append_Normal

    Append action will create an array with the provided value.

Let’s see a simple use-case of Append Data action using Repeat Path.

Append Data action is helpful while working with bulk data. In this example, we are sending bulk data through Postman. You can use any other trigger or third-party source to send your data.
We are sending two arrays via Postman which will append and form a single array. For example: {"array1":["start"], "array2":[1,2,3]}.

  1. Configure the HTTP Trigger connector. For more details, refer to the HTTP Trigger connector documentation.

    Note: Send a request to the HTTP trigger URL via Postman to send bulk data and test the trigger. Once you click Test Trigger, you can see the data sent via Postman in the output.

  2. Once the trigger is configured, configure an Action Step and click the Data Store connector.
  3. Under Choose an Action step, select the Set Data action. In the Store At dropdown, select Automation Level.
  4. In the Set Data action, set the Key and Value. Fetch the array data coming from the previous step. Select the value of array1 in the Value field.
    Set_Data_Key
  5. Click the Proceed button.
  6. Click the Test Action button to test the configured action.
  7. Click the Save and Exit button.
    Save_Exit_Set_Data

Once the data is fetched and stored, use the Repeat Path step to fetch the array of numbers from the HTTP trigger, i.e., array2. To do so, follow the steps below:

  1. Click + Add New Step to add a new step.
  2. Click Configure Action Step from the left navigation panel.
  3. Click Repeat Path to configure repeat path.
    Select_Repeat_Path_Step
  4. In the Repeat Path configuration, select the Data source to fetch the array of numbers configured previously.
    Select_Repeat_Path_Second_Array

    We have set the value of the first array in the Set Data action, and now, we are fetching the array of numbers (array 2) using the Repeat Path, to append both arrays.

    Note: Repeat Path will iterate through the number of items in the array.

  5. Click Save Configuration to save the Repeat Path configuration.
    Save_Repeat_Configuration

On successful completion, use the Append Data action inside Repeat Path. Follow the steps below:

  1. Click + Add Step.
    Repeat_Path_Add_Step
  2. In the Configure Action Step, click the Data Store connector.
    Select_the_Connector_Datastore.png
  3. Under Choose an Action step, select the Append Data action.
    Select_Append_Action
  4. In the Store At field dropdown, select Automation Level.

    Note: You can use organization or execution level from the dropdown.

  5. In the Append Data action, set the Key and Value. Provide the Key value specified in the Set Data action and fetch the current_item data from the Repeat Path step in the Value field.
    The current_item data will fetch the data iterated using the Repeat Path for the array of numbers and append it to the first array.
    Append_Value
  6. Click the Proceed button.
  7. Click the Test Action button to test the configured action.
    Test_Action
  8. Click the Save and Exit button.
    Save_Exit_Append_Data

Now, to fetch the data outside of the Repeat Path, follow the steps below:

  1. Click + Add New Step.
    Get_Data_New_Step
  2. Click Configure Action Step from the left navigation panel.
  3. Click Action Step to configure third-party services.
  4. Within the Configure Action Step, click the Data Store connector. Select the Get Data action.
  5. In the Get Value At field, select Automation Level. In the Keys field, provide the name of the key in which the data is stored in the previous step.
    Get_Data_Fields
  6. Click the Proceed button.
  7. Click the Test Action button to test the configured action.
  8. Click the Save and Exit button. You will be able to see the appended data in the key.
    Save_Exit_Get_Data

To check the output, we will configure the Response action connector.

  1. In the Configure Action Step, select the Response connector.
  2. In the Choose an Action step, select the Response action.
  3. Provide a Response Status, and in the Response Body, choose the data fetched in the previous step (Get Data).
    Response_Fields
  4. Click the Proceed button.
  5. Click the Test Action button to test the configured action.
  6. Once done, click the Save and Exit button.

To view the data, activate the automation and hit the trigger URL in Postman. You will see data combined in one single array.

This sets the Data Store action connector.

Let’s understand more about the Execution Level storage with a simple example:

With Execution Level, the data is stored in the instance of execution of an automation i.e., the access to the data is limited only in the instance in which the automation is executed. Even if there are parallel executions of an automation, the values are not overridden with multiple executions.

Let’s set up our automation by following these simple steps:

  1. Configure the HTTP Trigger connector. For more details, refer to the HTTP Trigger connector documentation.
  2. Once the trigger is configured, click the Data Store connector.
  3. Under Choose an Action step, select the Set Data action. In the dropdown, select Execution Level to store the data at execution level.
  4. Enter the Data values, i.e., Key and corresponding Value for the same.
    Key_Value
  5. Click Proceed.
  6. Click Test Action to test the configured action.
  7. The output will be shown as follows. Click the Save and Exit button.
    Save_Exit
  8. In the Configure Action Step, click the Data Store connector and select the Get Data action.
  9. In the Get Value At field, select Execution Level from the dropdown.
  10. Enter the key data in the Keys field i.e., Key.
    Get_Data

    Note: If you are using the Pause action, you can only get the data which you have set before configuring the Pause connector. You can preserve the data in the Pause connector and retrieve the preserved value afterwards. This is applicable only when you select Execution Level storage.

  11. Click Proceed.
  12. Click Test Action to test the configured action.
  13. The output will be shown as follows. Click the Save and Exit button.
    Save_Exit_Get_Data

    Note: While testing the automation, you will get null value but the data will be available at the time of execution.

To see the output data, we will configure the Response connector. Perform the following steps to set up the Response action connector:

  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 Response connector.
    Select_Connector_Response.png
  4. Under Choose an Action tab, select the Response action.
    Response_Action
  5. Based on the results of your configured action, enter the Response Status.
  6. In the Response Body field, you can add the data that you want to send as the response. You can also fetch the output from the previous step i.e. Get Data action.
    Select_Response_Fields
  7. Click Proceed.
  8. Click Test Action to test the configured action.
  9. You will see the below output. Click Save and Exit.
    Save_Exit_Response

Now, to view the output, activate the automation and hit the HTTP trigger URL. You will see the key:value pair as provided in the Data Store connector.

Final_Output

This sets the Data Store action connector.

Was this article helpful?
^