How can I get then number of bundles?

blueprint (1).json (64.6 KB)
Hi Team,

I am working on the project attached and I want to get number of bundles by each ID of the conversation but I am a bit lost and I can´t find the way for it. On the below branch I want to get the value of the time, Id and number of bundles for each ID number but I don´t find the way. Any help or idea? Thanks in advance.

Welcome to the Make community!

Could you share some screenshots of what you’re describing? Also

Please provide the output bundles of the 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”.
Screenshot_2023-10-06_141025

A.

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

Uploading them here will look like this:

module-1-input-bundle.txt (12.3 KB)
module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

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.

This will allow others to better assist you. Thanks!

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

1 Like

Sure!!


Here is my project. I want several things:

1.- Order the inputs on my sheet by dates on the top google sheet.
2.- On the below I want to get the bundles for each ID order by date too.

Sorry but when I try to download the output I get a pop up with the output but no way for downloading the file.

image
1_1.txt (2.4 KB)
1_2.txt (1.5 KB)
1_3.txt (1.9 KB)
These are the outputs for this item. For this item the only thing I need is ordered by date.

image
2_1.txt (132 Bytes)
2_2.txt (132 Bytes)
2_3.txt (132 Bytes)
For this, I will need to have for each id the number of bundles ordered by date too.

Thanks in advance.

image
3_1.txt (6.4 KB)
Here u are all. Do you need the output of the google sheets too?

Welcome to the Make community!

Yes, that is possible. You’ll need an aggregator to convert the bundles into an array, before you can use an Iterator module to sort and split them back up into bundles:

Give it a go and let us know if you have any issues!

Module Export

You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.

  1. Copy the JSON code below by clicking the copy button when you mouseover the top-right of the code block
    Screenshot_2024-01-17_200117

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

  3. Click on each imported module and save it for validation. You may be prompted to remap some variables and connections.

View Module Export Code

JSON

{
    "subflows": [
        {
            "flow": [
                {
                    "id": 1,
                    "module": "json:ParseJSON",
                    "version": 1,
                    "parameters": {
                        "type": ""
                    },
                    "mapper": {
                        "json": "[\n  {\n    \"id\": \"b37b0360-a747-4719-8218-54cc3bcb71f0\",\n    \"source\": \"API/Embed\",\n    \"sessionId\": \"b37b0360-a747-4719-8218-54cc3bcb71f0\",\n    \"memoryType\": \"Buffer Window Memory\",\n    \"email\": \"\",\n    \"messages\": [\n      {\n        \"content\": \"Aupi\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:36:18.916Z\"\n      },\n      {\n        \"content\": \"Hello! How can I assist you today?\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:36:19.803Z\"\n      },\n      {\n        \"content\": \"que tal lo llevas?\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:36:23.489Z\"\n      },\n      {\n        \"content\": \"¡Estoy aquí y listo para ayudarte! ¿En qué puedo asistirte hoy?\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:36:24.970Z\"\n      },\n      {\n        \"content\": \"me puedes dar la prevision del tiempo para este fin de semana en Erandio?\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:36:41.723Z\"\n      },\n      {\n        \"content\": \"Aquí tienes la previsión del tiempo para este fin de semana en Erandio:\\n\\n**Sábado:**\\n- **Temperatura:** 19°C (67°F)\\n- **Precipitación:** 40%\\n- **Humedad:** 73%\\n- **Viento:** 18 km/h (11 mph)\\n- **Clima:** Chubascos dispersos\\n\\nSi necesitas más detalles o la previsión para el domingo, házmelo saber.\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:36:47.255Z\",\n        \"usedTools\": [\n          {\n            \"tool\": \"search\",\n            \"toolInput\": {\n              \"input\": \"previsión del tiempo para este fin de semana en Erandio\"\n            },\n            \"toolOutput\": \"{\\\"type\\\":\\\"weather_result\\\",\\\"temperature\\\":\\\"67\\\",\\\"unit\\\":\\\"Fahrenheit\\\",\\\"precipitation\\\":\\\"40%\\\",\\\"humidity\\\":\\\"73%\\\",\\\"wind\\\":\\\"11 mph\\\",\\\"location\\\":\\\"Erandio, Spain\\\",\\\"date\\\":\\\"Saturday\\\",\\\"weather\\\":\\\"Scattered showers\\\"}\"\n          }\n        ],\n        \"feedback\": \"Perfecto con la tool de Serp AI\"\n      },\n      {\n        \"content\": \"Esta todo correcto, gracias\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:37:14.249Z\"\n      },\n      {\n        \"content\": \"¡De nada! Si necesitas algo más, no dudes en decírmelo. ¡Que tengas un buen día!\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:37:15.384Z\"\n      }\n    ]\n  },\n  {\n    \"id\": \"fb39accf-c648-4c36-8263-4dee58bd675e\",\n    \"source\": \"API/Embed\",\n    \"sessionId\": \"fb39accf-c648-4c36-8263-4dee58bd675e\",\n    \"memoryType\": \"Buffer Window Memory\",\n    \"email\": \"\",\n    \"messages\": [\n      {\n        \"content\": \"Buenas de nuevo\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:35:31.895Z\"\n      },\n      {\n        \"content\": \"¡Hola! ¿En qué puedo ayudarte hoy?\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:35:32.909Z\"\n      },\n      {\n        \"content\": \"me puedes decir cuanto es 34545367 x 2435?\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:35:45.530Z\"\n      },\n      {\n        \"content\": \"El resultado de \\\\( 34545367 \\\\times 2435 \\\\) es 84,117,968,645.\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:35:47.351Z\",\n        \"usedTools\": [\n          {\n            \"tool\": \"calculator\",\n            \"toolInput\": {\n              \"input\": \"34545367 * 2435\"\n            },\n            \"toolOutput\": \"84117968645\"\n          }\n        ],\n        \"feedback\": \"Buena respuesta con el tool\"\n      },\n      {\n        \"content\": \"gracias\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:36:07.466Z\"\n      },\n      {\n        \"content\": \"¡De nada! Si necesitas algo más, no dudes en decírmelo.\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:36:08.288Z\"\n      }\n    ]\n  },\n  {\n    \"id\": \"da1db21e-c02d-47a8-bf6a-3d81e90b5a97\",\n    \"source\": \"API/Embed\",\n    \"sessionId\": \"da1db21e-c02d-47a8-bf6a-3d81e90b5a97\",\n    \"memoryType\": \"Buffer Window Memory\",\n    \"email\": \"\",\n    \"messages\": [\n      {\n        \"content\": \"Hola\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:32:06.121Z\"\n      },\n      {\n        \"content\": \"¡Hola! ¿En qué puedo ayudarte hoy?\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:32:07.097Z\"\n      },\n      {\n        \"content\": \"que tal estas hoy?\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:32:12.871Z\"\n      },\n      {\n        \"content\": \"¡Gracias por preguntar! Estoy aquí y listo para ayudarte. ¿En qué puedo asistirte hoy?\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:32:13.754Z\"\n      },\n      {\n        \"content\": \"que tiempo va a hacer hoy en Erandio?\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:32:24.988Z\"\n      },\n      {\n        \"content\": \"Actualmente, no tengo acceso a información en tiempo real, como el clima. Te recomendaría que consultes una aplicación de clima o un sitio web confiable para obtener la información más actualizada sobre el tiempo en Erandio. ¿Hay algo más en lo que pueda ayudarte?\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:32:26.168Z\",\n        \"feedback\": \"La respuesta no ha sido correcta del todo\"\n      },\n      {\n        \"content\": \"de momento no, muchas gracias\",\n        \"role\": \"user\",\n        \"time\": \"2024-05-31T05:32:37.416Z\"\n      },\n      {\n        \"content\": \"¡De nada! Si necesitas ayuda en el futuro, no dudes en preguntar. ¡Que tengas un buen día!\",\n        \"role\": \"bot\",\n        \"time\": \"2024-05-31T05:32:38.649Z\",\n        \"feedback\": \"\"\n      }\n    ]\n  }\n ]"
                    },
                    "metadata": {
                        "designer": {
                            "x": 0,
                            "y": 150
                        },
                        "restore": {
                            "parameters": {
                                "type": {
                                    "label": "Choose a data structure"
                                }
                            }
                        },
                        "parameters": [
                            {
                                "name": "type",
                                "type": "udt",
                                "label": "Data structure"
                            }
                        ],
                        "expect": [
                            {
                                "name": "json",
                                "type": "text",
                                "label": "JSON string",
                                "required": true
                            }
                        ]
                    }
                },
                {
                    "id": 11,
                    "module": "builtin:BasicAggregator",
                    "version": 1,
                    "parameters": {
                        "feeder": 1
                    },
                    "mapper": {
                        "id": "{{1.id}}",
                        "source": "{{1.source}}",
                        "sessionId": "{{1.sessionId}}",
                        "memoryType": "{{1.memoryType}}",
                        "email": "{{1.email}}",
                        "messages": "{{1.messages}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 300,
                            "y": 150
                        },
                        "restore": {
                            "extra": {
                                "feeder": {
                                    "label": "JSON - Parse JSON [1]"
                                },
                                "target": {
                                    "label": "Custom"
                                }
                            }
                        }
                    }
                },
                {
                    "id": 12,
                    "module": "builtin:BasicFeeder",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "array": "{{sort(11.array; \"asc\"; \"messages.1.time\")}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 600,
                            "y": 150
                        },
                        "restore": {
                            "expect": {
                                "array": {
                                    "mode": "edit"
                                }
                            }
                        },
                        "expect": [
                            {
                                "name": "array",
                                "type": "array",
                                "label": "Array",
                                "mode": "edit",
                                "spec": []
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

2 Likes

Thanks a lot for you time!!!

1 Like

Can you share what the spreadsheets are you want to generate for both routes? Specifically the data from the ParseJSON where it goes and how it is ordered?

2 Likes