Get Attachments on record Action is not working

Anandini
Tera Expert

Hi,
I’ve created a custom table named u_cg_legal_request. In my Flow Designer flow, I’m using the ‘Get Attachments on Record’ action to retrieve attachments from records in this table. However, the action is consistently returning a count of 0 attachments, even though the record definitely has files attached.

This issue seems to happen only for this custom table. It works fine for standard tables like incident.

Is there something specific I need to configure for the custom table to make this action work? Any help or insights would be appreciated.

Thanks!

 

Anandini_0-1746456255991.png

 

Anandini_1-1746456308387.png

 

Anandini_2-1746456399263.png

 

1 ACCEPTED SOLUTION

Aditya02
Tera Guru

Hello @Anandini ,

 

File name Data type: String

Search string containing a partial or entire file name of an attachment file. You can use this input as a query filter to find one or more attachments that have the listed file name. If you leave this input empty, the action returns all attachments associated with the source record.

Here, Check weather the file exists or not with the name you are giving. I think there is no file exist with that name thats why It was returning as zero. If you want all the attachment to retrieve You have to left as empty.

 

You can refer this article: Get Attachments on Record Action 

 

If My suggestion helps to get out of this issue, please mark it as the answer and hit the thumbs-up to help others find it too!

 

Thanks & Regards,

Aditya

 

View solution in original post

11 REPLIES 11

Ankur Bawiskar
Tera Patron
Tera Patron

@Anandini 

Since it's a custom action check what's configured inside it and fix that

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Brian Lancaster
Tera Sage

I just tried by creating a custom table with the same name and it worked fine. Maybe try deleting the action from your flow and add it back.

BrianLancaster_0-1746468878876.png

BrianLancaster_1-1746468891032.png

Edit: Also did you have it you have anything in the file name field. I left mine blank but you cannot really tell from the screenshot.

 

hello @Brian Lancaster ,

I followed the same steps as you did, exactly as shown in your screenshot. However, I’m still getting a count of zero attachments. I tested it with a Word file—can you let me know what file type you used? Everything seems to be the same, but it's not working on my end.

I had png files attached. I just added a 3rd file attachment of a word document and I'm getting a count of 3. I'm doing this in my PDI which is on Xanadu Patch 4a.

Edit: It may be time to open a case with Now Support. I also added a attachment type field and added an attachment there. I still got the proper attachment count?

Hello @Brian Lancaster ,

Thank you for your suggestion. We will try be creating a case.. My Instance is in Yokohama.. If possible can you check and let me know if its working in Yokohama or not..

 

this may helps me alot.