Email input into spreadsheet

Hi Everybody.
I would like to automate some procedures in my business. My main point of contact is a form that people fill out. The form then sends an email to my Gmail account. Some of the fields can vary, some are the same and some are free text. (see attachment)

Is there a way to get the text into different cells in a row in google sheets?

Hey @Ferris,

You can try to use ChatGpt module along with a Parse JSON to accomplish this task,
Below is an example :
image

You are free to optimize the GPT prompt as per your use case. Then, in the output of the JSON module you will have different variables that you can use to map in Google Sheets module.

Let me know if you still face any issues.

Welcome to the Make community!

When reaching out for assistance with your regex pattern for a Text Parser module, it would be super helpful if you could share the actual text you’re trying to match. Screenshots of text can be a bit tricky, so if you could copy and paste the text directly here, that would be awesome! It ensures we can run it against test patterns effectively. If there’s any sensitive info, feel free to change it to something fictional yet still valid by keeping the format intact.

Providing clear text examples saves time on both ends and helps us give you the best possible solution. Without proper examples, we might end up playing a guessing game, and nobody wants that as it is a waste of time! You are more likely to get a correct answer faster. So, help us help you by sharing those text snippets. Thanks a bunch!

samliew – request private consultation

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

1 Like

Hi Samliew
Thanks for helping out. I’m not totally sure, that this is what you’re looking for, but I’ve copy-pasted the text content here, is this what you need:

Text content:

Elguitar : Elguitar
Akustisk_Guitar : Akustisk Guitar
Begge_dele : Begge dele
Jeg_er_hel_ny_pĂĄ_guitar : Jeg er hel ny pĂĄ guitar
1-5_ĂĄr : 1-5 ĂĄr
Over_5_ĂĄr : Over 5 ĂĄr
Generelt_bare_lære_at_spille : Generelt bare lære at spille
At_lære_at_spille_sammen_med_andre : At spille sammen med andre
At_spille_mine_yndlingssange : At spille mine yndlingssange
At_spille_og_synge_samtidigt : At spille og synge samtidigt
At_lære_at_spille_solo : At lære at spille solo
Andet : Andet
Min_guitarsituation : asdfasdf
Navn : Name
Alder : 456
Email : Email@email.com
Telefonnummer : 00000000
Hvordan_har_du_fundet_Bredballe_Guitarskoles_Hjemmeside? : Flyer

Hi AnujP
Thanks for helping out. Can you tell me what operation you use in chat GPT?

Welcome to the Make community!

You can use a Text Parser “Match Pattern” module with this Pattern (regular expression):

(?<key>.+) : (?<value>.+?)\s*(?:\n|$)

Proof

https://regex101.com/r/wC6elA/1

Important Info

  • :warning: Global match must be set to YES!

Screenshot

Screenshot_20240704_115808

Output


For more information, see Text Parser in the Make Help Center:

Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.

Hope this helps!

samliew – request private consultation

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

Then, to get all of them into variables,

1. Aggregate to Array

Select key and value here:

2. Convert to Collection (optional, but recommended)

Output

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

{
    "subflows": [
        {
            "flow": [
                {
                    "id": 59,
                    "module": "util:ComposeTransformer",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "value": "Elguitar : Elguitar \nAkustisk_Guitar : Akustisk Guitar \nBegge_dele : Begge dele \nJeg_er_hel_ny_på_guitar : Jeg er hel ny på guitar \n1-5_år : 1-5 år \nOver_5_år : Over 5 år \nGenerelt_bare_lære_at_spille : Generelt bare lære at spille \nAt_lære_at_spille_sammen_med_andre : At spille sammen med andre \nAt_spille_mine_yndlingssange : At spille mine yndlingssange \nAt_spille_og_synge_samtidigt : At spille og synge samtidigt \nAt_lære_at_spille_solo : At lære at spille solo \nAndet : Andet \nMin_guitarsituation : asdfasdf \nNavn : Name \nAlder : 456 \nEmail : Email@email.com \nTelefonnummer : 00000000 \nHvordan_har_du_fundet_Bredballe_Guitarskoles_Hjemmeside? : Flyer"
                    },
                    "metadata": {
                        "designer": {
                            "x": 13,
                            "y": -1351
                        },
                        "restore": {},
                        "expect": [
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Text"
                            }
                        ]
                    }
                },
                {
                    "id": 60,
                    "module": "regexp:Parser",
                    "version": 1,
                    "parameters": {
                        "pattern": "(?<key>.+) : (?<value>.+?)\\s*(?:\\n|$)",
                        "global": true,
                        "sensitive": true,
                        "multiline": false,
                        "singleline": false,
                        "continueWhenNoRes": false,
                        "ignoreInfiniteLoopsWhenGlobal": false
                    },
                    "mapper": {
                        "text": "{{59.value}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 262,
                            "y": -1348
                        },
                        "restore": {
                            "parameters": {
                                "sensitive": {
                                    "collapsed": true
                                },
                                "multiline": {
                                    "collapsed": true
                                },
                                "singleline": {
                                    "collapsed": true
                                },
                                "continueWhenNoRes": {
                                    "collapsed": true
                                }
                            }
                        },
                        "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
                            }
                        ],
                        "expect": [
                            {
                                "name": "text",
                                "type": "text",
                                "label": "Text"
                            }
                        ],
                        "interface": [
                            {
                                "type": "text",
                                "name": "key",
                                "label": "key"
                            },
                            {
                                "type": "text",
                                "name": "value",
                                "label": "value"
                            },
                            {
                                "type": "uinteger",
                                "name": "i",
                                "label": "i"
                            },
                            {
                                "type": "any",
                                "name": "__IMTMATCH__",
                                "label": "Fallback Match"
                            }
                        ]
                    }
                },
                {
                    "id": 61,
                    "module": "builtin:BasicAggregator",
                    "version": 1,
                    "parameters": {
                        "feeder": 60
                    },
                    "mapper": {
                        "key": "{{60.key}}",
                        "value": "{{60.value}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 510,
                            "y": -1348
                        },
                        "restore": {
                            "extra": {
                                "feeder": {
                                    "label": "Text parser - Match pattern [60]"
                                },
                                "target": {
                                    "label": "Custom"
                                }
                            }
                        }
                    }
                },
                {
                    "id": 62,
                    "module": "util:SetVariable2",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "name": "variables",
                        "scope": "roundtrip",
                        "value": "{{toCollection(61.array; \"key\"; \"value\")}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 752,
                            "y": -1352
                        },
                        "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": "variables",
                                "label": "variables",
                                "type": "any"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

samliew – request private consultation

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

1 Like

Damn Samliew, thank you so much for the extensive help!

No problem, glad I could help!

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

4. Do join the unofficial Make Discord server for live chat and video assistance

samliew – request private consultation

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