Collection / JSON into CRM

Hey everyone,

I’m feeling a bit overwhelmed here, probably because of my limited knowledge, so I’d really appreciate any help I can get. Here’s what I’m dealing with: I’m using a Webhook to transfer data in JSON format. This data includes questions and answers from a form. When it arrives in Make, it’s bundled together, and there’s an array called “fragen_antworten” (German for “questions_answers”). Within this array, there are collections corresponding to the questions asked in the form.

The goal is to pair each question with its respective answer and format it into a single string. I need this string to be neatly structured so that I can easily input it into the records in my CRM.

Here’s the structure I’m aiming for:

Question 1: [Question text]
Answer 1: [Answer text]

Question 2: [Question text]
Answer 2: [Answer text]

Question 3: [Question text]
Answer 3: [Answer text]

And so on…

But honestly, I’m not quite sure how to go about achieving this. Any guidance would be greatly appreciated!

Welcome to the Make community!

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

1 Like

Module 1 Output Bundle:

[
    {
        "fragen_antworten": [
            {
                "id": "3505",
                "question_id": "63",
                "answer_text": null,
                "q_text": "Hast Du bereits Erfahrung im Vertrieb?",
                "q_type": "1",
                "a_text": "Ja"
            },
            {
                "id": "3506",
                "question_id": "67",
                "answer_text": null,
                "q_text": "Wie viel Jahre Erfahrung hast Du im Vertrieb bereits sammeln dürfen?",
                "q_type": "1",
                "a_text": "1-3 Jahre"
            },
            {
                "id": "3507",
                "question_id": "64",
                "answer_text": null,
                "q_text": "Kennst Du Dich mit Wärmepumpen aus? (nicht zwingend erforderlich)",
                "q_type": "1",
                "a_text": "Ja"
            },
            {
                "id": "3508",
                "question_id": "65",
                "answer_text": null,
                "q_text": "Würdest Du von Dir selbst behaupten, dass Du ein Mensch bist, der zielstrebig, wissbegierig und ambitioniert ist?",
                "q_type": "1",
                "a_text": "Ja"
            }
        ],
        "name": "TEST TEST",
        "email": "test@test.com",
        "rufnummer": "0151111111111",
        "kampagne": "TEST|TEST",
        "ergebnis": "0"
    }
]

Welcome to the Make community!

Yes, that is possible. You’ll need a minimum of two modules:

Screenshot_2024-04-20_200431

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.

JSON

{
    "subflows": [
        {
            "flow": [
                {
                    "id": 18,
                    "module": "builtin:BasicFeeder",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "array": "{{17.fragen_antworten}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": -698,
                            "y": 31
                        },
                        "restore": {
                            "expect": {
                                "array": {
                                    "mode": "edit"
                                }
                            }
                        },
                        "expect": [
                            {
                                "name": "array",
                                "type": "array",
                                "label": "Array",
                                "mode": "edit",
                                "spec": []
                            }
                        ]
                    }
                },
                {
                    "id": 19,
                    "module": "util:TextAggregator",
                    "version": 1,
                    "parameters": {
                        "rowSeparator": "\n",
                        "feeder": 18
                    },
                    "mapper": {
                        "value": "{{18.q_text}}{{newline}}{{18.a_text}}{{newline}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": -451,
                            "y": 32,
                            "messages": [
                                {
                                    "category": "last",
                                    "severity": "warning",
                                    "message": "A transformer should not be the last module in the route."
                                }
                            ]
                        },
                        "restore": {
                            "parameters": {
                                "rowSeparator": {
                                    "label": "New row"
                                }
                            },
                            "extra": {
                                "feeder": {
                                    "label": "Iterator [18]"
                                }
                            }
                        },
                        "parameters": [
                            {
                                "name": "rowSeparator",
                                "type": "select",
                                "label": "Row separator",
                                "validate": {
                                    "enum": [
                                        "\n",
                                        "\t",
                                        "other"
                                    ]
                                }
                            }
                        ],
                        "expect": [
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Text"
                            }
                        ],
                        "advanced": true
                    },
                    "flags": {
                        "stopIfEmpty": true
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

samliewrequest private consultation

2 Likes

It can be so simple! Thank you soooo much! It works now.

2 Likes

No problem, glad I could help!

1. If you have 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!

Links

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

General

Help Center Basics

Articles & Videos

samliewrequest private consultation

2 Likes