Why is it so hard to periodically import Files from within the local network?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2025 05:08 AM
Hi everyone,
I struggle with this and I can't believe I'm the only one.
I need to periodically import different files into various CMDB tables from the internal network (via MID), and all the available methods feel like ugly workarounds. I haven't found an out-of-the-box solution for this!
Currently, I utilize a scheduled action that runs a PowerShell script on the MID every night to grab an Excel file from a shared location and add it to a data source via the Attachment API. In the data source, I have a "custom load by script" to use only the latest version on load and delete all other uploads to that data source. I need to do this because the OOTB REST Attachment API has no "overwrite" function, and I don't want to give "delete" rights to that API user.
Overall, it feels like a horrible hack and it's not possible to understand what's going on just by looking at the data source.
I've found workarounds where people do this via discovery patterns, with all kinds of custom scripts, etc. None of them "feel" like good solutions; they all seem like "hacks" in my opinion.
What we need is a "File retrieval method" in a data source with, let's say, "SMB via MID," where you can point to a UNC path and the whole process runs via the MID-Server. Additionally, the FTP or SFTP connections are all "Instance -> Endpoint" connections, and you cannot point them to a local network SFTP server via MID. Or give us something like the IntegrationHub types in the data source where we can use our own actions, and not only rely on SOAP/REST/DataStreams as request sources.
How do you handle this? I think it's a total mess.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2025 05:19 AM
Unfortunately this doesn't come OOB.
the only way is to use some powershell command which runs on mid server and fetches it
OR
you will have to write mid server script include which uploads file to data source
Can you please share your configuration details?
In flow designer there are steps to fetch file from sftp or ftp
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2025 05:27 AM - edited ‎01-29-2025 05:29 AM
I have no problem with this, my soluton works.
But as i said, it feels like a hack, the script includes, the patterns, the powershell steps.... there are probably 8 different solutions to the problem, and all are "hacks", it's ridiculous....
I'm just here to vent....