Nested JSON data

Hi!

Still running that paper company!

I’m working with a JSON that seems to be too deep to enable Make to fetch the variables on the next module. From research I added an iterator to simplify a bit but I get the following output for which I’m trying to get those values:

I have tried a few things like adding a second iterator but that doesn’t get me really far, and I also tried a Set Multiple Variables leveraging the function map() but couldn’t get it to work either ! I have to map against the name et related value below because the JSON structure changes over time.

Can you please help me out :bowing_woman:?
Thank you ! :sweat_smile:

2 Likes

Hi,

Maybe you can use a combination of flat and map to get the json into a structure that can be used in the scenario.
If you give me the full json, I can try to build a scenario that gets this information.

Regards,
Levin

1 Like

Hi @LevinO !

Here is the initial output of the API call. Should I even do an iterator ?

[
    {
        "body": {
            "Id": "2e170546-82c0-4658-843e-37810cb6c273",
            "Status": "OK",
            "ProviderName": "Make",
            "DateTimeUTC": "/Date(1739826256642)/",
            "Reports": [
                {
                    "ReportID": "ProfitAndLoss",
                    "ReportName": "Profit and Loss",
                    "ReportType": "ProfitAndLoss",
                    "ReportTitles": [
                        "Profit & Loss",
                        "COMPANY Pty Ltd",
                        "1 February 2025 to 18 February 2025"
                    ],
                    "ReportDate": "17 February 2025",
                    "UpdatedDateUTC": "/Date(1739826256642)/",
                    "Fields": [],
                    "Rows": [
                        {
                            "RowType": "Header",
                            "Cells": [
                                {
                                    "Value": ""
                                },
                                {
                                    "Value": "18 Feb 25"
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "Income",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Prep Fee Commission",
                                            "Attributes": [
                                                {
                                                    "Value": "15328327-b864-4112-a2f4-bba03363fa1b",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "1899.91",
                                            "Attributes": [
                                                {
                                                    "Value": "15328327-b864-4112-a2f4-bba03363fa1b",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Storage Fee",
                                            "Attributes": [
                                                {
                                                    "Value": "9fc471b7-7aac-44d1-83fa-e388bae5b6e3",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "2237.77",
                                            "Attributes": [
                                                {
                                                    "Value": "9fc471b7-7aac-44d1-83fa-e388bae5b6e3",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "SummaryRow",
                                    "Cells": [
                                        {
                                            "Value": "Total Income"
                                        },
                                        {
                                            "Value": "4137.68"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Gross Profit"
                                        },
                                        {
                                            "Value": "4137.68"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "Less Operating Expenses",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Bank Fees",
                                            "Attributes": [
                                                {
                                                    "Value": "99301a16-38f4-4d7e-b967-415b17b46055",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "10.73",
                                            "Attributes": [
                                                {
                                                    "Value": "99301a16-38f4-4d7e-b967-415b17b46055",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Development Expenses",
                                            "Attributes": [
                                                {
                                                    "Value": "9216d9db-3429-413c-9619-2dfb7fa4f712",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "6000.00",
                                            "Attributes": [
                                                {
                                                    "Value": "9216d9db-3429-413c-9619-2dfb7fa4f712",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Equipment Rent",
                                            "Attributes": [
                                                {
                                                    "Value": "26925969-9de8-486a-947d-32e4fb8f1996",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "567.00",
                                            "Attributes": [
                                                {
                                                    "Value": "26925969-9de8-486a-947d-32e4fb8f1996",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Freight & Courier",
                                            "Attributes": [
                                                {
                                                    "Value": "a298a0c3-c424-42eb-bbc1-d93c29fddce1",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "2765.80",
                                            "Attributes": [
                                                {
                                                    "Value": "a298a0c3-c424-42eb-bbc1-d93c29fddce1",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Motor Vehicle Expenses",
                                            "Attributes": [
                                                {
                                                    "Value": "5118d229-0fc2-48b6-97ea-f65807bb09cd",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "118.83",
                                            "Attributes": [
                                                {
                                                    "Value": "5118d229-0fc2-48b6-97ea-f65807bb09cd",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Office Expenses",
                                            "Attributes": [
                                                {
                                                    "Value": "79a01bf2-5127-4b7d-849d-86061297caac",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "18.42",
                                            "Attributes": [
                                                {
                                                    "Value": "79a01bf2-5127-4b7d-849d-86061297caac",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Product Testing",
                                            "Attributes": [
                                                {
                                                    "Value": "8373b96f-90ca-4b5f-ae40-2a95df9d9efe",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "52.11",
                                            "Attributes": [
                                                {
                                                    "Value": "8373b96f-90ca-4b5f-ae40-2a95df9d9efe",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Rent",
                                            "Attributes": [
                                                {
                                                    "Value": "c5341fa8-72b0-4f3c-bf4f-f18af91e0694",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "7134.16",
                                            "Attributes": [
                                                {
                                                    "Value": "c5341fa8-72b0-4f3c-bf4f-f18af91e0694",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Stripe Fees",
                                            "Attributes": [
                                                {
                                                    "Value": "72a217b0-a349-483b-96ac-dfebf40fee69",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "67.21",
                                            "Attributes": [
                                                {
                                                    "Value": "72a217b0-a349-483b-96ac-dfebf40fee69",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Subscriptions",
                                            "Attributes": [
                                                {
                                                    "Value": "3d641e43-d0d9-41b5-b924-e321a3f4aa10",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "561.76",
                                            "Attributes": [
                                                {
                                                    "Value": "3d641e43-d0d9-41b5-b924-e321a3f4aa10",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Superannuation",
                                            "Attributes": [
                                                {
                                                    "Value": "32edd877-cdd0-49f9-ae3e-938f22ce8468",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "1832.31",
                                            "Attributes": [
                                                {
                                                    "Value": "32edd877-cdd0-49f9-ae3e-938f22ce8468",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Telephone & Internet",
                                            "Attributes": [
                                                {
                                                    "Value": "d9932294-dbf9-458a-a178-b8fb98bcef8a",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "13.64",
                                            "Attributes": [
                                                {
                                                    "Value": "d9932294-dbf9-458a-a178-b8fb98bcef8a",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Travel - National",
                                            "Attributes": [
                                                {
                                                    "Value": "d07be44b-15bb-4eee-989f-fc3aa9c0c8f5",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "131.62",
                                            "Attributes": [
                                                {
                                                    "Value": "d07be44b-15bb-4eee-989f-fc3aa9c0c8f5",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Wages and Salaries",
                                            "Attributes": [
                                                {
                                                    "Value": "c36f24d8-1937-4a56-9c4f-7de3be68c295",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "15933.00",
                                            "Attributes": [
                                                {
                                                    "Value": "c36f24d8-1937-4a56-9c4f-7de3be68c295",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "SummaryRow",
                                    "Cells": [
                                        {
                                            "Value": "Total Operating Expenses"
                                        },
                                        {
                                            "Value": "35206.59"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Net Profit"
                                        },
                                        {
                                            "Value": "-31068.91"
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        "headers": {
            "content-type": "application/json; charset=utf-8",
            "content-length": "13472",
            "server": "nginx",
            "xero-correlation-id": "2e170546-82c0-4658-843e-37810cb6m273",
            "x-appminlimit-remaining": "9831",
            "x-minlimit-remaining": "59",
            "x-daylimit-remaining": "4879",
            "expires": "Mon, 17 Feb 2025 21:04:16 GMT",
            "cache-control": "max-age=0, no-cache, no-store",
            "pragma": "no-cache",
            "date": "Mon, 17 Feb 2025 21:04:16 GMT",
            "connection": "close",
            "x-client-tls-ver": "tls1.3"
        },
        "statusCode": 200
    }
]
1 Like

Hi!

I have been trying to get this to work but really struggling here with this output :thinking:. I’ve add a first iterator on Body.Reports:Rows from the above API output. It generated the code attached but it is still unusuable with the way it’s formatted. I guess my first step would be to try to reformat/map so I can get the following format:
{
“Prep Fee Commission”: 2241.49,
“Storage Fee”: 2237.77,
“Total Income”: 4479.26

}
I can’t manage to pull this off. Does someone have a suggestion?

[
    {
        "RowType": "Header",
        "Cells": [
            {
                "Value": ""
            },
            {
                "Value": "19 Feb 25"
            }
        ],
        "__IMTINDEX__": 1,
        "__IMTLENGTH__": 5
    },
    {
        "RowType": "Section",
        "Title": "Income",
        "Rows": [
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Prep Fee Commission",
                        "Attributes": [
                            {
                                "Value": "15328327-b864-4112-a2f4-bba03363fa1b",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "2241.49",
                        "Attributes": [
                            {
                                "Value": "15328327-b864-4112-a2f4-bba03363fa1b",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Storage Fee",
                        "Attributes": [
                            {
                                "Value": "9fc471b7-7aac-44d1-83fa-e388bae5b6e3",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "2237.77",
                        "Attributes": [
                            {
                                "Value": "9fc471b7-7aac-44d1-83fa-e388bae5b6e3",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "SummaryRow",
                "Cells": [
                    {
                        "Value": "Total Income"
                    },
                    {
                        "Value": "4479.26"
                    }
                ]
            }
        ],
        "__IMTINDEX__": 2,
        "__IMTLENGTH__": 5
    },
    {
        "RowType": "Section",
        "Title": "",
        "Rows": [
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Gross Profit"
                    },
                    {
                        "Value": "4479.26"
                    }
                ]
            }
        ],
        "__IMTINDEX__": 3,
        "__IMTLENGTH__": 5
    },
    {
        "RowType": "Section",
        "Title": "Less Operating Expenses",
        "Rows": [
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Accounting",
                        "Attributes": [
                            {
                                "Value": "cbec5099-843f-432e-84af-eb9741f76c50",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "1150.00",
                        "Attributes": [
                            {
                                "Value": "cbec5099-843f-432e-84af-eb9741f76c50",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Bank Fees",
                        "Attributes": [
                            {
                                "Value": "99301a16-38f4-4d7e-b967-415b17b46055",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "10.73",
                        "Attributes": [
                            {
                                "Value": "99301a16-38f4-4d7e-b967-415b17b46055",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Development Expenses",
                        "Attributes": [
                            {
                                "Value": "9216d9db-3429-413c-9619-2dfb7fa4f712",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "6000.00",
                        "Attributes": [
                            {
                                "Value": "9216d9db-3429-413c-9619-2dfb7fa4f712",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Equipment Rent",
                        "Attributes": [
                            {
                                "Value": "26925969-9de8-486a-947d-32e4fb8f1996",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "567.00",
                        "Attributes": [
                            {
                                "Value": "26925969-9de8-486a-947d-32e4fb8f1996",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Freight & Courier",
                        "Attributes": [
                            {
                                "Value": "a298a0c3-c424-42eb-bbc1-d93c29fddce1",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "2840.36",
                        "Attributes": [
                            {
                                "Value": "a298a0c3-c424-42eb-bbc1-d93c29fddce1",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Motor Vehicle Expenses",
                        "Attributes": [
                            {
                                "Value": "5118d229-0fc2-48b6-97ea-f65807bb09cd",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "275.31",
                        "Attributes": [
                            {
                                "Value": "5118d229-0fc2-48b6-97ea-f65807bb09cd",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Office Expenses",
                        "Attributes": [
                            {
                                "Value": "79a01bf2-5127-4b7d-849d-86061297caac",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "18.42",
                        "Attributes": [
                            {
                                "Value": "79a01bf2-5127-4b7d-849d-86061297caac",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Product Testing",
                        "Attributes": [
                            {
                                "Value": "8373b96f-90ca-4b5f-ae40-2a95df9d9efe",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "52.11",
                        "Attributes": [
                            {
                                "Value": "8373b96f-90ca-4b5f-ae40-2a95df9d9efe",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Rent",
                        "Attributes": [
                            {
                                "Value": "c5341fa8-72b0-4f3c-bf4f-f18af91e0694",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "7134.16",
                        "Attributes": [
                            {
                                "Value": "c5341fa8-72b0-4f3c-bf4f-f18af91e0694",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Stripe Fees",
                        "Attributes": [
                            {
                                "Value": "72a217b0-a349-483b-96ac-dfebf40fee69",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "67.21",
                        "Attributes": [
                            {
                                "Value": "72a217b0-a349-483b-96ac-dfebf40fee69",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Subscriptions",
                        "Attributes": [
                            {
                                "Value": "3d641e43-d0d9-41b5-b924-e321a3f4aa10",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "561.76",
                        "Attributes": [
                            {
                                "Value": "3d641e43-d0d9-41b5-b924-e321a3f4aa10",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Superannuation",
                        "Attributes": [
                            {
                                "Value": "32edd877-cdd0-49f9-ae3e-938f22ce8468",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "1832.31",
                        "Attributes": [
                            {
                                "Value": "32edd877-cdd0-49f9-ae3e-938f22ce8468",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Telephone & Internet",
                        "Attributes": [
                            {
                                "Value": "d9932294-dbf9-458a-a178-b8fb98bcef8a",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "13.64",
                        "Attributes": [
                            {
                                "Value": "d9932294-dbf9-458a-a178-b8fb98bcef8a",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Travel - National",
                        "Attributes": [
                            {
                                "Value": "d07be44b-15bb-4eee-989f-fc3aa9c0c8f5",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "131.62",
                        "Attributes": [
                            {
                                "Value": "d07be44b-15bb-4eee-989f-fc3aa9c0c8f5",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Wages and Salaries",
                        "Attributes": [
                            {
                                "Value": "c36f24d8-1937-4a56-9c4f-7de3be68c295",
                                "Id": "account"
                            }
                        ]
                    },
                    {
                        "Value": "15933.00",
                        "Attributes": [
                            {
                                "Value": "c36f24d8-1937-4a56-9c4f-7de3be68c295",
                                "Id": "account"
                            }
                        ]
                    }
                ]
            },
            {
                "RowType": "SummaryRow",
                "Cells": [
                    {
                        "Value": "Total Operating Expenses"
                    },
                    {
                        "Value": "36587.63"
                    }
                ]
            }
        ],
        "__IMTINDEX__": 4,
        "__IMTLENGTH__": 5
    },
    {
        "RowType": "Section",
        "Title": "",
        "Rows": [
            {
                "RowType": "Row",
                "Cells": [
                    {
                        "Value": "Net Profit"
                    },
                    {
                        "Value": "-32108.37"
                    }
                ]
            }
        ],
        "__IMTINDEX__": 5,
        "__IMTLENGTH__": 5
    }
]
1 Like

Welcome to the Make community!

Yes, that is possible. You’ll need a minimum of three modules:

This is just an example. Your final solution may or may not look like this depending on your requirements.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Alternative solution:

You can save N-1 operations if you use a Text Parser “Match Pattern” module instead.

The above uses 7 operations, this only requires 3.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Hi @samliew

Thank you very much for your help. I am really interested in both approaches, I would like to execute both for my knowledge and to learn. However I’m really struggling with either :sweat:.

If I focus on the first one, I made the following set-up:

  1. First iterator set-up (only selecting {{1.body.Reports.Rows}} got me results, anything below wouldn’t provide anything) and output:


  2. Second iterator set-up (selecting Rows, anything deeper would make me lose data) and output:


  3. Finally the Text Aggregator set-up and output:


I’m struggling to get the same format as you !
Also, the goal is to reference the names so I can easily map each values in my next module that will update a table in Notion.

Hi @samliew

Here is the output of the Xero API call. I’m still trying to find the best way to get module where I can map from value name, different numeric values I need.

Thanks!

[
    {
        "body": {
            "Id": "0c52ddc0-7742-4535-b83e-cb132f******",
            "Status": "OK",
            "ProviderName": "Make",
            "DateTimeUTC": "/Date(1741585991165)/",
            "Reports": [
                {
                    "ReportID": "ProfitAndLoss",
                    "ReportName": "Profit and Loss",
                    "ReportType": "ProfitAndLoss",
                    "ReportTitles": [
                        "Profit & Loss",
                        "**********",
                        "1 March 2025 to 10 March 2025"
                    ],
                    "ReportDate": "10 March 2025",
                    "UpdatedDateUTC": "/Date(1741585991165)/",
                    "Fields": [],
                    "Rows": [
                        {
                            "RowType": "Header",
                            "Cells": [
                                {
                                    "Value": ""
                                },
                                {
                                    "Value": "10 Mar 25"
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "Income",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Prep Fee Commission",
                                            "Attributes": [
                                                {
                                                    "Value": "15328327-b864-4112-a2f4-bba03363fa1b",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "977.23",
                                            "Attributes": [
                                                {
                                                    "Value": "15328327-b864-4112-a2f4-bba03363fa1b",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Storage Fee",
                                            "Attributes": [
                                                {
                                                    "Value": "9fc471b7-7aac-44d1-83fa-e388bae5b6e3",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "1296.10",
                                            "Attributes": [
                                                {
                                                    "Value": "9fc471b7-7aac-44d1-83fa-e388bae5b6e3",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "SummaryRow",
                                    "Cells": [
                                        {
                                            "Value": "Total Income"
                                        },
                                        {
                                            "Value": "2273.33"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "Less Cost of Sales",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Cost of Goods Sold",
                                            "Attributes": [
                                                {
                                                    "Value": "3e99cafc-c1ac-454c-96ac-4659826a4e98",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "2099.09",
                                            "Attributes": [
                                                {
                                                    "Value": "3e99cafc-c1ac-454c-96ac-4659826a4e98",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "SummaryRow",
                                    "Cells": [
                                        {
                                            "Value": "Total Cost of Sales"
                                        },
                                        {
                                            "Value": "2099.09"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Gross Profit"
                                        },
                                        {
                                            "Value": "174.24"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "Less Operating Expenses",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Bank Fees",
                                            "Attributes": [
                                                {
                                                    "Value": "99301a16-38f4-4d7e-b967-415b17b46055",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "1.24",
                                            "Attributes": [
                                                {
                                                    "Value": "99301a16-38f4-4d7e-b967-415b17b46055",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Rent",
                                            "Attributes": [
                                                {
                                                    "Value": "c5341fa8-72b0-4f3c-bf4f-f18af91e0694",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "50.83",
                                            "Attributes": [
                                                {
                                                    "Value": "c5341fa8-72b0-4f3c-bf4f-f18af91e0694",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Subscriptions",
                                            "Attributes": [
                                                {
                                                    "Value": "3d641e43-d0d9-41b5-b924-e321a3f4aa10",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "267.92",
                                            "Attributes": [
                                                {
                                                    "Value": "3d641e43-d0d9-41b5-b924-e321a3f4aa10",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Superannuation",
                                            "Attributes": [
                                                {
                                                    "Value": "32edd877-cdd0-49f9-ae3e-938f22ce8468",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "1303.28",
                                            "Attributes": [
                                                {
                                                    "Value": "32edd877-cdd0-49f9-ae3e-938f22ce8468",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Wages and Salaries",
                                            "Attributes": [
                                                {
                                                    "Value": "c36f24d8-1937-4a56-9c4f-7de3be68c295",
                                                    "Id": "account"
                                                }
                                            ]
                                        },
                                        {
                                            "Value": "11332.78",
                                            "Attributes": [
                                                {
                                                    "Value": "c36f24d8-1937-4a56-9c4f-7de3be68c295",
                                                    "Id": "account"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "RowType": "SummaryRow",
                                    "Cells": [
                                        {
                                            "Value": "Total Operating Expenses"
                                        },
                                        {
                                            "Value": "12956.05"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "RowType": "Section",
                            "Title": "",
                            "Rows": [
                                {
                                    "RowType": "Row",
                                    "Cells": [
                                        {
                                            "Value": "Net Profit"
                                        },
                                        {
                                            "Value": "-12781.81"
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        "headers": {
            "content-type": "application/json; charset=utf-8",
            "content-length": "8298",
            "server": "nginx",
            "xero-correlation-id": "0c52ddc0-7742-4535-b83e-cb132******",
            "x-appminlimit-remaining": "9962",
            "x-minlimit-remaining": "59",
            "x-daylimit-remaining": "4978",
            "expires": "Mon, 10 Mar 2025 05:53:11 GMT",
            "cache-control": "max-age=0, no-cache, no-store",
            "pragma": "no-cache",
            "date": "Mon, 10 Mar 2025 05:53:11 GMT",
            "connection": "close",
            "x-client-tls-ver": "tls1.3"
        },
        "statusCode": 200
    }
]

I already had the examples ready to go :slight_smile: - I just forgotten about this topic.

Try example 2 below first with the “Transform to JSON”.

Example 1

Module Export - quick import into your scenario

You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.

  1. Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.

  3. Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.

JSON module export — paste this directly in your scenario

{"subflows":[{"flow":[{"id":206,"module":"json:ParseJSON","version":1,"parameters":{"type":""},"mapper":{"json":"[{\"body\":{\"Id\":\"2e170546-82c0-4658-843e-37810cb6c273\",\"Status\":\"OK\",\"ProviderName\":\"Make\",\"DateTimeUTC\":\"/Date(1739826256642)/\",\"Reports\":[{\"ReportID\":\"ProfitAndLoss\",\"ReportName\":\"Profit and Loss\",\"ReportType\":\"ProfitAndLoss\",\"ReportTitles\":[\"Profit & Loss\",\"COMPANY Pty Ltd\",\"1 February 2025 to 18 February 2025\"],\"ReportDate\":\"17 February 2025\",\"UpdatedDateUTC\":\"/Date(1739826256642)/\",\"Fields\":[],\"Rows\":[{\"RowType\":\"Header\",\"Cells\":[{\"Value\":\"\"},{\"Value\":\"18 Feb 25\"}]},{\"RowType\":\"Section\",\"Title\":\"Income\",\"Rows\":[{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Prep Fee Commission\",\"Attributes\":[{\"Value\":\"15328327-b864-4112-a2f4-bba03363fa1b\",\"Id\":\"account\"}]},{\"Value\":\"1899.91\",\"Attributes\":[{\"Value\":\"15328327-b864-4112-a2f4-bba03363fa1b\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Storage Fee\",\"Attributes\":[{\"Value\":\"9fc471b7-7aac-44d1-83fa-e388bae5b6e3\",\"Id\":\"account\"}]},{\"Value\":\"2237.77\",\"Attributes\":[{\"Value\":\"9fc471b7-7aac-44d1-83fa-e388bae5b6e3\",\"Id\":\"account\"}]}]},{\"RowType\":\"SummaryRow\",\"Cells\":[{\"Value\":\"Total Income\"},{\"Value\":\"4137.68\"}]}]},{\"RowType\":\"Section\",\"Title\":\"\",\"Rows\":[{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Gross Profit\"},{\"Value\":\"4137.68\"}]}]},{\"RowType\":\"Section\",\"Title\":\"Less Operating Expenses\",\"Rows\":[{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Bank Fees\",\"Attributes\":[{\"Value\":\"99301a16-38f4-4d7e-b967-415b17b46055\",\"Id\":\"account\"}]},{\"Value\":\"10.73\",\"Attributes\":[{\"Value\":\"99301a16-38f4-4d7e-b967-415b17b46055\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Development Expenses\",\"Attributes\":[{\"Value\":\"9216d9db-3429-413c-9619-2dfb7fa4f712\",\"Id\":\"account\"}]},{\"Value\":\"6000.00\",\"Attributes\":[{\"Value\":\"9216d9db-3429-413c-9619-2dfb7fa4f712\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Equipment Rent\",\"Attributes\":[{\"Value\":\"26925969-9de8-486a-947d-32e4fb8f1996\",\"Id\":\"account\"}]},{\"Value\":\"567.00\",\"Attributes\":[{\"Value\":\"26925969-9de8-486a-947d-32e4fb8f1996\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Freight & Courier\",\"Attributes\":[{\"Value\":\"a298a0c3-c424-42eb-bbc1-d93c29fddce1\",\"Id\":\"account\"}]},{\"Value\":\"2765.80\",\"Attributes\":[{\"Value\":\"a298a0c3-c424-42eb-bbc1-d93c29fddce1\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Motor Vehicle Expenses\",\"Attributes\":[{\"Value\":\"5118d229-0fc2-48b6-97ea-f65807bb09cd\",\"Id\":\"account\"}]},{\"Value\":\"118.83\",\"Attributes\":[{\"Value\":\"5118d229-0fc2-48b6-97ea-f65807bb09cd\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Office Expenses\",\"Attributes\":[{\"Value\":\"79a01bf2-5127-4b7d-849d-86061297caac\",\"Id\":\"account\"}]},{\"Value\":\"18.42\",\"Attributes\":[{\"Value\":\"79a01bf2-5127-4b7d-849d-86061297caac\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Product Testing\",\"Attributes\":[{\"Value\":\"8373b96f-90ca-4b5f-ae40-2a95df9d9efe\",\"Id\":\"account\"}]},{\"Value\":\"52.11\",\"Attributes\":[{\"Value\":\"8373b96f-90ca-4b5f-ae40-2a95df9d9efe\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Rent\",\"Attributes\":[{\"Value\":\"c5341fa8-72b0-4f3c-bf4f-f18af91e0694\",\"Id\":\"account\"}]},{\"Value\":\"7134.16\",\"Attributes\":[{\"Value\":\"c5341fa8-72b0-4f3c-bf4f-f18af91e0694\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Stripe Fees\",\"Attributes\":[{\"Value\":\"72a217b0-a349-483b-96ac-dfebf40fee69\",\"Id\":\"account\"}]},{\"Value\":\"67.21\",\"Attributes\":[{\"Value\":\"72a217b0-a349-483b-96ac-dfebf40fee69\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Subscriptions\",\"Attributes\":[{\"Value\":\"3d641e43-d0d9-41b5-b924-e321a3f4aa10\",\"Id\":\"account\"}]},{\"Value\":\"561.76\",\"Attributes\":[{\"Value\":\"3d641e43-d0d9-41b5-b924-e321a3f4aa10\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Superannuation\",\"Attributes\":[{\"Value\":\"32edd877-cdd0-49f9-ae3e-938f22ce8468\",\"Id\":\"account\"}]},{\"Value\":\"1832.31\",\"Attributes\":[{\"Value\":\"32edd877-cdd0-49f9-ae3e-938f22ce8468\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Telephone & Internet\",\"Attributes\":[{\"Value\":\"d9932294-dbf9-458a-a178-b8fb98bcef8a\",\"Id\":\"account\"}]},{\"Value\":\"13.64\",\"Attributes\":[{\"Value\":\"d9932294-dbf9-458a-a178-b8fb98bcef8a\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Travel - National\",\"Attributes\":[{\"Value\":\"d07be44b-15bb-4eee-989f-fc3aa9c0c8f5\",\"Id\":\"account\"}]},{\"Value\":\"131.62\",\"Attributes\":[{\"Value\":\"d07be44b-15bb-4eee-989f-fc3aa9c0c8f5\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Wages and Salaries\",\"Attributes\":[{\"Value\":\"c36f24d8-1937-4a56-9c4f-7de3be68c295\",\"Id\":\"account\"}]},{\"Value\":\"15933.00\",\"Attributes\":[{\"Value\":\"c36f24d8-1937-4a56-9c4f-7de3be68c295\",\"Id\":\"account\"}]}]},{\"RowType\":\"SummaryRow\",\"Cells\":[{\"Value\":\"Total Operating Expenses\"},{\"Value\":\"35206.59\"}]}]},{\"RowType\":\"Section\",\"Title\":\"\",\"Rows\":[{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Net Profit\"},{\"Value\":\"-31068.91\"}]}]}]}]},\"headers\":{\"content-type\":\"application/json; charset=utf-8\",\"content-length\":\"13472\",\"server\":\"nginx\",\"xero-correlation-id\":\"2e170546-82c0-4658-843e-37810cb6m273\",\"x-appminlimit-remaining\":\"9831\",\"x-minlimit-remaining\":\"59\",\"x-daylimit-remaining\":\"4879\",\"expires\":\"Mon, 17 Feb 2025 21:04:16 GMT\",\"cache-control\":\"max-age=0, no-cache, no-store\",\"pragma\":\"no-cache\",\"date\":\"Mon, 17 Feb 2025 21:04:16 GMT\",\"connection\":\"close\",\"x-client-tls-ver\":\"tls1.3\"},\"statusCode\":200}]"},"metadata":{"designer":{"x":-195,"y":46,"name":"Xero"},"parameters":[{"name":"type","type":"udt","label":"Data structure"}]}},{"id":208,"module":"builtin:BasicFeeder","version":1,"parameters":{},"mapper":{"array":"{{206.body.Reports[].Rows}}"},"metadata":{"designer":{"x":49,"y":43}}},{"id":211,"module":"builtin:BasicFeeder","version":1,"parameters":{},"mapper":{"array":"{{208.Rows}}"},"metadata":{"designer":{"x":292,"y":44}}},{"id":213,"module":"util:TextAggregator","version":1,"parameters":{"feeder":208,"rowSeparator":"\n"},"mapper":{"value":"{{211.Cells[1].Value}}: {{211.Cells[2].Value}}"},"metadata":{"designer":{"x":536,"y":43},"parameters":[{"name":"rowSeparator","type":"select","label":"Row separator","validate":{"enum":["\n","\t","other"]}}],"advanced":true}},{"id":428,"module":"regexp:GetElementsFromText","version":1,"parameters":{"continueWhenNoRes":false},"mapper":{"pattern":"##key_value_pairs","text":"{{213.text}}","delimiter":":","strictMatchPerLine":true,"specialCharsPattern":""},"metadata":{"designer":{"x":836,"y":43},"parameters":[{"name":"continueWhenNoRes","type":"boolean","label":"Continue the execution of the route even if the module finds no matches","required":true}]}},{"id":429,"module":"builtin:BasicAggregator","version":1,"parameters":{"feeder":428},"mapper":{"key":"{{428.key}}","value":"{{428.value}}"},"metadata":{"designer":{"x":1081,"y":43,"messages":[{"category":"last","severity":"warning","message":"A transformer should not be the last module in the route."}]}}}]}],"metadata":{"version":1}}

Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?

Example 2

Module Export - quick import into your scenario

You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.

  1. Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.

  3. Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.

JSON module export — paste this directly in your scenario

{"subflows":[{"flow":[{"id":206,"module":"json:ParseJSON","version":1,"parameters":{"type":""},"mapper":{"json":"[{\"body\":{\"Id\":\"2e170546-82c0-4658-843e-37810cb6c273\",\"Status\":\"OK\",\"ProviderName\":\"Make\",\"DateTimeUTC\":\"/Date(1739826256642)/\",\"Reports\":[{\"ReportID\":\"ProfitAndLoss\",\"ReportName\":\"Profit and Loss\",\"ReportType\":\"ProfitAndLoss\",\"ReportTitles\":[\"Profit & Loss\",\"COMPANY Pty Ltd\",\"1 February 2025 to 18 February 2025\"],\"ReportDate\":\"17 February 2025\",\"UpdatedDateUTC\":\"/Date(1739826256642)/\",\"Fields\":[],\"Rows\":[{\"RowType\":\"Header\",\"Cells\":[{\"Value\":\"\"},{\"Value\":\"18 Feb 25\"}]},{\"RowType\":\"Section\",\"Title\":\"Income\",\"Rows\":[{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Prep Fee Commission\",\"Attributes\":[{\"Value\":\"15328327-b864-4112-a2f4-bba03363fa1b\",\"Id\":\"account\"}]},{\"Value\":\"1899.91\",\"Attributes\":[{\"Value\":\"15328327-b864-4112-a2f4-bba03363fa1b\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Storage Fee\",\"Attributes\":[{\"Value\":\"9fc471b7-7aac-44d1-83fa-e388bae5b6e3\",\"Id\":\"account\"}]},{\"Value\":\"2237.77\",\"Attributes\":[{\"Value\":\"9fc471b7-7aac-44d1-83fa-e388bae5b6e3\",\"Id\":\"account\"}]}]},{\"RowType\":\"SummaryRow\",\"Cells\":[{\"Value\":\"Total Income\"},{\"Value\":\"4137.68\"}]}]},{\"RowType\":\"Section\",\"Title\":\"\",\"Rows\":[{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Gross Profit\"},{\"Value\":\"4137.68\"}]}]},{\"RowType\":\"Section\",\"Title\":\"Less Operating Expenses\",\"Rows\":[{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Bank Fees\",\"Attributes\":[{\"Value\":\"99301a16-38f4-4d7e-b967-415b17b46055\",\"Id\":\"account\"}]},{\"Value\":\"10.73\",\"Attributes\":[{\"Value\":\"99301a16-38f4-4d7e-b967-415b17b46055\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Development Expenses\",\"Attributes\":[{\"Value\":\"9216d9db-3429-413c-9619-2dfb7fa4f712\",\"Id\":\"account\"}]},{\"Value\":\"6000.00\",\"Attributes\":[{\"Value\":\"9216d9db-3429-413c-9619-2dfb7fa4f712\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Equipment Rent\",\"Attributes\":[{\"Value\":\"26925969-9de8-486a-947d-32e4fb8f1996\",\"Id\":\"account\"}]},{\"Value\":\"567.00\",\"Attributes\":[{\"Value\":\"26925969-9de8-486a-947d-32e4fb8f1996\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Freight & Courier\",\"Attributes\":[{\"Value\":\"a298a0c3-c424-42eb-bbc1-d93c29fddce1\",\"Id\":\"account\"}]},{\"Value\":\"2765.80\",\"Attributes\":[{\"Value\":\"a298a0c3-c424-42eb-bbc1-d93c29fddce1\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Motor Vehicle Expenses\",\"Attributes\":[{\"Value\":\"5118d229-0fc2-48b6-97ea-f65807bb09cd\",\"Id\":\"account\"}]},{\"Value\":\"118.83\",\"Attributes\":[{\"Value\":\"5118d229-0fc2-48b6-97ea-f65807bb09cd\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Office Expenses\",\"Attributes\":[{\"Value\":\"79a01bf2-5127-4b7d-849d-86061297caac\",\"Id\":\"account\"}]},{\"Value\":\"18.42\",\"Attributes\":[{\"Value\":\"79a01bf2-5127-4b7d-849d-86061297caac\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Product Testing\",\"Attributes\":[{\"Value\":\"8373b96f-90ca-4b5f-ae40-2a95df9d9efe\",\"Id\":\"account\"}]},{\"Value\":\"52.11\",\"Attributes\":[{\"Value\":\"8373b96f-90ca-4b5f-ae40-2a95df9d9efe\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Rent\",\"Attributes\":[{\"Value\":\"c5341fa8-72b0-4f3c-bf4f-f18af91e0694\",\"Id\":\"account\"}]},{\"Value\":\"7134.16\",\"Attributes\":[{\"Value\":\"c5341fa8-72b0-4f3c-bf4f-f18af91e0694\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Stripe Fees\",\"Attributes\":[{\"Value\":\"72a217b0-a349-483b-96ac-dfebf40fee69\",\"Id\":\"account\"}]},{\"Value\":\"67.21\",\"Attributes\":[{\"Value\":\"72a217b0-a349-483b-96ac-dfebf40fee69\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Subscriptions\",\"Attributes\":[{\"Value\":\"3d641e43-d0d9-41b5-b924-e321a3f4aa10\",\"Id\":\"account\"}]},{\"Value\":\"561.76\",\"Attributes\":[{\"Value\":\"3d641e43-d0d9-41b5-b924-e321a3f4aa10\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Superannuation\",\"Attributes\":[{\"Value\":\"32edd877-cdd0-49f9-ae3e-938f22ce8468\",\"Id\":\"account\"}]},{\"Value\":\"1832.31\",\"Attributes\":[{\"Value\":\"32edd877-cdd0-49f9-ae3e-938f22ce8468\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Telephone & Internet\",\"Attributes\":[{\"Value\":\"d9932294-dbf9-458a-a178-b8fb98bcef8a\",\"Id\":\"account\"}]},{\"Value\":\"13.64\",\"Attributes\":[{\"Value\":\"d9932294-dbf9-458a-a178-b8fb98bcef8a\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Travel - National\",\"Attributes\":[{\"Value\":\"d07be44b-15bb-4eee-989f-fc3aa9c0c8f5\",\"Id\":\"account\"}]},{\"Value\":\"131.62\",\"Attributes\":[{\"Value\":\"d07be44b-15bb-4eee-989f-fc3aa9c0c8f5\",\"Id\":\"account\"}]}]},{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Wages and Salaries\",\"Attributes\":[{\"Value\":\"c36f24d8-1937-4a56-9c4f-7de3be68c295\",\"Id\":\"account\"}]},{\"Value\":\"15933.00\",\"Attributes\":[{\"Value\":\"c36f24d8-1937-4a56-9c4f-7de3be68c295\",\"Id\":\"account\"}]}]},{\"RowType\":\"SummaryRow\",\"Cells\":[{\"Value\":\"Total Operating Expenses\"},{\"Value\":\"35206.59\"}]}]},{\"RowType\":\"Section\",\"Title\":\"\",\"Rows\":[{\"RowType\":\"Row\",\"Cells\":[{\"Value\":\"Net Profit\"},{\"Value\":\"-31068.91\"}]}]}]}]},\"headers\":{\"content-type\":\"application/json; charset=utf-8\",\"content-length\":\"13472\",\"server\":\"nginx\",\"xero-correlation-id\":\"2e170546-82c0-4658-843e-37810cb6m273\",\"x-appminlimit-remaining\":\"9831\",\"x-minlimit-remaining\":\"59\",\"x-daylimit-remaining\":\"4879\",\"expires\":\"Mon, 17 Feb 2025 21:04:16 GMT\",\"cache-control\":\"max-age=0, no-cache, no-store\",\"pragma\":\"no-cache\",\"date\":\"Mon, 17 Feb 2025 21:04:16 GMT\",\"connection\":\"close\",\"x-client-tls-ver\":\"tls1.3\"},\"statusCode\":200}]"},"metadata":{"designer":{"x":-145,"y":334,"name":"Xero"},"parameters":[{"name":"type","type":"udt","label":"Data structure"}]}},{"id":430,"module":"json:TransformToJSON","version":1,"parameters":{"space":""},"mapper":{"object":"{{206.body}}"},"metadata":{"designer":{"x":103,"y":329},"parameters":[{"name":"space","type":"select","label":"Indentation","validate":{"enum":["tab","2","4"]}}]}},{"id":220,"module":"regexp:Parser","version":1,"parameters":{"pattern":"\"RowType\":\\s*\"Row\",\\s*\"Cells\":\\s*\\[\\s*{\\s*\"Value\":\\s*\"(?<name>[^\"]+?)\"[\\w\\W]+?},\\s*{\\s*\"Value\":\\s*\"(?<value>[^\"]+?)\"","global":true,"sensitive":true,"multiline":false,"singleline":false,"continueWhenNoRes":false,"ignoreInfiniteLoopsWhenGlobal":false},"mapper":{"text":"{{430.json}}"},"metadata":{"designer":{"x":346,"y":335},"parameters":[{"name":"pattern","type":"text","label":"Pattern","required":true},{"name":"global","type":"boolean","label":"Global match","required":true},{"name":"sensitive","type":"boolean","label":"Case sensitive","required":true},{"name":"multiline","type":"boolean","label":"Multiline","required":true},{"name":"singleline","type":"boolean","label":"Singleline","required":true},{"name":"continueWhenNoRes","type":"boolean","label":"Continue the execution of the route even if the module finds no matches","required":true},{"name":"ignoreInfiniteLoopsWhenGlobal","type":"boolean","label":"Ignore errors when there is an infinite search loop","required":true}]}},{"id":221,"module":"builtin:BasicAggregator","version":1,"parameters":{"feeder":220},"mapper":{"name":"{{220.name}}","value":"{{220.value}}"},"metadata":{"designer":{"x":589,"y":336}}},{"id":222,"module":"util:SetVariable2","version":1,"parameters":{},"mapper":{"name":"values","scope":"roundtrip","value":"{{toCollection(221.array; \"name\"; \"value\")}}"},"metadata":{"designer":{"x":834,"y":334}}}]}],"metadata":{"version":1}}

Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

1 Like

@samliew Thank you so much ! Example 2 works like a charm ! I will analyze the text parser pattern as I couldn’t get something to work from this before.
Thanks again!!