Need help setting up JSON

Currently my JSON looks like this:

{“sender”:{“email":"exemple@gmail.com”},“to”:[{“email":"toexemple@gmail.com”}],“subject”:“Test Subject2”,“replyTo”:{“email":"replytoexemple@gmail.com”},“params”:{“user”:“Alex K”,“count”:“Second”},“templateId”:2}

in the field “to”:[{“email":"toexemple@gmail.com”}] I’d like to have multiple emails from a multiline input, how can I realise that? Thanks!

Hi @oliviercoolen,
Basically, inside “to”: you take a list of your email addresses, then do :format as text, and format it like this:


Here’s example of part of JSON body content (so replace “attendees” with “to”)
Zrzut ekranu 2021-09-30 o 00.28.42

Let me know if that helps,
Best,
Alan

3 Likes

Thank you for your answer, @alanpieczonka. However, it looks like I cannot add ‘:format as text’ to a Multi-line input, or am I mistaking it?

Currently, I have found a little other solution for this:

This basically adds the necessary JSON to those emails, with Find&Replace when someone uses or a SPACE or an ENTER. However, when the user accidentally adds an extra space/enter somewhere in the multiline input, this workflows breaks, and the emails are not sent.

This topic was automatically closed after 70 days. New replies are no longer allowed.