Auto generate PDF of RITM with related list and attach to the RITM itself
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I want to auto generate a PDF whenever the request is completed and auto attach the PDF to the actual RITM.
The PDF should contain all variable information along with the Approver related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @mr18 ,
A few Questions before I answer to the above requirement
- Which ServiceNow release are you on (e.g., Washington, Vancouver, Utah)?
- Do you have the Document Generation plugin (and prefer a template‑driven approach), or should we go with the code approach?
1) DocGen is a ServiceNow no‑code/low‑code feature that lets you:
- Create a Word template
- Fill it with dynamic data (fields, variables, related lists, approvals)
- Auto-generate PDF or DOCX
- Attach or email the output
How it works
- Create a Word template
- Create a Data Source (drag‑and‑drop or scripted)
- Create a Flow Designer action to generate the document
- Generate output as PDF
Basically if Document Generation plugin is installed then it is easy to achieve the requirement.
2) There is a developer‑built solution using:
- Business Rules / Script Includes / Flow Designer Script step
- HTML to PDF API (PDF Generation Utils plugin or custom library) //make sure this plugin is active
- Code to fetch variables, approvals, MRVS, etc.
- Code to build the HTML
- Code to convert HTML → PDF
- Code to attach it to the record
Please mark as helpful if this gives you some guidance to achieve the requirement.
Thanks & Regards
Yamsani Bhavani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Thank you @BhavaniYamsani for the reply.
We have Xanadu version and we don't have document generation plugin. So mostly going for code approach
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
check this link which has script from Piyush
Generate PDF file for catalog variables and attach it to RITM
also check this link
When catalog item is submitted, attach variables to RITM as a PDF
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you @Ankur Bawiskar but those responses mainly talk about assumptions. I need the real sample of the use case who already did this

