How to Attach and Attachment onto an Approver email after the RITM number is created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 05:56 AM
Good morning,
i need to find a way when users attach a new attachment on the RITM request and have that attachment then get attached to the Approver to see on their email.
Basically, i want to be able to attach any attachment here on the request that was submitted
then forward that attachment for the approver to see on their emails
I created a button to Resend the Approver email however i need to be able to get the attachment onto the approval when they attach it onto the RITM submitted request
Please help....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 10:16 AM - edited 09-25-2024 10:18 AM
@Peter Williams ok then use copy attachment action twice, one to copy from RITM to approval and another to copy from RITM/approval to email record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2026 01:46 PM
Approach — Flow Designer "Send Email" action with attachment
If you're controlling the approval notification from **inside your Flow Designer flow** rather than relying on the built-in notification engine, use a **Send Email** action step.
### In Flow Designer
After your `Ask for Approval` or `Create Task` step, add a **Send Email** action:
```
Action: Send Email
To: [Approver's email pill]
Subject: Approval Required - AdHoc Invoice ${trigger.number}
Body: [your template]
Attachments: [Trigger > RITM > Attachments] ← this is the key pill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2026 01:51 PM
Another Approach — Script Include + Event-driven notification
For the most control — especially useful in your AdHoc Invoice flow where multiple groups need to see the invoice PDF — use a Business Rule or Flow Script to fire a custom event, then attach via the notification's event handler:
Step 1 — Fire a custom event from your flow (Run Script action):
// In Flow Designer Run Script step
var ritmSysId = fd_data.trigger.current.sys_id.toString();
var approvalId = fd_data.create_approval.sys_id.toString();
gs.eventQueue(
'adhoc.invoice.approval.requested', // custom event name
GlideRecord('sysapproval_approver', approvalId),
ritmSysId, // parm1 = RITM sys_id
approvalId // parm2 = approval sys_id
);
```
**Step 2 — Register the event** under `System Policy > Events > Registry`:
```
Event name: adhoc.invoice.approval.requested
Table: sysapproval_approver
**Step 3 — Create the notification triggered by this event:**
Notification name: AdHoc Invoice - Approval Request
Table: sysapproval_approver
When to send: Event fired = adhoc.invoice.approval.requested
Subject: Action Required: AdHoc Invoice Approval - ${event.parm1}
Body:
Dear ${approver.name},
An AdHoc Invoice requires your approval.
RITM: ${document.number}
Amount: ${document.variables.invoice_amount}
Customer: ${document.variables.customer_name}
Please review the attached invoice and approve or reject
via the link below:
${approval_url}
Attachment script:
// Notification attachment script
// Runs in context of the sysapproval_approver record (current)
var attachments = [];
// Get the RITM sys_id from the approval's document_id
var ritmSysId = current.document_id; // document_id = the RITM sys_id
var attGR = new GlideRecord('sys_attachment');
attGR.addQuery('table_name', 'sc_req_item');
attGR.addQuery('table_sys_id', ritmSysId);
attGR.query();
while (attGR.next()) {
attachments.push(attGR.sys_id.toString());
}
return attachments; // array of sys_attachment sys_ids to attach to the email
