Warning: error of source variable is not cloneable

Hi Julia (@julia-suter) ,

this might not be directly related to the String size but it could be that the email body contained interpolation and actually was a GString object instead of a String object - see Groovy Documentation.
A GString would not be clonable, be passed by reference and not by value - leading to the warning that you mentioned.

In order to get rid of the warning, please try to call .toString() when you assign the value of emailBody to ensure its a String object.

In this specific case, we talk about ~4k characters inside your String, so passing it around can lead to an additional / unnecessary increase of the session logs. You can find valuable information on this topic here Data footprint | Teneo Developers and here Reducing Your Session Data Footprint - Knowledge Articles - Teneo Developers Community.

Maybe working with a Global Variable for your 4k characters variable is then a good option (possibly even inside a map as the second article reference suggest).

Hope this helps!
/Ben
.