Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Using ContentModifier output in a Groovy script

Hi experts !

My current requirement is to use a value coming from a ContentModifier header in a Groovy script.

When sending the value from ContentModifier to e-mail I used ${} and I get the value, but now I need to pass it inside a groovy script.

Any idea about this ?



Mohammed Amine.

Former Member

Hello Mohammed,

After content modifier step add script Step and add the following code.


import java.util.HashMap;

def Message processData(Message message) {



   def body = message.getBody();



    def map = message.getHeaders();


    //get the value associated with header 'id'

    def value = map.get("id");


    //Convert it to String for further usage.

    idValue =value.toString();


    //Write your logic here


    return message;



Sriprasad Shivaram Bhat

1 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question