Incident Summarization Skill is posting markdown text in work notes

Krystal2
ServiceNow Employee
ServiceNow Employee

Configure the incident summarization skill to trigger after reassigned to another group. After the summarization is generated select option to add to work notes. On the incident form or SOW, the summarization is displayed with markdown text. How we can prevent this?

2 REPLIES 2

MihirN
Tera Contributor

If I understand the scenario correctly,

Your setup:

  1. You configured an Incident Summarization Skill (like GenAI Summarization).
  2. It triggers when the incident is reassigned to another group.
  3. The summary is automatically added to work notes.
  4. On the incident form or SOW, work notes are rendered with markdown (for example, ## shows headings, * shows bullets, etc).

And expectation is to stop the markdown formatting — so that the summarization shows up as plain text in the work notes or comments.

Option 1 — Post-process the summary text

Before you add the summary to work notes, you can:

  • Strip or replace markdown characters.
  • For example, remove #, *, or any other formatting symbols.

If you’re using a Flow Designer action or a Scripted Flow action:

// Example transform

var summary = generated_summary_text; // from the skill

summary = summary.replace(/[#*_`~>-]/g, ''); // removes common markdown chars

Then save this cleaned string to the work_notes field.

Option 2 — Use plain text mode in the prompt

If your summarization prompt supports system instructions, add something like:

“Return the summary in plain text only. Do not include markdown syntax, bullet points, or headings.”

This reduces the AI’s tendency to use markdown.

Combine Option 1 + Option 2:

  • Add a final text clean-up to strip markdown.
  • Adjust your system prompt: “Provide the summary as plain text, no markdown, no headings, no bullets.”

Example script in a flow action

(function execute(inputs, outputs) {

    var rawSummary = inputs.generated_summary;

    var plainSummary = rawSummary.replace(/[#*_`~>-]/g, '');

    current.work_notes = plainSummary;

})(inputs, outputs);

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Krystal2
ServiceNow Employee
ServiceNow Employee

This is OOB resolution summarization that when you click 'add to work notes' if bullets are present it shows the markdown language within the worknotes instead of keeping the AI generated formatting shown in the popup.