Error: Empty Attachment Record when trying to copy attachment using Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2023 10:47 AM
Hi Everyone!
I created a Subflow (triggered by a UI Action) to transfer an SC Task to an HR Case. As part of this requirement, I want to copy the attachments too and I'm trying to use the existing actions: "Look Up Attachment" and then "Copy Attachment" but I get the following error: Error: Empty Attachment Record. (sys_script_include.5430bdf89313130079b5925cf67ffb04.script; line 23)
I can even see the attachment record on the Flow Execution Details but for some reason isn't working - any thoughts?
- 2,408 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 06:37 AM
Hi @tiagobrito,
Did you ever find a fix for this? I'm having a similar issue but going from RITM to an email.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 03:28 PM
I had the same issue and found the solution here:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0813220
Essentially, once you look up attachment - then you have to look up record on the sys_attachment table and use the condition sys_id = the sysid you found in lookup attachment. Then you can do a copy attachment and use the record you found...a few extra steps.
This should help:
So:
Lookup Attachment (use your source record that has the attachment on in it)
Lookup Record (find the record with that attachment sys id on the sys_attachment table)
Copy Attachment (use the record you found in Lookup Record)
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 12:21 PM - edited 08-17-2023 12:23 PM
Hi All,
I just want to know here because the timestamping of the mentions here are relatively recent. Do you mind stating what release you all are using when this occurred? I ask because I'm going through upgrade testing & after grading to a newer release; the "Copy Attachment" action is not working when it did before. We didn't have to do the "Look Up Attachment Record" action you've mentioned above. Our scenario was the same as Craig Lawson stated; which is sending an email from a RITM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 09:01 AM - edited 10-04-2023 09:10 AM
This does invite the question.... what's the point of that action at all?
I just eliminated step 2 in your screenshot altogether and adjusted step 3 to look for the sys_id of the source record as the "Table sys ID" value. Now I found all attachments linked to the source record, where the original action is limited to 1.
So not only am I now not limited to a single result using this method, I also don't need to worry about handling an error condition if the source record has zero attachments, since I'm just looping the Copy Attachment action through the total number of records found. If total is zero, then it won't try to copy an attachment.
After trying to use it, I'm now struggling to understand the purpose of the "look up attachment" action at all.