# SendGrid multiple lines

**URL:** <https://forum.adalo.com/t/sendgrid-multiple-lines/30752>\
**Category:** Get Help\
**Created:** [August 13, 2022, 9:11pm UTC](https://forum.adalo.com/t/sendgrid-multiple-lines/30752 "2022-08-13T21:11:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nirvana](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@Nirvana](https://forum.adalo.com/u/Nirvana)\
**Post date:** [August 13, 2022, 9:11pm UTC](https://forum.adalo.com/t/sendgrid-multiple-lines/30752/1 "2022-08-13T21:11:09Z")

</div>

I’ve setup SendGrid with custom action.  
I need a text input (for the user to send me an email) with multiple lines for the object.  
But I guess the Json doesn’t work with multiple lines.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/b/2/b2c7bdeb57ce7a258deeed556cb9c97e05c81f74.png)

How the transform the multiple lines in one line for Json (adding some extra “” or ) ?

In the Adalo tuto, it looks like multiple lines:  
[Adalo Custom Actions Tutorial - SendGrid Email - YouTube](https://www.youtube.com/watch?v=UZEENzF6bHE)

Thanks

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [August 14, 2022, 2:39am UTC](https://forum.adalo.com/t/sendgrid-multiple-lines/30752/2 "2022-08-14T02:39:29Z")

</div>

I didn’t try but I suggested before using url encode component, and then decode at the other end. I guess you probably can’t decode on sendgrid so might need zapier or similar to decode.

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [August 14, 2022, 2:52pm UTC](https://forum.adalo.com/t/sendgrid-multiple-lines/30752/3 "2022-08-14T14:52:43Z")

</div>

I think Nathan’s suggestion is working! : [API request data from text input with line break - #4 by basssab](https://forum.adalo.com/t/api-request-data-from-text-input-with-line-break/28225/4) ( [Send Multiple Lines - Part 1.mp4 on Vimeo](https://vimeo.com/739401101) )

> **JS**
>
> ```auto
> var text = `text input`;
> var encoded_text = encodeURI(text);
> return encoded_text;
> 
> ```
> 
> ( replace the text input with your input component.)

But I think like Nathan said if you do this with Sendgrid there is no way to decode it. But here’s a great way you can do this! No Encode,Decode and it’s with a simple js script!

Here’s a video : [Send Multiple Lines - Part 2.mp4 on Vimeo](https://vimeo.com/739402884)

And the JS :

```auto
var text = `text input`;
var modified_text = text.split('\n').join('\\n');
return modified_text;

```

( add your input in the text input area. )

Information for Download Arbitrary JavaScript Component! : [PragmaFlow's Adalo Marketplace Reopened - YouTube](https://www.youtube.com/watch?v=4mo_u5EdEWw)

Pragmaflow Website : [https://adalo.pragmaflowservers.com/install-component](https://adalo.pragmaflowservers.com/install-component)

Component you need :

![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/9/7/977223c0afcd0dba6c3f9d19a116b7956fe9b71a.png)

Thank you

---

<div class="post-metadata">

**Author:** ![Nirvana](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@Nirvana](https://forum.adalo.com/u/Nirvana)\
**Post date:** [August 14, 2022, 8:49pm UTC](https://forum.adalo.com/t/sendgrid-multiple-lines/30752/4 "2022-08-14T20:49:46Z")

</div>

Just PERFECT !!!

Tank you so much

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [August 24, 2022, 8:49pm UTC](https://forum.adalo.com/t/sendgrid-multiple-lines/30752/5 "2022-08-24T20:49:54Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
