Data structure manipulation

My goal:
Is to get resources to learn how to manipulate data structure in Make.com. Getting multiple database entries into a single paragraph or the reverse. Parsing a paragraph and created multiple variables to put into a database. That kind of thing.

Example Use case:
ChatGPT response (comes in as a string text block) > Parse (cut up into pieces) > (something) > Update multiple Notion database entries.

What I’ve tried:
I have taken vanilla code courses so i understand objects, JSON, arrays ect. I’ve watched several Make.com series and tried AI. None of which do a very good job describing how to manipulate data. Correct use of aggregators, iterators, variables, multiple variables. They focus on modules or beginning understanding of code but not connecting the concepts.

Where I am currently:
I have a test scenario. I have a block of text in a Google doc and I’ve marked data I want with variables using ##.
Google Doc data:
##Name##
Mad Max
##Type##
News
Next is a parser that grabs that info and is working.
[
{
“i”: 1,
“$1”: “Name”,
“$2”: “Mad Max\r\n”
},
{
“i”: 2,
“$1”: “Type”,
“$2”: “News\r\n”
},
From here I see…
image
In that image you can see I have an output but I’m not sure how I can get all the data in their own variables that I can then use later globally in a scenario to update my Notion database. I figure a “set multiple variable” or something but I can’t get anything to work as expected.

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.

Don’t forget to format it, otherwise it becomes invalid when submitted:

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
```

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!

1 Like

Hi @SeanFFW ,

Welcome to Make Community.

We have a solution for you please check the below images and steps.


We believe this is what you are looking for.

If this is the case please follow the below steps.

Step - 1 :-

Use the Text Aggregator after the Match Pattern and map the items as per the above image.

Step - 2 :-

Use a Pharse JSON module and map the output from the Text Aggregator as shown above.

Step - 3 :-

So finally you can map the output like this throughout the scenario.

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

1 Like