Since each assignment is processed sequentially, you can concatenate a string
over multiple lines by repeating the variable and splitting the assignment. For
example:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Strings\n\nThe Workflows syntax supports a string data type with UTF‑8\nencoding ([maximum length](/workflows/quotas#resource_limits)).\n\nFor information on conversion and built-in string functions, see\n[Data types, functions, operators](/workflows/docs/reference/syntax/datatypes).\n\nFor other text processing functions, see the Workflows standard\nlibrary [`text` module reference](/workflows/docs/reference/stdlib/overview#module:-text).\n\nAssign a string variable\n------------------------\n\nThe value of a static string can be assigned to a variable. For example: \n\n### YAML\n\n```yaml\n - step:\n assign:\n - string: \"hello\"\n \n```\n\n### JSON\n\n```json\n [\n {\n \"step\": {\n \"assign\": [\n {\n \"string\": \"hello\"\n }\n ]\n }\n }\n ]\n \n```\n\nConcatenate using expressions\n-----------------------------\n\nYou can dynamically concatenate strings using expressions and the `+` operator.\nFor example:\n\n\u003cbr /\u003e\n\n### YAML\n\n```yaml\n - step:\n assign:\n - outputVar: ${\"Hello, \" + firstName}\n \n```\n\n### JSON\n\n```json\n [\n {\n \"step\": {\n \"assign\": [\n {\n \"outputVar\": \"${\\\"Hello \\\" + firstName}\"\n }\n ]\n }\n }\n ]\n```\n\n\u003cbr /\u003e\n\n| **Important:** In YAML, expressions containing colons can cause unexpected behaviour when the colon is interpreted as defining a map. You can resolve this issue by wrapping the YAML expression in single quotes:\n|\n| Recommended: `'${\"thisVar: \" + myVar}'`\n|\n| Not recommended: `${\"thisVar: \" + myVar}`\n| For details, see [Expressions containing colons](/workflows/docs/troubleshooting#expressions-colons).\n\nConcatenate over multiple lines\n-------------------------------\n\nSince each assignment is processed sequentially, you can concatenate a string\nover multiple lines by repeating the variable and splitting the assignment. For\nexample: \n\n### YAML\n\n```yaml\nmain:\n steps:\n - assign_vars:\n assign:\n - concatLines: \"say\"\n - concatLines: ${concatLines+\" \"+\"hello\"}\n - concatLines: ${concatLines+\" \"+\"to the world\"}\n - returnOutput:\n return: ${concatLines}\n```\n\n### JSON\n\n```json\n{\n \"main\": {\n \"steps\": [\n {\n \"assign_vars\": {\n \"assign\": [\n {\n \"concatLines\": \"say\"\n },\n {\n \"concatLines\": \"${concatLines+\\\" \\\"+\\\"hello\\\"}\"\n },\n {\n \"concatLines\": \"${concatLines+\\\" \\\"+\\\"to the world\\\"}\"\n }\n ]\n }\n },\n {\n \"returnOutput\": {\n \"return\": \"${concatLines}\"\n }\n }\n ]\n }\n}\n```"]]