Generate Work Notes Summary as Comment #197
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This custom ServiceNow Flow Designer Action automatically aggregates all work notes from a record (such as an Incident, Change Request, or Task) and posts them as a single, formatted comment on the same record.
It helps summarize lengthy ticket histories into a concise comment for closure updates, audits, or team handovers — saving time and improving visibility.
⚙️ How It Works
Queries all entries in the sys_journal_field table for the target record where the journal type is work_notes.
Iterates through each entry and formats them in Markdown, including:
Timestamp
Author
Work note content
Posts the entire summary as a single comment on the record.
🧰 Inputs
Name Type Description
tableName String Name of the table (e.g., incident, change_request)
recordSysId String Sys ID of the record to summarize
📤 Output
Name Type Description
summaryText String The markdown-formatted summary that was posted as a comment