Create a google contact from multiple text parsers

can anyone suggest which flow I need to use to bring the text parsers together into google contacts?

image

so the AI tells me to extract each line I need, below is a sample, then it needs to build a contact based on those extractions, but I can’t figure out how to connnect them to google contacts

Name & Surname: Gabriela Agis
Phone Number: 728060270
Email Address: gaby.agis@hotmail.com
Select a branch: Randburg
Car Details: test car2

You could probably use a single text parser module, and delete the router.

If you need further assistance, please provide the following:

  • Screenshot of example text as shown in the output of the previous module (before the router).

  • Formatted example text (to ensure the forum did not change the formatting above)

1. This forum might have or already changed your text

When pasting text into this forum, you should format the example text using the rich-text editor, otherwise the forum software might modify the displayed text, and you might get incorrect answers from others because of it.

Some things this forum software might do to mangle your text:

– remove extra spaces (which may be necessary)
– convert links to titles (when copied is incorrect)
– incorrect joined links
– convert single and double quotes to smart angled quotes ()
– emojis
– etc.

This interferes with you receiving correct answers, because it:

– makes JSON invalid (you can verify when copy-paste into https://jsonformatter.org)
– makes incorrect text examples when we need to build a pattern for text parsing

2. To prevent this in future, please format text in code blocks

A. Type code fence manually
Either add three backticks ``` before and after the text, like this:

```
content goes here
```

so that it appears like this

content goes here

B. Highlight and click the format button
Or use the format code button in the editor:
Screenshot_2023-10-02_191027

3. You might need to re-copy the original text

Once the post has been submitted, it’s too late to format it since it’s already butchered, and you need to make a re-copy of the text, and format it before submitting the forum post.

Please let us know once you have corrected the issue. This will avoid others potentially providing wrong answers based on incorrect text in your question.

Thank you!

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

but it says you need to do 1 text parser per extraction you want? I can’t see a way to extract 4 peices of information in 1 parser? unless I am using the wrong parser

Who says?

If you need further assistance, please provide the following:

  • Screenshot of example text as shown in the output of the previous module (before the router).
  • Formatted example text (to ensure the forum did not change the formatting above)

samliewrequest private consultation

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

example text was in the first reply, so this is in the body of the email, this is in the body of the email, which I am trying to extract then create a google contact

" Name & Surname: Gabriela Agis
Phone Number: 728060270
Email Address: gaby.agis@hotmail.com
Select a branch: Randburg
Car Details: test car2

or take a picture of your vin number:


Date: 25 June 2024
Time: 8:38 am
Page URL: https://fangioauto.co.za/
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Remote IP: 197.245.39.93
Powered by: Elementor"

Welcome to the Make community!

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

Name & Surname: (?<name>.+)\nPhone Number: (?<phone>.+)\nEmail Address: (?<email>.+)\nSelect a branch: (?<branch>.+)\nCar Details: (?<details>.+)

Proof

https://regex101.com/r/vvBi6c

Important Info

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

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!

samliewrequest 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.

View Module Export Code

JSON

{
    "subflows": [
        {
            "flow": [
                {
                    "id": 12,
                    "module": "regexp:Parser",
                    "version": 1,
                    "parameters": {
                        "pattern": "Name & Surname: (?<name>.+)\\nPhone Number: (?<phone>.+)\\nEmail Address: (?<email>.+)\\nSelect a branch: (?<branch>.+)\\nCar Details: (?<details>.+)",
                        "global": false,
                        "sensitive": true,
                        "multiline": false,
                        "singleline": false,
                        "continueWhenNoRes": false
                    },
                    "mapper": {
                        "text": "{{11.value}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 249,
                            "y": -786,
                            "messages": [
                                {
                                    "category": "last",
                                    "severity": "warning",
                                    "message": "A transformer should not be the last module in the route."
                                }
                            ]
                        },
                        "restore": {},
                        "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
                            }
                        ],
                        "expect": [
                            {
                                "name": "text",
                                "type": "text",
                                "label": "Text"
                            }
                        ],
                        "interface": [
                            {
                                "type": "text",
                                "name": "name",
                                "label": "name"
                            },
                            {
                                "type": "text",
                                "name": "phone",
                                "label": "phone"
                            },
                            {
                                "type": "text",
                                "name": "email",
                                "label": "email"
                            },
                            {
                                "type": "text",
                                "name": "branch",
                                "label": "branch"
                            },
                            {
                                "type": "text",
                                "name": "details",
                                "label": "details"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

samliewrequest private consultation

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

1 Like

this was EXACTLY what I wanted it works beautifully! but I didn’t learn anything, is there a resource where I can learn on how to build what you provided? just in case I would like to record extra details? or maybe chat GPT can help me build it

your reply resolved my query thank you so much

Yes, I provided information on the Text Parser module above.

You can also go through the Make Academy, I’m not sure whether there’s a module on regular expression patterns, but there’s some more info in the Help Center.

An advanced use of regular expressions, is you can create an “inverse” pattern, so that you can use the built-in replace function to “remove” everything we don’t want, so we can save an operation!

Do Google for some regular expression tutorials on the internet, and keep practicing!

samliewrequest private consultation

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

1 Like

Hi @Gabriela_A

You can apply Regex for multiple extractions in single module as shown below. Operations are very important and hence the scenarios should be optimized.

Name: (.)\nCompany:(.)\nTask:(.)\nClients: (.)\n

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support | Book Live Implementation
Visit us here
Youtube Channel

2 Likes