Difference between String and Text types in elements template

Hi,

We have a elements template for email, and it has body which is of type string.
Sometimes based on email conversation the body is exceeding 4000 chars which is causing the service task that uses elements template to fail when it is big since camunda is treating these as input variables.

Can I change the property type from String to Json? Does element template support json properties

I saw only Text type in camunda’s documentation apart from string type - Defining templates | Camunda 8 Docs

{
“label”: “Body”,
“value”: “${body}”,
“type”: “String”,
“binding”: {
“type”: “camunda:inputParameter”,
“name”: “body”
},
“constraints”: {
“pattern”: {
“value”: “^(?!\s*$).+”,
“message”: “A Body is required”
}
}
},

You can use Text instead of String. There is a similar issue discussed here about character limit.

{
“label”: “Template”,
“description”: “By the way, you can use freemarker templates ${…} here”,
“value”: “Hello ${firstName}!”,
“type”: “Text”,
“binding”: {
“type”: “camunda:inputParameter”,
“name”: “messageBody”,
“scriptFormat”: “freemarker”
},
“constraints”: {
“notEmpty”: true
}
}

Thank you Will try this

Text and String carries the same constraint from template perspective and looks like Json is not supported in the template, any other suggestions?