How to format a long string in the content section of a 'send an email' in a Gmail module?

I have a webhook that receives data from a chat bot. Attached to the webhook I have the ‘send an email’ from Gmail module that will send an email with the data collected. Some of the data collected is the AI conversation between the Bot and User. In the email received the AI conversation is a Long String.

Example: bot: Hi there! bot: Welcome! We are glad you are here. bot: Before we get started, can I please get your name? user: Frank bot: How about your email? user: frank@frank.com bot: What can I help you with today? user: do you do apartments? bot: I’m not sure about that. etc.

I want to have the bot questions in one line and the user’s responses in another line.
Example:
-bot: question in one line
-user: answer in one line
-bot: question in one line
-user: answer in one line

NOTE: if you notice on the webhook and the Gmail module screenshots the AI Data is structured how I would like to receive it in the email but I receive it as a Long String.

Thank you in advance for your help!



Welcome to the Make community!

You’ll have to split by newlines and join by the HTML break tag <br>

e.g.:

{{ join(split(1.text; newline); "<br>") }}

This is actually a very commonly-asked question. I recommend using the search functionality of this forum so you can learn from existing threads before posting a new duplicate question.

For more information, see

samliewrequest private consultation

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

2 Likes

Thank you for your response. Do I need to add a text parse? Or do I add this into the content section? I’m really new at this so please excuse my ignorance. I did go look at other threads but I couldn’t find anything that could help my situation. I know how to add breaks and paragraphs but I can’t figure out my situation.

You can directly copy the line and paste it into your content field.

samliewrequest private consultation

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

Thank you very much, I really appreciate it. It worked great!

1 Like