Formatting in a character field

Is it possible to format a character field?

I have a field that has the body of a ticket. It’s a character field in json. I need to submit a formatted block of text.

Is that possible?

-Russ

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@russellkg , sure, it is possible. By character field, I assume you mean a stringified JSON? You can use the following expression for that, {{ JSON.stringify($json.your_character_field_aka_json) }}.

Thanks for the reply.

I’m pushing something like this:

[
{
"alert": 
{
"client": 
"20",
"summary": 
"WARNING: Root Volume is 95.35% full. ",
"details": 
"[2024-03-19] WARNING: 95% (471.41 GB of 494.38 GB) exceeds the 90% usage threshold set on the root volume by about 26.47 GB. #### Boot Volume Used Space: 471.41 GB Capacity: 494.38 GB Percent Full: 95.35 Computer: Hostname User: user Email: [email protected]"
}
}
]

The details are nicely formatted in our old system, like this:

[2024-03-19] WARNING: 95% (471.41 GB of 494.38 GB) exceeds the 90% usage threshold set on the root volume by about 26.47 GB.

Boot Volume Used Space: 471.41 GB

Capacity: 494.38 GB
Percent Full: 95.35

Computer: Hostname
User: user
Email: [email protected]

hello @russellkg

For that one you will need a regex. As the data already rendered. You can extract the details and wrap them in the HTML to get a comfy view

1 Like

Hi @barn4k,

Actually, the data isn’t rendered already. I’m pulling the data out of an API call to Watchman Monitoring. If I understand, I would be able to plug it into the html node, and then send that to the Halo node as the details.

Thanks!

-Russ

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.