Referencing data of dicts, lists, arrays - how to pass data dynamically



1. Accessing list data in a nested dict

How to access data - the below is the result of the connector with the ref hubs1:

{
  "deals": [
    {
      "portalId": 5467352,
      "dealId": 854497030,
      "isDeleted": false,
      "associations": null,
      "properties": ...


To access the dealId in the next step, you need to write the following in the respective field where you want the data to be:  {{ hubs1.deals.0.dealId }}


Explanation:

  • The {{   }} are always used when data is referenced to from a previous step.
  • The hubs1 references the previous step itself by its RefID
  • The deals references the object in the above JSON
  • Since within the "deals": [  a list is nested, indicated by the [ corder, we need to specify that we want to access the first object of the list, while the first one is in any programming related terms 0.
  • Lastly, we concatenate with periods . the dealId. Note that the I is capitalized in this particular API from Hubspot. This is important, as APIs are case-sensitive.


2. TBC