API - JSON Body - text on new line

Hi,
I have an excerpt from a json body that I am including in an API call.
Does anyone know how I can add a new line in the text?
In JS I would do this with template literals and the \n. This doesn’t seem work in Bubble.

“properties”: {
“note_body”: "Current Stage: \n Tags: \n Note: \n Created by: ",
}

After the text you could try :find & replace then replace \n then just press “enter” in the replace section

EDIT: I was saying as a response how Bubble could translate to a newline. If you mean a newline for the API to understand, then I think that’s up to them what they consider a newline is.

The text in the JSON body is not a single DB text but instead it consists of several.
It’s more like this.

“properties”: {
“note_body”: “Current Stage: [tags] Note: [tags] Created by: [tags]”,
}

Therefore :find & replace won’t work.

In your API call you can do multiple parameters like

“properties”: {
“note_body”: “Current Stage: <tags1>\nNote: <tags2>\nCreated by: <tags3>”,
}

Then when you make the call you feed it
tags1 = Your input1:find & replace
tags2 = Your input2:find & replace
etc.

Maybe I’m misunderstanding or I have no idea what I’m talking about :grinning_face_with_smiling_eyes:

EDIT: what I said doesn’t make sense, but your API endpoint should know \n is linebreak, you wouldn’t want to add an actual linebreak there.

I got this mixed up with another post where they needed to find replace double quotes.

Is this your JSON body going out to the API or is your issue having Bubble understand those like breaks from a response?

:grinning_face_with_smiling_eyes: :grinning_face_with_smiling_eyes: :grinning_face_with_smiling_eyes:

Ok good you edited your response cause otherwise this thread would have been super confusing.

It’s an API Post call from my bubble app to an external service.
It seems like the bubble plugin already can’t interpret the \n correctly as a line break.

In Javascript I would simply use template literals for the string and \n would be correctly identified as a command for a line break. This is somehow either not possible in bubble or otherwise I don’t know how to make it work.