Generate Work Notes Summary as Comment#197
Generate Work Notes Summary as Comment#197himanshu7895 wants to merge 3 commits intoServiceNowDevProgram:mainfrom
Conversation
|
✅ Valid PR for ActionPack Thank you for your contribution. This PR complies with the CONTRIBUTING.md. |
…finition_74773827c368721051c35ffdd4013164.xml
|
Thank you for your contribution Querying journal entry table is not a recommended practice,instead we can use getJournalEntry to get the complete worknotes/comments for a record. Let me know your thoughts on this. |
|
Hi @rohi-v, Let me know your thoughts |
|
GetJournalEntry is the best practice that is recommended and querying big table like journal is not recommended. Please check referenced links Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one. |
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