Skip to content

Conversation

@himanshu7895
Copy link
Contributor

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

@github-actions
Copy link

Valid PR for ActionPack

Thank you for your contribution. This PR complies with the CONTRIBUTING.md.
A maintainer will review this shortly. In the meantime, Happy Hacking!

@rohi-v rohi-v self-assigned this Oct 19, 2025
…finition_74773827c368721051c35ffdd4013164.xml
@rohi-v
Copy link
Contributor

rohi-v commented Oct 19, 2025

Hi @himanshu7895

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.

@himanshu7895
Copy link
Contributor Author

Hi @rohi-v,
GlideJournalEntry is only available in scoped apps (with the glide module) or certain server-side contexts.
In Flow Designer script steps, it often throws “not defined” because the Flow Designer executes in a restricted scoped environment.

Let me know your thoughts

@rohi-v
Copy link
Contributor

rohi-v commented Oct 19, 2025

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.

@rohi-v rohi-v closed this Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants