# Passing a multiline variable as argument to a Python Action script

**URL:** https://www.finalbuilder.com/forums/t/passing-a-multiline-variable-as-argument-to-a-python-action-script/7602
**Category:** Discussion
**Created:** [January 22, 2025, 1:55pm UTC](https://www.finalbuilder.com/forums/t/passing-a-multiline-variable-as-argument-to-a-python-action-script/7602 "2025-01-22T13:55:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ktopaz](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ktopaz/32/2390_2.png) [@ktopaz](https://www.finalbuilder.com/forums/u/ktopaz)
#### Post date: [January 22, 2025, 1:55pm UTC](https://www.finalbuilder.com/forums/t/passing-a-multiline-variable-as-argument-to-a-python-action-script/7602/1 "2025-01-22T13:55:53Z")

</div>

Hi Guys,

I’m trying to pass a variable with multiple lines of text as an argument to a python action script.  
(The python action sends the argument text to google chat).

I’m not sure if its possible to have the argument passed as a multiline argument  
(please let me know if this is possible)

But, my python script does support multiple arguments and can send each argument in a new line to the chat like so:

SendToGoogleChatRoom.py “this is line 1” “this is line 2” “this is line 3”

Can I somehow break my %msg% variable that consists of multiple lines  
to multiple arguments wrapped in quotes?

%msg% =

> this is line 1  
> this is line 2  
> this is line 3

I tried passing the following expression as an argument to the Python action script:

> $Utils.GetString(%msg%).SplitWithQuotes(“\r\n”,“double”,false,true)$

(tried \n , \r\n and other arbitrary separators I’ve added to the end of lines in %msg%

But it does not seem to work as I’ve expected.

Is there a way to break a multiline variable to double quotes wrapped arguments per line?

---

<div class="post-metadata">

### Author: ![ktopaz](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ktopaz/32/2390_2.png) [@ktopaz](https://www.finalbuilder.com/forums/u/ktopaz)
#### Post date: [January 22, 2025, 1:58pm UTC](https://www.finalbuilder.com/forums/t/passing-a-multiline-variable-as-argument-to-a-python-action-script/7602/2 "2025-01-22T13:58:39Z")

</div>

Ok I got it while I was writing the question I read the docs for Expression Objects  
a bit more in depth, and figured it out:

> $Utils.GetString(%msg%).Split(“\r\n”,true,true).Join(" ",“double”,true)$

I figured I’d still post it here along with the answer  
just in case it helps anyone else in the future… 🙂
