How can I split an enumeration?

Hello everyone,

I have table 1 with 5 columns in airtable
In table 2 I have a column with a task for ChatGPT.
For example, ChatGPT should create a table with 3 entries:

This is the output vrom ChatGPT:

column 1 | column 2 | column 3 | column 4 | column 5
column 1 | column 2 | column 3 | column 4 | column 5
column 1 | column 2 | column 3 | column 4 | column 5

How is the best way to transfer this table from ChatGpt to Airtable?

Sorry vor my English

LG Philipp

Are you trying to create 5 records in Airtale? If so, you probably could do it with a combination of the split() function and Text Parser. But Iā€™m not entirely clear on what you want.

L

1 Like

Hi @Philipp_Kapahnke

Please check the solution here.

Regards,
Msquare Automation - Gold Partner of Make

Free Consultation | Live Implementation

Visit us here | Youtube Channel

1 Like

Welcome to the Make community!

1. You can split by rows first

Screenshot_2024-07-15_090711

2. Then you can split by cells

Screenshot_2024-07-15_090753

Output

samliew ā€“ request private consultation

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

1 Like

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.

Click to Expand Module Export Code

JSON - Copy and Paste this directly in the scenario editor

{
    "subflows": [
        {
            "flow": [
                {
                    "id": 125,
                    "module": "util:ComposeTransformer",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "value": "column 1 | column 2 | column 3 | column 4 | column 5\ncolumn 1 | column 2 | column 3 | column 4 | column 5\ncolumn 1 | column 2 | column 3 | column 4 | column 5"
                    },
                    "metadata": {
                        "designer": {
                            "x": 1224,
                            "y": -1521
                        },
                        "restore": {},
                        "expect": [
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Text"
                            }
                        ]
                    }
                },
                {
                    "id": 126,
                    "module": "builtin:BasicFeeder",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "array": "{{split(125.value; newline)}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 1471,
                            "y": -1517,
                            "name": "Split Rows"
                        },
                        "restore": {
                            "expect": {
                                "array": {
                                    "mode": "edit"
                                }
                            }
                        },
                        "expect": [
                            {
                                "name": "array",
                                "type": "array",
                                "label": "Array",
                                "mode": "edit",
                                "spec": []
                            }
                        ]
                    }
                },
                {
                    "id": 128,
                    "module": "util:SetVariable2",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "name": "cells",
                        "scope": "roundtrip",
                        "value": "{{split(126.value; space + \"|\" + space)}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 1715,
                            "y": -1516,
                            "name": "Split Cells"
                        },
                        "restore": {
                            "expect": {
                                "scope": {
                                    "label": "One cycle"
                                }
                            }
                        },
                        "expect": [
                            {
                                "name": "name",
                                "type": "text",
                                "label": "Variable name",
                                "required": true
                            },
                            {
                                "name": "scope",
                                "type": "select",
                                "label": "Variable lifetime",
                                "required": true,
                                "validate": {
                                    "enum": [
                                        "roundtrip",
                                        "execution"
                                    ]
                                }
                            },
                            {
                                "name": "value",
                                "type": "any",
                                "label": "Variable value"
                            }
                        ],
                        "interface": [
                            {
                                "name": "cells",
                                "label": "cells",
                                "type": "any"
                            }
                        ]
                    }
                },
                {
                    "id": 129,
                    "module": "google-sheets:addRow",
                    "version": 2,
                    "metadata": {
                        "designer": {
                            "x": 1959,
                            "y": -1515,
                            "messages": [
                                {
                                    "category": "setup",
                                    "severity": "error",
                                    "message": "Value must not be empty."
                                }
                            ]
                        }
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

samliew ā€“ request private consultation

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

1 Like