"Aggregate to JSON" does not output a valid JSON

Hey Community,

I’m trying to create a JSON input for the pdf.co module, which requires a valid JSON format. I want to create a PDF list of orders.

Unfortunately, the output provided by the “Aggregate to JSON” function does not seem to be a valid JSON for this.

Example output from “Aggregate to JSON” node:

[
    {
        "orders": [
            {
                "name": "John Doe",
                "products": "1 x Product A\n1 x Product B\n",
                "ordernumber": "1234"
            }
        ]
    },
    {
        "orders": [
            {
                "name": "Jack Black",
                "products": "1 x Product C\n1 x Product D\n",
                "ordernumber": "1357"
            }
        ]
    }
]

When I use this as Input data for PDF.co, I get an error:

Async Job Error: [200] Invalid CSV data.


So I asked ChatGPT what’s wrong, and it gave me a simplified JSON back, which worked for the PDF creation:


To fix it, I also tried this solution:

But it didn’t work either.

So for now, I went with a ChatGPT node asking the AI to bring it into the right format. Works for now, but I don’t trust this to work forever.

So can anyone help me create a formula to set a variable from this:

[
    {
        "orders": [
            {
                "name": "John Doe",
                "products": "1 x Product A\n1 x Product B\n",
                "ordernumber": "1234"
            }
        ]
    },
    {
        "orders": [
            {
                "name": "Jack Black",
                "products": "1 x Product C\n1 x Product D\n",
                "ordernumber": "1357"
            }
        ]
    }
]

to this:

{
    "orders": [
        {
            "name": "John Doe",
            "products": "1 x Product A\n1 x Product B\n",
            "ordernumber": "1234"
        },
        {
            "name": "Jack Black",
            "products": "1 x Product C\n1 x Product D\n",
            "ordernumber": "1357"
        }
    ]
}

? Or find another smart way to get there from the “Aggregate to JSON” output?
Thanks a lot!

You might not need “Aggregate to JSON”.

But to help you with that, we need to go a few modules back to see how the data is being presented.

To allow others to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Please share screenshots of your scenario, any error messages, relevant module fields, and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:

2. Scenario Blueprint

Please export the scenario blueprint file to allow others to view the mapped variables in the module fields. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

3. Output Bundles of Modules

Please provide the output bundles of the iterator/search modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

A. Upload as Text File

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

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

@samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

Thanks for helping @samliew .

The source data is coming from Airtable.

The scenario searches for orders in a certain view and returns a list of collections with

  • Bestellung (ordernumber)
  • Empfänger Name 1 (name)
  • Produkt (Products) as text list separated by row

I`ve copied the relevant node into a separate scenario. Here is the exported Blueprint:
blueprint (4).json (38.9 KB)

__

Here is the downloaded output bundle from the airtable node:

[
    {
        "PDF Label": [
            {
                "id": "attDadY2UsgeOflw8",
                "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/2kwHbgiZZ7Zl8X8UlfRwqg/QWjSTcMys_fpQWjP1FkKvRsGtnNFWGUObduILF05v7zW0n-Q0KurgMc3p6h77a2vXCEwRTd3CzR00t0DREThWGZPGmggg8B3YV23jV6WkPre5G3JQAFAPG_rPCNbPU72PFAKjypws4YEwngbN9Jl_9MlWD5GfsADZ2hgX9t8QsPPHFQk2Cg8wHvS1IHHYQGo/h3OaDFDFn5y-8phvqlc17FBZcv1iS8dZAyDFLWPJJho",
                "filename": "0034043333301020004542620.pdf",
                "size": 3873,
                "type": "application/pdf",
                "thumbnails": {
                    "small": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/Ii2zD52Wafd-7oXukL-N0A/QGAhSZElq6pGvqWnoG0GC6azkB4skwqAYMRY4H6d2QCJuXxCrS7DLa_ZS8v5ZOW9V0MG7qJpKl3d7e3Bq40VohjI74XlUyYA3U-HhzG21MHz5F5lDkWwR2S_xPUJ5T_gOTAbh0qa3ABWfFMwB8pfew/Cx9cdHZJO5FlvCGIMw5TOcerO-gU6Cqn1I200t4rUYA",
                        "width": 19,
                        "height": 36
                    },
                    "large": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/2X-JovWemi2BD5OIyXtWew/TJcMObmw_i6JjCz5ZYhMWbEe8mppsGZspeqpQ-o2zPdlI-_q8U_TWqNr01OntmMP70U61-K45eCMTxiq3HI2BtXOMSVrjoqI9HmQ8m0sEBZbIbb8KEj9ME14X5aTSW6A5THb7rBqqUXLU4tdUj8dKg/73UEpRyflbgvMrkEoDM9U6tBRMAt0xYTZHQF4rloDts",
                        "width": 512,
                        "height": 990
                    }
                }
            }
        ],
        "shipDate": "2024-08-18",
        "Status": "Nicht verschickt",
        "Bestellung": "9218",
        "Empfänger name1": "Customer Name 1",
        "Produkte": "1 x KK-250-E-Bohne\n1 x IT-250-E-Bohne\n",
        "id": "recBM1PIl9ZHK5tyE",
        "createdTime": "2024-08-20T07:42:54.000Z",
        "__IMTLENGTH__": 6,
        "__IMTINDEX__": 1
    },
    {
        "PDF Label": [
            {
                "id": "attnMyPSuBUp3Zxgs",
                "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/Q461-BfZIIxooDNBP4Jn_g/FDqr2lqlvbwBRGgWZPTQv-n28UsC82DQN8d_C9wWxIjM5PXKWT3Sk03sYbFq-XwBxDreRED1Q2ZpjEgI7ilhVYGXkBTguGTVYL2VIZJfwvTBtB7XFcJOIqvCTCEOGVQKfYmqSkxbMNZur1KyTZCXsINGVJZ6bxbC4SgMgK3Jt1xNAOo5B64Kcy6SpUfiPBks/rDQmOFvggT3fb69KiEj9b76ex7_8D3LFESN7IG5-nrY",
                "filename": "0034043333301020004539778.pdf",
                "size": 3852,
                "type": "application/pdf",
                "thumbnails": {
                    "small": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/DYTQzyovT5dCGTqU_4x-oA/fHj6TTfBMrdm5beSlDZRnx8gFEfHjz5Iik6RDleU4XNEwzBLBCiH0LR7DG5qM5rPmU5DLbOASKBOyBIXLtFlav99stSjH7gZhsDorlFLuVDJ8c0yAq3X1Mx0B2fCw-UGlXKzi5niwmaiyqDGoVRFhg/zzlc4mLCUTDShP0kzhRm6sqnOlCfOL5SSKqI0_Wqwnk",
                        "width": 19,
                        "height": 36
                    },
                    "large": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/YFUGiPoMFdPhZrhjX82Tpw/up6zAV66OHzCgXNGHq7Xid7sdLs_AGQ2H2Z4WdBr9aFnFH_MdCV19Ud_BrACXO4X_OQ_zAcXH9JpBo8EzjeicMNp7gsTo_tIP8KQpery8pwlO8cx_MH8C-oK9D55Q4pRlxic5g_aBQWzAcDhFfT5aA/cMx20ffB6HTnJau7WchhIidNG0WfAPq5ILFijvRprPI",
                        "width": 512,
                        "height": 990
                    }
                }
            }
        ],
        "shipDate": "2024-08-20",
        "Status": "Nicht verschickt",
        "Bestellung": "9257",
        "Empfänger name1": "Customer Name 2",
        "Produkte": "1 x RAS-250-K-Bohne\n",
        "id": "recuHZ8IhghEMrqnl",
        "createdTime": "2024-08-20T07:53:32.000Z",
        "__IMTLENGTH__": 6,
        "__IMTINDEX__": 2
    },
    {
        "PDF Label": [
            {
                "id": "attmFciOLKJPz1sk0",
                "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/zrg598lVtntY2j6xbsBiPA/v8sJzqE6JIviKLgKjQxAPbLGZUaKMosLVH4LA23Kf9jjbnUREh4Tbbi-DuTVs2vVxWp2B65YcMda5AWeSuwbkF2NaatCkXBh-sVUFyjU61zmM8h3YJVe2HBn3WheO8YwbN3YqPwZbXVkY0lmjnfP3na6zHEtJEY10iPmd2ky8xE23Wm_dcy7RJb_YNODsgRy/7gs6wC3SjkYGnsq5lYo_TOCC2EZEgwICil9N4q7-LyA",
                "filename": "0034043333301020004541250.pdf",
                "size": 3838,
                "type": "application/pdf",
                "thumbnails": {
                    "small": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/TIv10XGN4E_NfIKWjdpGUA/wOUP1gtoM7LSOmEJiKsxvHqhn5YDU-gooDCKJ3f9kM2Bp16e5xpW1p1DDgqE7LmbuhvWcHeQhlZ6noYPl7-VbgotPo2MhPn7ncBFFjsgWGWrKYnrIQaLSfQwnlq9wZb_UVnXw9FddMzhymEpSNLrUA/elxdgJxHpfW1hDn7fsiVzq6xDj403bxQzHs5ZxGvkoU",
                        "width": 19,
                        "height": 36
                    },
                    "large": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/nptlC1XZHcuBLHkzvLdHTw/46nSNg7yx9PqJQIFjWF0zPCaQ7QZZKYDw5CVMBNOEnzJHTuN606DwOEWEiWJ79i8le24Yc9utFRKgfXIFN7zPx-dFZATlbCz8gbgj4c_DjUrevHmErt3VCiV8zVvw-xUMGaOIKa_DvoPW6NMLo4U0A/QptYUeUOmV6r4yhTE_Zh9xgPKPezhm6tXhkr5MIHpjc",
                        "width": 512,
                        "height": 990
                    }
                }
            }
        ],
        "shipDate": "2024-08-20",
        "Status": "Nicht verschickt",
        "Bestellung": "9258",
        "Empfänger name1": "Customer Name 3",
        "Produkte": "1 x AES-500-E-Bohne\n1 x TK-500-E-Bohne\n",
        "id": "recMRggSOuQV5VnjE",
        "createdTime": "2024-08-20T10:09:13.000Z",
        "__IMTLENGTH__": 6,
        "__IMTINDEX__": 3
    },
    {
        "PDF Label": [
            {
                "id": "attriStM22MYQVqi8",
                "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/9h5bYj0zhDkjoO2Bnzvmfg/o9hyG6ITFjUIGe6h8SLOS3ERVXVatquB0wmGscaroSDyI7hziIuHGRufGS5ST7bKGk-zDwYSIHK2nkFP5uEm32MI-rHchYlehXNIsYhl4K4doTtMqoLrsIrfhJ5kxggsXp-IFNcZKJFN8W6QQ2W5RKWGdgPgU_jgWWSD9r6eWhxV2kFQ7VUwsMAb1qJbpU5h/nRHfFK-R5PzTbJxgRN-LuBYNpdjEh6PZvewHjD4CTPc",
                "filename": "0034043333301020004541269.pdf",
                "size": 3853,
                "type": "application/pdf",
                "thumbnails": {
                    "small": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/RUY3ei7JZ1UvuqjCiE8vqw/dlAVpuVpMGniGUcmz3qk4nEctGIKP1XqbmG3m_MrZKxHatKIMRLuq8AHFk-6Cf4mxTO-hAMzOYgMAVByOfUf2QfaUxX6ppov_ZZZ9XOz9ZejGIpKqu5KLKcwUudyUwVKGY_m9yV4WhshUgMvlU7H0A/VNYiWrpG06BoAiqROU7sf4eo9xk9I4dUf4ev8JzIpzg",
                        "width": 19,
                        "height": 36
                    },
                    "large": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/arsXaZmOJlDafp8bgyYLTw/I-mvnvSYjOXRdwWaXkCoHI0E1C8tnvXmbN-ykNzWvFXKyd6kpRlFJLZV_uGiJy88rEHTaO4UsLiwRCZleCYA1azqXY7tZKK_zLNUa1sBP_-JwYfV2braIvq72ynYRPTAATD3Wau616nd927yW6J89Q/w2Po2jyA_efnaC4yYyXrjqYpoZGCbyS5rfYDbhU-W3s",
                        "width": 512,
                        "height": 990
                    }
                }
            }
        ],
        "shipDate": "2024-08-20",
        "Status": "Nicht verschickt",
        "Bestellung": "9259",
        "Empfänger name1": "Customer Name 4",
        "Produkte": "1 x NT-1000-K-Bohne\n1 x HB-1000-K-Bohne\n",
        "id": "rec7uzjgSUGEH3C7j",
        "createdTime": "2024-08-20T10:16:35.000Z",
        "__IMTLENGTH__": 6,
        "__IMTINDEX__": 4
    },
    {
        "PDF Label": [
            {
                "id": "atteFNJiwCiIJIJpT",
                "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/zJKxLwM9c7mb8ojL1GewFQ/nw-0lYgfPo3qLyv_6NP1p4duCMNtGrh08C0GbFAXQdJWboGeTYFIpkIbGXfsbn99rWwmLFInwGcsqNrA_0UlJGb3QOOGxF8o783yERaQC_x3ZwkchN-kMrrA0hJFeW9gwjw5mKTsYXqK14zYfIlHc7xznzH-qfJGX1UZXnuv1TaqWjO6wORgQoB1Dgjtjou7/78MKSsDml89eS3XiG0SmI4lwS-Lt_FtCzt1RLAiEkos",
                "filename": "0034043333301020004542958.pdf",
                "size": 3849,
                "type": "application/pdf",
                "thumbnails": {
                    "small": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/1vZhQPhwGqw84RCI88pC-Q/RRAGqGb9G3lButVVstwi_fg7rc27EMgjsJ7D7wSHWw0EMBgKyW3NzTCCk86bX7TP8q6db67bjmElUBrrDpk-6lLTJ9zniX3R1JO1BItjkJeLX3vNB9nUfkqxTwA4I1u6A60CAQNN6QkAmIuoULsjbQ/TRLEVjltSvEDokL5i1C-QbHhX7rdlURYB5hsjzgNuQQ",
                        "width": 19,
                        "height": 36
                    },
                    "large": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/rM9yWisQgDASlmodK9wE8g/6We4oIacdeoMX0c7HdaG4IXaFzCn4u0KoykWPE23ZqQ6CkXg8oXvmWEOrhoOptamh2py8Nz59jcxxN9d5UPylDDVtO13_bCy2v5Ha1xPsIfiKToy2NnLOpfBtAoL_eC3twGCCllmlu-EwzgIQnWvNA/AtE61jwUq8HKBHDdPfS7saB7mWeMtISjBkwaDX1DFLE",
                        "width": 512,
                        "height": 990
                    }
                }
            }
        ],
        "shipDate": "2024-08-20",
        "Status": "Nicht verschickt",
        "Bestellung": "9261",
        "Empfänger name1": "Customer Name 5",
        "Produkte": "2 x MMEC-1000-E-Bohne\n2 x MMEC-500-E-Siebt\n",
        "id": "recHhbNF2qb4xapbB",
        "createdTime": "2024-08-20T13:55:34.000Z",
        "__IMTLENGTH__": 6,
        "__IMTINDEX__": 5
    },
    {
        "PDF Label": [
            {
                "id": "attWX6EKPpQEU4W1Y",
                "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/gZ1ZWUGmJSd1vfV51mmtlQ/ZgItfKJ2XVpi_Kocm2XY-PVLUvPX-52hKnKjTSSXzE-ZDNkyLyvLogCjOKfHDpCcPpCuYFcvh4-JGnLhkV0xUgwoN4Sea6TLLaaY57gV0CXrI2ahVTM9z32WFO9XwBBDSFDqHs-UxQ4uwxC6xQYJ59Z2mPE8LvCVTtFpkkZdEHdvW0qFh_6IlPiqu-ZlT1IK/K6HujUxwdNCkdYPR3rSiKpA66KqsNohNBhnUxHvxWUc",
                "filename": "0034043333301020004543391.pdf",
                "size": 3840,
                "type": "application/pdf",
                "thumbnails": {
                    "small": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/IDXDx9b1g3jXBcwHs-0Gog/jvMW3rOy27E8snCHgMJxJFw1FgfqhbW-VuSqq3pQVREh6mwfQgkEeloSCFznmkyCoH1i-BCwzibS0azbgps9QVcutsJHnx6d6qSYMHRZm_CyecshSBBsE_SkSnfwLL3A713zVoiTuLWnyl3Le0bggg/ic2p6W10k-gfL3luCb3tgNDzAgkdCW2SRD-rgSTs--8",
                        "width": 19,
                        "height": 36
                    },
                    "large": {
                        "url": "https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/gZ-Bl0b76ksawKuIwTke2w/HfT7piu92f9c6E3cn2zAIsvMGBfyEpZEylURCwjvz7g3wg8mGnrxrunyb9og4BxNUK3OzSUMvH4H4HeUHd5S44XahbZfIIJyc5lxog9eYlnjCaIs_nfoB66Bt7zQqi-2SDmfUQYc0VhjW8VjDZjo6w/lAo3y0uYBSSzHa12sx25xc4tzQc3uEEnL92o0IhZQak",
                        "width": 512,
                        "height": 990
                    }
                }
            }
        ],
        "shipDate": "2024-08-20",
        "Status": "Nicht verschickt",
        "Bestellung": "9262",
        "Empfänger name1": "Customer Name 6",
        "Produkte": "2 x MME-1000-E-Bohne\n2 x MMEC-1000-E-Bohne\n",
        "id": "recCLKxIF6aF7bCy6",
        "createdTime": "2024-08-20T16:07:39.000Z",
        "__IMTLENGTH__": 6,
        "__IMTINDEX__": 6
    }
]

Yup, you don’t need aggregate to JSON.

You’ll need a minimum of one module:

1. Aggregate to Text

2. In your PDF.co module, insert this orders wrapper

{ "orders": [{{1.text}}] }

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

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":208,"module":"json:ParseJSON","version":1,"parameters":{"type":""},"mapper":{"json":"[{\"PDF Label\":[{\"id\":\"attDadY2UsgeOflw8\",\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/2kwHbgiZZ7Zl8X8UlfRwqg/QWjSTcMys_fpQWjP1FkKvRsGtnNFWGUObduILF05v7zW0n-Q0KurgMc3p6h77a2vXCEwRTd3CzR00t0DREThWGZPGmggg8B3YV23jV6WkPre5G3JQAFAPG_rPCNbPU72PFAKjypws4YEwngbN9Jl_9MlWD5GfsADZ2hgX9t8QsPPHFQk2Cg8wHvS1IHHYQGo/h3OaDFDFn5y-8phvqlc17FBZcv1iS8dZAyDFLWPJJho\",\"filename\":\"0034043333301020004542620.pdf\",\"size\":3873,\"type\":\"application/pdf\",\"thumbnails\":{\"small\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/Ii2zD52Wafd-7oXukL-N0A/QGAhSZElq6pGvqWnoG0GC6azkB4skwqAYMRY4H6d2QCJuXxCrS7DLa_ZS8v5ZOW9V0MG7qJpKl3d7e3Bq40VohjI74XlUyYA3U-HhzG21MHz5F5lDkWwR2S_xPUJ5T_gOTAbh0qa3ABWfFMwB8pfew/Cx9cdHZJO5FlvCGIMw5TOcerO-gU6Cqn1I200t4rUYA\",\"width\":19,\"height\":36},\"large\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/2X-JovWemi2BD5OIyXtWew/TJcMObmw_i6JjCz5ZYhMWbEe8mppsGZspeqpQ-o2zPdlI-_q8U_TWqNr01OntmMP70U61-K45eCMTxiq3HI2BtXOMSVrjoqI9HmQ8m0sEBZbIbb8KEj9ME14X5aTSW6A5THb7rBqqUXLU4tdUj8dKg/73UEpRyflbgvMrkEoDM9U6tBRMAt0xYTZHQF4rloDts\",\"width\":512,\"height\":990}}}],\"shipDate\":\"2024-08-18\",\"Status\":\"Nicht verschickt\",\"Bestellung\":\"9218\",\"Empfänger name1\":\"Customer Name 1\",\"Produkte\":\"1 x KK-250-E-Bohne\\n1 x IT-250-E-Bohne\\n\",\"id\":\"recBM1PIl9ZHK5tyE\",\"createdTime\":\"2024-08-20T07:42:54.000Z\",\"__IMTLENGTH__\":6,\"__IMTINDEX__\":1},{\"PDF Label\":[{\"id\":\"attnMyPSuBUp3Zxgs\",\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/Q461-BfZIIxooDNBP4Jn_g/FDqr2lqlvbwBRGgWZPTQv-n28UsC82DQN8d_C9wWxIjM5PXKWT3Sk03sYbFq-XwBxDreRED1Q2ZpjEgI7ilhVYGXkBTguGTVYL2VIZJfwvTBtB7XFcJOIqvCTCEOGVQKfYmqSkxbMNZur1KyTZCXsINGVJZ6bxbC4SgMgK3Jt1xNAOo5B64Kcy6SpUfiPBks/rDQmOFvggT3fb69KiEj9b76ex7_8D3LFESN7IG5-nrY\",\"filename\":\"0034043333301020004539778.pdf\",\"size\":3852,\"type\":\"application/pdf\",\"thumbnails\":{\"small\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/DYTQzyovT5dCGTqU_4x-oA/fHj6TTfBMrdm5beSlDZRnx8gFEfHjz5Iik6RDleU4XNEwzBLBCiH0LR7DG5qM5rPmU5DLbOASKBOyBIXLtFlav99stSjH7gZhsDorlFLuVDJ8c0yAq3X1Mx0B2fCw-UGlXKzi5niwmaiyqDGoVRFhg/zzlc4mLCUTDShP0kzhRm6sqnOlCfOL5SSKqI0_Wqwnk\",\"width\":19,\"height\":36},\"large\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/YFUGiPoMFdPhZrhjX82Tpw/up6zAV66OHzCgXNGHq7Xid7sdLs_AGQ2H2Z4WdBr9aFnFH_MdCV19Ud_BrACXO4X_OQ_zAcXH9JpBo8EzjeicMNp7gsTo_tIP8KQpery8pwlO8cx_MH8C-oK9D55Q4pRlxic5g_aBQWzAcDhFfT5aA/cMx20ffB6HTnJau7WchhIidNG0WfAPq5ILFijvRprPI\",\"width\":512,\"height\":990}}}],\"shipDate\":\"2024-08-20\",\"Status\":\"Nicht verschickt\",\"Bestellung\":\"9257\",\"Empfänger name1\":\"Customer Name 2\",\"Produkte\":\"1 x RAS-250-K-Bohne\\n\",\"id\":\"recuHZ8IhghEMrqnl\",\"createdTime\":\"2024-08-20T07:53:32.000Z\",\"__IMTLENGTH__\":6,\"__IMTINDEX__\":2},{\"PDF Label\":[{\"id\":\"attmFciOLKJPz1sk0\",\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/zrg598lVtntY2j6xbsBiPA/v8sJzqE6JIviKLgKjQxAPbLGZUaKMosLVH4LA23Kf9jjbnUREh4Tbbi-DuTVs2vVxWp2B65YcMda5AWeSuwbkF2NaatCkXBh-sVUFyjU61zmM8h3YJVe2HBn3WheO8YwbN3YqPwZbXVkY0lmjnfP3na6zHEtJEY10iPmd2ky8xE23Wm_dcy7RJb_YNODsgRy/7gs6wC3SjkYGnsq5lYo_TOCC2EZEgwICil9N4q7-LyA\",\"filename\":\"0034043333301020004541250.pdf\",\"size\":3838,\"type\":\"application/pdf\",\"thumbnails\":{\"small\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/TIv10XGN4E_NfIKWjdpGUA/wOUP1gtoM7LSOmEJiKsxvHqhn5YDU-gooDCKJ3f9kM2Bp16e5xpW1p1DDgqE7LmbuhvWcHeQhlZ6noYPl7-VbgotPo2MhPn7ncBFFjsgWGWrKYnrIQaLSfQwnlq9wZb_UVnXw9FddMzhymEpSNLrUA/elxdgJxHpfW1hDn7fsiVzq6xDj403bxQzHs5ZxGvkoU\",\"width\":19,\"height\":36},\"large\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/nptlC1XZHcuBLHkzvLdHTw/46nSNg7yx9PqJQIFjWF0zPCaQ7QZZKYDw5CVMBNOEnzJHTuN606DwOEWEiWJ79i8le24Yc9utFRKgfXIFN7zPx-dFZATlbCz8gbgj4c_DjUrevHmErt3VCiV8zVvw-xUMGaOIKa_DvoPW6NMLo4U0A/QptYUeUOmV6r4yhTE_Zh9xgPKPezhm6tXhkr5MIHpjc\",\"width\":512,\"height\":990}}}],\"shipDate\":\"2024-08-20\",\"Status\":\"Nicht verschickt\",\"Bestellung\":\"9258\",\"Empfänger name1\":\"Customer Name 3\",\"Produkte\":\"1 x AES-500-E-Bohne\\n1 x TK-500-E-Bohne\\n\",\"id\":\"recMRggSOuQV5VnjE\",\"createdTime\":\"2024-08-20T10:09:13.000Z\",\"__IMTLENGTH__\":6,\"__IMTINDEX__\":3},{\"PDF Label\":[{\"id\":\"attriStM22MYQVqi8\",\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/9h5bYj0zhDkjoO2Bnzvmfg/o9hyG6ITFjUIGe6h8SLOS3ERVXVatquB0wmGscaroSDyI7hziIuHGRufGS5ST7bKGk-zDwYSIHK2nkFP5uEm32MI-rHchYlehXNIsYhl4K4doTtMqoLrsIrfhJ5kxggsXp-IFNcZKJFN8W6QQ2W5RKWGdgPgU_jgWWSD9r6eWhxV2kFQ7VUwsMAb1qJbpU5h/nRHfFK-R5PzTbJxgRN-LuBYNpdjEh6PZvewHjD4CTPc\",\"filename\":\"0034043333301020004541269.pdf\",\"size\":3853,\"type\":\"application/pdf\",\"thumbnails\":{\"small\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/RUY3ei7JZ1UvuqjCiE8vqw/dlAVpuVpMGniGUcmz3qk4nEctGIKP1XqbmG3m_MrZKxHatKIMRLuq8AHFk-6Cf4mxTO-hAMzOYgMAVByOfUf2QfaUxX6ppov_ZZZ9XOz9ZejGIpKqu5KLKcwUudyUwVKGY_m9yV4WhshUgMvlU7H0A/VNYiWrpG06BoAiqROU7sf4eo9xk9I4dUf4ev8JzIpzg\",\"width\":19,\"height\":36},\"large\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/arsXaZmOJlDafp8bgyYLTw/I-mvnvSYjOXRdwWaXkCoHI0E1C8tnvXmbN-ykNzWvFXKyd6kpRlFJLZV_uGiJy88rEHTaO4UsLiwRCZleCYA1azqXY7tZKK_zLNUa1sBP_-JwYfV2braIvq72ynYRPTAATD3Wau616nd927yW6J89Q/w2Po2jyA_efnaC4yYyXrjqYpoZGCbyS5rfYDbhU-W3s\",\"width\":512,\"height\":990}}}],\"shipDate\":\"2024-08-20\",\"Status\":\"Nicht verschickt\",\"Bestellung\":\"9259\",\"Empfänger name1\":\"Customer Name 4\",\"Produkte\":\"1 x NT-1000-K-Bohne\\n1 x HB-1000-K-Bohne\\n\",\"id\":\"rec7uzjgSUGEH3C7j\",\"createdTime\":\"2024-08-20T10:16:35.000Z\",\"__IMTLENGTH__\":6,\"__IMTINDEX__\":4},{\"PDF Label\":[{\"id\":\"atteFNJiwCiIJIJpT\",\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/zJKxLwM9c7mb8ojL1GewFQ/nw-0lYgfPo3qLyv_6NP1p4duCMNtGrh08C0GbFAXQdJWboGeTYFIpkIbGXfsbn99rWwmLFInwGcsqNrA_0UlJGb3QOOGxF8o783yERaQC_x3ZwkchN-kMrrA0hJFeW9gwjw5mKTsYXqK14zYfIlHc7xznzH-qfJGX1UZXnuv1TaqWjO6wORgQoB1Dgjtjou7/78MKSsDml89eS3XiG0SmI4lwS-Lt_FtCzt1RLAiEkos\",\"filename\":\"0034043333301020004542958.pdf\",\"size\":3849,\"type\":\"application/pdf\",\"thumbnails\":{\"small\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/1vZhQPhwGqw84RCI88pC-Q/RRAGqGb9G3lButVVstwi_fg7rc27EMgjsJ7D7wSHWw0EMBgKyW3NzTCCk86bX7TP8q6db67bjmElUBrrDpk-6lLTJ9zniX3R1JO1BItjkJeLX3vNB9nUfkqxTwA4I1u6A60CAQNN6QkAmIuoULsjbQ/TRLEVjltSvEDokL5i1C-QbHhX7rdlURYB5hsjzgNuQQ\",\"width\":19,\"height\":36},\"large\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/rM9yWisQgDASlmodK9wE8g/6We4oIacdeoMX0c7HdaG4IXaFzCn4u0KoykWPE23ZqQ6CkXg8oXvmWEOrhoOptamh2py8Nz59jcxxN9d5UPylDDVtO13_bCy2v5Ha1xPsIfiKToy2NnLOpfBtAoL_eC3twGCCllmlu-EwzgIQnWvNA/AtE61jwUq8HKBHDdPfS7saB7mWeMtISjBkwaDX1DFLE\",\"width\":512,\"height\":990}}}],\"shipDate\":\"2024-08-20\",\"Status\":\"Nicht verschickt\",\"Bestellung\":\"9261\",\"Empfänger name1\":\"Customer Name 5\",\"Produkte\":\"2 x MMEC-1000-E-Bohne\\n2 x MMEC-500-E-Siebt\\n\",\"id\":\"recHhbNF2qb4xapbB\",\"createdTime\":\"2024-08-20T13:55:34.000Z\",\"__IMTLENGTH__\":6,\"__IMTINDEX__\":5},{\"PDF Label\":[{\"id\":\"attWX6EKPpQEU4W1Y\",\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/gZ1ZWUGmJSd1vfV51mmtlQ/ZgItfKJ2XVpi_Kocm2XY-PVLUvPX-52hKnKjTSSXzE-ZDNkyLyvLogCjOKfHDpCcPpCuYFcvh4-JGnLhkV0xUgwoN4Sea6TLLaaY57gV0CXrI2ahVTM9z32WFO9XwBBDSFDqHs-UxQ4uwxC6xQYJ59Z2mPE8LvCVTtFpkkZdEHdvW0qFh_6IlPiqu-ZlT1IK/K6HujUxwdNCkdYPR3rSiKpA66KqsNohNBhnUxHvxWUc\",\"filename\":\"0034043333301020004543391.pdf\",\"size\":3840,\"type\":\"application/pdf\",\"thumbnails\":{\"small\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/IDXDx9b1g3jXBcwHs-0Gog/jvMW3rOy27E8snCHgMJxJFw1FgfqhbW-VuSqq3pQVREh6mwfQgkEeloSCFznmkyCoH1i-BCwzibS0azbgps9QVcutsJHnx6d6qSYMHRZm_CyecshSBBsE_SkSnfwLL3A713zVoiTuLWnyl3Le0bggg/ic2p6W10k-gfL3luCb3tgNDzAgkdCW2SRD-rgSTs--8\",\"width\":19,\"height\":36},\"large\":{\"url\":\"https://v5.airtableusercontent.com/v3/u/32/32/1724184000000/gZ-Bl0b76ksawKuIwTke2w/HfT7piu92f9c6E3cn2zAIsvMGBfyEpZEylURCwjvz7g3wg8mGnrxrunyb9og4BxNUK3OzSUMvH4H4HeUHd5S44XahbZfIIJyc5lxog9eYlnjCaIs_nfoB66Bt7zQqi-2SDmfUQYc0VhjW8VjDZjo6w/lAo3y0uYBSSzHa12sx25xc4tzQc3uEEnL92o0IhZQak\",\"width\":512,\"height\":990}}}],\"shipDate\":\"2024-08-20\",\"Status\":\"Nicht verschickt\",\"Bestellung\":\"9262\",\"Empfänger name1\":\"Customer Name 6\",\"Produkte\":\"2 x MME-1000-E-Bohne\\n2 x MMEC-1000-E-Bohne\\n\",\"id\":\"recCLKxIF6aF7bCy6\",\"createdTime\":\"2024-08-20T16:07:39.000Z\",\"__IMTLENGTH__\":6,\"__IMTINDEX__\":6}]"},"metadata":{"designer":{"x":3,"y":-1242,"name":"Airtable example (delete)"},"parameters":[{"name":"type","type":"udt","label":"Data structure"}]}},{"id":209,"module":"util:TextAggregator","version":1,"parameters":{"rowSeparator":"other","otherRowSeparator":",","feeder":208},"mapper":{"value":"{\n  \"name\": \"{{208.`Empfänger name1`}}\",\n  \"products\": \"{{replace(208.Produkte; \"/\\s*\\n\\s*/g\"; \"\\n\")}}\",\n  \"ordernumber\": \"{{208.Bestellung}}\"\n}"},"metadata":{"designer":{"x":305,"y":-1241,"name":"Build Orders Array Items"},"parameters":[{"name":"rowSeparator","type":"select","label":"Row separator","validate":{"enum":["\n","\t","other"]}},{"name":"otherRowSeparator","type":"text","label":"Separator"}],"advanced":true}},{"id":210,"module":"util:SetVariable2","version":1,"parameters":{},"mapper":{"name":"any module field","scope":"roundtrip","value":"{ \"orders\": [{{209.text}}] }"},"metadata":{"designer":{"x":601,"y":-1243,"name":"Replace with PDF.co"}}}]}],"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.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

2 Likes

That’s great. Thank you so much @samliew! This solution worked well.

I still find it a bit strange that the JSON export from the Aggregator was not working. Maybe Make’s dev team would like to consider a “simple JSON format” as an additional option in this module.

Up until yesterday, I didn’t even know that something like a “simple version of JSON” exists :wink:

1 Like