Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to attach file from a local machine to a particular record.

Vishal_Jaiswal
Mega Guru

My local machine folder(Documents) has a list of attachments with different types like PDF, JPG, etc.

The attachment file name starts with incidentNumber_fileName. For example: INC123456_users.pdf.

Requirement: I have to attach these attachments to their corresponding incident. How to do this?

14 REPLIES 14

Hi @Ankur Bawiskar ,

 

Let me explain the requirement in more detail:

Requirement:

  • Open File Explorer on your computer and navigate to a Network Folder.

  • Inside, there is a folder named Attachments, which contains hundreds of files in various formats (PDF, JPG, CSV, Excel, etc.).

  • Each file name follows the format:

     
    incidentNumber_fileName

    For example: INC123456_users.pdf

From the file name, we can identify the incident number. The goal is to attach each file to its corresponding incident in ServiceNow, based on the incident number in the file name.

This process should continue until all attachments in the folder have been processed.

@Vishal_Jaiswal 

not possible.

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

@Ankur Bawiskar Actually this is possible through MID server, PowerShell script, and ecc event queue. So, can you please help if you have an idea how to proceed?

Hey @Vishal_Jaiswal ,

 

Did you go through my previous post, check out if that helps.

 

For the last link copy, paste in search bar of browser. It has detailed steps.

 

Thanks,
Bhimashankar H

@Vishal_Jaiswal 

yes this is possible, but only if the desktop is a mid server.

you will have to write mid server script include or powershell script to fetch

How to import a CSV file from a MID Server 

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