The CreatorCon Call for Content is officially open! Get started here.

Servicenow - Sending file to Mid server

Romualdo Mendes
Tera Contributor

I'm in a project where I need, through MIDSERVER, to fetch a file from a physical server and bring it into my servicenow instance, as soon as MIDSERVER performs this task of bringing this file, I need to create a flow to get this file and look for it in the base to find out if this file exists and if so updates and otherwise create this file in the base.

I would like help first on MIDESERVER and second on building the flow.

2 REPLIES 2

jMarshal
Mega Sage

One thing you will need to know/consider -- ServiceNow MID servers don't have the ability to "fetch" from another server inherently. MID servers do file importing, but it is manual/scheduled or via data source (via specific configurations).

MID servers do have other capabilities that would "act like import" (all by themselves) -- but they are specific. For instance, Discovery "imports" data to the instance...but specific data (CIs) to a specific place (CMDB).

This might help - How to import a CSV file from a MID Server - Support and Troubleshooting (servicenow.com)


simonezini
Mega Sage

Hi @Romualdo Mendes 

I think it would be better to fetch that file using a powershell script (if you prefer, loaded into the MID server) and have it running once a day/hour/minute, related to your needs.


Through this powershell script you could get the file and pass it to a ServiceNow instance using API (see docs here on how to post an attachment to a specific record: Attachment - POST ).

You can attach it to a record on sys_data_source table for example, and then create a Scheduled Import that load that specific data source right after your file has been attached to it.

 

It's quite a lot of "puzzle pieces" to put together, but it should work correctly. I don't suggest this method if you need to always check for that file every minute or second, but if it is once an hour it should be ok.

 

Regards

Simone