How to put more variants in my email?

Hey Guys!

My goal is to make email automation. So basically the idea is that I fill the form and it automatically sends an email to the lead. In the form there are many queastions and every queastion has many variants to choose from. So far everything is ok but when I choose more than one variant, only one is being sent in email. And in the Gmail part of the scenario (which is the last one, so g form → g drive->gmail), in the content section, where I can write script for email and the add values of the forms answers, when I put two values (answers) from question A for example, in the email it sends two identical texts/answers, even tho I choosed two different in the form, if I put one value in the script and choose two varients in the form then only one answer is being sent in email. I don’t know if there are any other options to make it work.

I understand that this description might be confusing, but it would mean the world to me if someone would respond to it. Appriciate yall.

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module, save the contents as a text file, and upload it here into this discussion thread:
Screenshot_2023-10-06_141025

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

So here you can see how one of the forms q’s looks like. As you see I choose two answers.


Also on the gmail script, I. choose two answers.

But in the gmail it only sends me one answer with weird brake.
Screenshot 2023-11-11 at 13.18.54

My scenario consists of form->g drive-> gmail.

Ands here is the output bundle:
[
{
“responseId”: “ACYDBNjl_WlcQXPDYa27fBM2Lv0QLW3scr5WyXNdkVZPHKBHkHKfe4YIS2D6_OP1N_PZ5fc”,
“createTime”: “2023-11-11T09:15:26.784Z”,
“answers”: {
“24114656”: {
“questionId”: “24114656”,
“textAnswers”: {
“answers”: [
{
“value”: “daniels.onukrans@gmail.com
}
]
}
},
“35441841”: {
“questionId”: “35441841”,
“textAnswers”: {
“answers”: [
{
“value”: “Reklāma Neatrodas Top 3 Pozīcijā”
}
]
}
},
“589d85a4”: {
“questionId”: “589d85a4”,
“textAnswers”: {
“answers”: [
{
“value”: “27068093”
}
]
}
},
“684a442d”: {
“questionId”: “684a442d”,
“textAnswers”: {
“answers”: [
{
“value”: “sekoju Jūsu Instagram lapai.”
}
]
}
},
“67879d69”: {
“questionId”: “67879d69”,
“textAnswers”: {
“answers”: [
{
“value”: “f”
}
]
}
},
“6d9f704a”: {
“questionId”: “6d9f704a”,
“textAnswers”: {
“answers”: [
{
“value”: “Nepilnīgs Vizuālais Materiāls”
}
]
}
},
“3e4cd10f”: {
“questionId”: “3e4cd10f”,
“textAnswers”: {
“answers”: [
{
“value”: “f”
}
]
}
},
“3fd3ffb1”: {
“questionId”: “3fd3ffb1”,
“textAnswers”: {
“answers”: [
{
“value”: “PĒC”
}
]
}
},
“3d84d293”: {
“questionId”: “3d84d293”,
“textAnswers”: {
“answers”: [
{
“value”: “Biznesa Attīstības Vadītājs”
}
]
}
},
“16dc0600”: {
“questionId”: “16dc0600”,
“textAnswers”: {
“answers”: [
{
“value”: “g”
}
]
}
},
“7e2ba9f9”: {
“questionId”: “7e2ba9f9”,
“textAnswers”: {
“answers”: [
{
“value”: “daniels@aheadmedia.lv”
}
]
}
},
“7acdebcc”: {
“questionId”: “7acdebcc”,
“textAnswers”: {
“answers”: [
{
“value”: “Daniels Onukrāns”
}
]
}
},
“6695795f”: {
“questionId”: “6695795f”,
“textAnswers”: {
“answers”: [
{
“value”: “Daniels”
}
]
}
},
“6d4b05ea”: {
“questionId”: “6d4b05ea”,
“textAnswers”: {
“answers”: [
{
“value”: “g”
}
]
}
},
“12a5866c”: {
“questionId”: “12a5866c”,
“textAnswers”: {
“answers”: [
{
“value”: “Netiek Uzskaitīta Reklāmu Efektivitāte”
}
]
}
},
“44380e7e”: {
“questionId”: “44380e7e”,
“textAnswers”: {
“answers”: [
{
“value”: “Reklāma Neuzrādās Uz Paplašinātajiem Atslēgvārdiem”
}
]
}
},
“67e4c758”: {
“questionId”: “67e4c758”,
“textAnswers”: {
“answers”: [
{
“value”: “f”
}
]
}
},
“395d6335”: {
“questionId”: “395d6335”,
“textAnswers”: {
“answers”: [
{
“value”: “Izmantota Neatbilstoša/Neeprecīza Mērķauditorija”
}
]
}
}
},
“lastSubmittedTime”: “2023-11-11T09:15:26.784Z”
}
]

Sorry, I can’t use that as it isn’t valid JSON (checked when pasted into https://jsonformatter.org)

1.

Could you format your JSON by editing three backticks ``` before and after the code, like this:

```
input/output bundle goes here
```

2.

or use the format code button in the editor:
Screenshot_2023-10-02_191027

3.

Alternatively, you can paste and save the contents of the bundles in your text editor as a .json file, and upload it here into this discussion thread.

1 Like
[
{
“responseId”: “ACYDBNjl_WlcQXPDYa27fBM2Lv0QLW3scr5WyXNdkVZPHKBHkHKfe4YIS2D6_OP1N_PZ5fc”,
“createTime”: “2023-11-11T09:15:26.784Z”,
“answers”: {
“24114656”: {
“questionId”: “24114656”,
“textAnswers”: {
“answers”: [
{
“value”: “daniels.onukrans@gmail.com”
}
]
}
},
“35441841”: {
“questionId”: “35441841”,
“textAnswers”: {
“answers”: [
{
“value”: “Reklāma Neatrodas Top 3 Pozīcijā”
}
]
}
},
“589d85a4”: {
“questionId”: “589d85a4”,
“textAnswers”: {
“answers”: [
{
“value”: “27068093”
}
]
}
},
“684a442d”: {
“questionId”: “684a442d”,
“textAnswers”: {
“answers”: [
{
“value”: “sekoju Jūsu Instagram lapai.”
}
]
}
},
“67879d69”: {
“questionId”: “67879d69”,
“textAnswers”: {
“answers”: [
{
“value”: “f”
}
]
}
},
“6d9f704a”: {
“questionId”: “6d9f704a”,
“textAnswers”: {
“answers”: [
{
“value”: “Nepilnīgs Vizuālais Materiāls”
}
]
}
},
“3e4cd10f”: {
“questionId”: “3e4cd10f”,
“textAnswers”: {
“answers”: [
{
“value”: “f”
}
]
}
},
“3fd3ffb1”: {
“questionId”: “3fd3ffb1”,
“textAnswers”: {
“answers”: [
{
“value”: “PĒC”
}
]
}
},
“3d84d293”: {
“questionId”: “3d84d293”,
“textAnswers”: {
“answers”: [
{
“value”: “Biznesa Attīstības Vadītājs”
}
]
}
},
“16dc0600”: {
“questionId”: “16dc0600”,
“textAnswers”: {
“answers”: [
{
“value”: “g”
}
]
}
},
“7e2ba9f9”: {
“questionId”: “7e2ba9f9”,
“textAnswers”: {
“answers”: [
{
“value”: “daniels@aheadmedia.lv”
}
]
}
},
“7acdebcc”: {
“questionId”: “7acdebcc”,
“textAnswers”: {
“answers”: [
{
“value”: “Daniels Onukrāns”
}
]
}
},
“6695795f”: {
“questionId”: “6695795f”,
“textAnswers”: {
“answers”: [
{
“value”: “Daniels”
}
]
}
},
“6d4b05ea”: {
“questionId”: “6d4b05ea”,
“textAnswers”: {
“answers”: [
{
“value”: “g”
}
]
}
},
“12a5866c”: {
“questionId”: “12a5866c”,
“textAnswers”: {
“answers”: [
{
“value”: “Netiek Uzskaitīta Reklāmu Efektivitāte”
}
]
}
},
“44380e7e”: {
“questionId”: “44380e7e”,
“textAnswers”: {
“answers”: [
{
“value”: “Reklāma Neuzrādās Uz Paplašinātajiem Atslēgvārdiem”
}
]
}
},
“67e4c758”: {
“questionId”: “67e4c758”,
“textAnswers”: {
“answers”: [
{
“value”: “f”
}
]
}
},
“395d6335”: {
“questionId”: “395d6335”,
“textAnswers”: {
“answers”: [
{
“value”: “Izmantota Neatbilstoša/Neeprecīza Mērķauditorija”
}
]
}
}
},
“lastSubmittedTime”: “2023-11-11T09:15:26.784Z”
}
]```

Now you can understand? I’m not so advanced in this topic so it might be wrong

Not easy to see what you’re getting back - your json has dodgy double quotes in it (stylised ones)

I think you want to do a join on the result of your question as it’s returned as an array by the looks of the screen shot you posted.

{{join(map(<your answers array>; "value") + carriagereturn)}}

That will then join them with a line break.

If that’s not what you’re attempting then you can export your scenario and add it here for people to look at and you may get a better answer.

Cheers

Simon

2 Likes

Sorry, I can’t use that as it isn’t valid JSON. In future, could you format JSON code before submitting the reply, otherwise the forum software will convert some characters to make them invalid (checked when pasted into https://jsonformatter.org)

1.

Could you format your JSON by editing three backticks ``` before and after the code, like this:

```
input/output bundle goes here
```

2.

or use the format code button in the editor:
Screenshot_2023-10-02_191027

3.

Alternatively, you can paste and save the contents of the bundles in your text editor as a bundle.json file, and upload it here into this discussion thread.

Once the post has been submitted, it’s too late to format it since it’s already butchered, and you need to “make a fresh copy of output bundle” (don’t copy from your previous post), and format it before submitting the forum post.

2 Likes

Here you go, I just did a quick find and replace to remove the balked double quotes for him as coding etc is obviously not their forte

{
  "responseId": "ACYDBNjl_WlcQXPDYa27fBM2Lv0QLW3scr5WyXNdkVZPHKBHkHKfe4YIS2D6_OP1N_PZ5fc",
  "createTime": "2023-11-11T09:15:26.784Z",
  "answers": {
    "24114656": {
      "questionId": "24114656",
      "textAnswers": {
        "answers": [
          {
            "value": "daniels.onukrans@gmail.com"
          }
        ]
      }
    },
    "35441841": {
      "questionId": "35441841",
      "textAnswers": {
        "answers": [
          {
            "value": "Reklāma Neatrodas Top 3 Pozīcijā"
          }
        ]
      }
    },
    "589d85a4": {
      "questionId": "589d85a4",
      "textAnswers": {
        "answers": [
          {
            "value": "27068093"
          }
        ]
      }
    },
    "684a442d": {
      "questionId": "684a442d",
      "textAnswers": {
        "answers": [
          {
            "value": "sekoju Jūsu Instagram lapai."
          }
        ]
      }
    },
    "67879d69": {
      "questionId": "67879d69",
      "textAnswers": {
        "answers": [
          {
            "value": "f"
          }
        ]
      }
    },
    "6d9f704a": {
      "questionId": "6d9f704a",
      "textAnswers": {
        "answers": [
          {
            "value": "Nepilnīgs Vizuālais Materiāls"
          }
        ]
      }
    },
    "3e4cd10f": {
      "questionId": "3e4cd10f",
      "textAnswers": {
        "answers": [
          {
            "value": "f"
          }
        ]
      }
    },
    "3fd3ffb1": {
      "questionId": "3fd3ffb1",
      "textAnswers": {
        "answers": [
          {
            "value": "PĒC"
          }
        ]
      }
    },
    "3d84d293": {
      "questionId": "3d84d293",
      "textAnswers": {
        "answers": [
          {
            "value": "Biznesa Attīstības Vadītājs"
          }
        ]
      }
    },
    "16dc0600": {
      "questionId": "16dc0600",
      "textAnswers": {
        "answers": [
          {
            "value": "g"
          }
        ]
      }
    },
    "7e2ba9f9": {
      "questionId": "7e2ba9f9",
      "textAnswers": {
        "answers": [
          {
            "value": "daniels@aheadmedia.lv"
          }
        ]
      }
    },
    "7acdebcc": {
      "questionId": "7acdebcc",
      "textAnswers": {
        "answers": [
          {
            "value": "Daniels Onukrāns"
          }
        ]
      }
    },
    "6695795f": {
      "questionId": "6695795f",
      "textAnswers": {
        "answers": [
          {
            "value": "Daniels"
          }
        ]
      }
    },
    "6d4b05ea": {
      "questionId": "6d4b05ea",
      "textAnswers": {
        "answers": [
          {
            "value": "g"
          }
        ]
      }
    },
    "12a5866c": {
      "questionId": "12a5866c",
      "textAnswers": {
        "answers": [
          {
            "value": "Netiek Uzskaitīta Reklāmu Efektivitāte"
          }
        ]
      }
    },
    "44380e7e": {
      "questionId": "44380e7e",
      "textAnswers": {
        "answers": [
          {
            "value": "Reklāma Neuzrādās Uz Paplašinātajiem Atslēgvārdiem"
          }
        ]
      }
    },
    "67e4c758": {
      "questionId": "67e4c758",
      "textAnswers": {
        "answers": [
          {
            "value": "f"
          }
        ]
      }
    },
    "395d6335": {
      "questionId": "395d6335",
      "textAnswers": {
        "answers": [
          {
            "value": "Izmantota Neatbilstoša/Neeprecīza Mērķauditorija"
          }
        ]
      }
    }
  },
  "lastSubmittedTime": "2023-11-11T09:15:26.784Z"
}

That said I’m not sure it really helps as I can’t see a question with multiple answers within the json :man_shrugging:

4 Likes

That’s true, will need further investigation on how to make the Google Forms module return all the selected answers then.

3 Likes

So, as I understand, I can’t put multiple answers in the email right now?

Hey Simon!

Thank you a lot, but where exactly should I paste it?

No, this is not what we mean. The output bundles you provided didn’t have any questions with more than one selected answer. Can you provide us with an example of output bundle when more than one answer is selected?

Got ya, here you go.

[
{
“responseId”: “ACYDBNi0j1X4mJD0U5sZKYxPcwthuIqu48LzBtaeUT-Va-nYE5SJxb18SD8xqtXg06Rnq8Y”,
“createTime”: “2023-11-16T07:49:40.251Z”,
“answers”: {
“24114656”: {
“questionId”: “24114656”,
“textAnswers”: {
“answers”: [
{
“value”: “daniels.onukrans@gmail.com
}
]
}
},
“35441841”: {
“questionId”: “35441841”,
“textAnswers”: {
“answers”: [
{
“value”: “• Reklāma Nav Relevanta Atslēgvārdiem”
},
{
“value”: “• Neefektīvs Reklāmas Teksts”
}
]
}
},
“589d85a4”: {
“questionId”: “589d85a4”,
“textAnswers”: {
“answers”: [
{
“value”: “27068093”
}
]
}
},
“684a442d”: {
“questionId”: “684a442d”,
“textAnswers”: {
“answers”: [
{
“value”: “sekoju Jūsu Instagram lapai. Saprotu, ka pagaidām neesam sadarbojušies ar Jūsu uzņēmumu, tāpēc nolēmu veikt preauditu Jūsu esošajām reklāmām.”
}
]
}
},
“67879d69”: {
“questionId”: “67879d69”,
“textAnswers”: {
“answers”: [
{
“value”: “Jani”
}
]
}
},
“6d9f704a”: {
“questionId”: “6d9f704a”,
“textAnswers”: {
“answers”: [
{
“value”: “• Neefektīvs Reklāmas Teksts”
},
{
“value”: “• Nepilnīgs Vizuālais Materiāls”
}
]
}
},
“3e4cd10f”: {
“questionId”: “3e4cd10f”,
“textAnswers”: {
“answers”: [
{
“value”: “Berziņš”
}
]
}
},
“05093e8b”: {
“questionId”: “05093e8b”,
“textAnswers”: {
“answers”: [
{
“value”: “maja”
}
]
}
},
“3d84d293”: {
“questionId”: “3d84d293”,
“textAnswers”: {
“answers”: [
{
“value”: “Biznesa Attīstības Vadītājs”
}
]
}
},
“70b94315”: {
“questionId”: “70b94315”,
“textAnswers”: {
“answers”: [
{
“value”: “koka maja”
}
]
}
},
“16dc0600”: {
“questionId”: “16dc0600”,
“textAnswers”: {
“answers”: [
{
“value”: “12345678”
}
]
}
},
“7e2ba9f9”: {
“questionId”: “7e2ba9f9”,
“textAnswers”: {
“answers”: [
{
“value”: “daniels@aheadmedia.lv”
}
]
}
},
“7acdebcc”: {
“questionId”: “7acdebcc”,
“textAnswers”: {
“answers”: [
{
“value”: “Daniels Onukrāns”
}
]
}
},
“6695795f”: {
“questionId”: “6695795f”,
“textAnswers”: {
“answers”: [
{
“value”: “Daniels”
}
]
}
},
“79a174ed”: {
“questionId”: “79a174ed”,
“textAnswers”: {
“answers”: [
{
“value”: “koka maja guļbuve”
}
]
}
},
“6d4b05ea”: {
“questionId”: “6d4b05ea”,
“textAnswers”: {
“answers”: [
{
“value”: “www.maja.lv”
}
]
}
},
“12a5866c”: {
“questionId”: “12a5866c”,
“textAnswers”: {
“answers”: [
{
“value”: “• Netiek Uzskaitīta Reklāmu Efektivitāte”
},
{
“value”: “• Neprecīza Reklāmas Datu Uzskaite”
}
]
}
},
“44380e7e”: {
“questionId”: “44380e7e”,
“textAnswers”: {
“answers”: [
{
“value”: “• Reklāma Neuzrādās Uz Paplašinātajiem Atslēgvārdiem”
},
{
“value”: “• Reklāma Neuzrādās Uz Specifiskajiem Atslēgvārdiem”
}
]
}
},
“67e4c758”: {
“questionId”: “67e4c758”,
“textAnswers”: {
“answers”: [
{
“value”: “SIA Berzins”
}
]
}
},
“395d6335”: {
“questionId”: “395d6335”,
“textAnswers”: {
“answers”: [
{
“value”: “• Izmantota Neatbilstoša/Neeprecīza Mērķauditorija”
}
]
}
}
},
“lastSubmittedTime”: “2023-11-16T07:49:40.251Z”
}
]

Hi @Daniels1

You need to put it into the body of your email in the gmail script where you currently try to access the value from the component twice as per your second post above.

Based on your JSON I think it should work.
Using map to extract the value component from the array will give you a flat array of just the values which you can then join with the carriage return to put them one below the other in the email.

Let us know how you get on.

Cheers

Simon

2 Likes

I need to paste the code in the gmail script?

@Daniels1

I’m assuming to be honest as you haven’t given us an export of your blueprint (see @samliew’s info above for details on how to do that), but wherever you were trying to use the value in make before is where you need to put the join statement.

Cheers

Simon

1 Like

blueprint.json (195.6 KB)

here is the blueprint

Hi @Daniels1

yes in your gmail script replace…

<b>Mājaslapas Analītika:</b> <br>
{{6.answers.`12a5866c`.textAnswers.answers[].value}} 
<br><br>

…with…

<b>Mājaslapas Analītika:</b> <br>
{{join(map(6.answers.`12a5866c`.grade.feedback.textAnswers.answers; "value"); "<br>")}}
<br><br>

You should see the colour of the answers element change to dark purple to match the forms component rather than the white with purple outline.

easiest is if you copy the whole content out to a text editor, make the above replacement and then copy it back, it should show you the difference.

Then you can go through and use the UI’s data selection process rather than copying and pasting things in and out.

Get to know the get / map / join methods in Make they’re very useful.

Cheers

Simon

2 Likes

Hey Simon.

Should it look like this?

Because in the email there is just blank spots and nothing else when I fill the form.
Screenshot 2023-11-29 at 14.38.44