Transform script vs Flow Designer

Dazler
Mega Sage

Hi,

 

I was hoping to get some advice.  I have been tasked with accepting an inbound email with an attached csv on a weekly basis that will be modifications for a certain table.  I built 2 ways to retrieve the results that I need, but I wanted to confirm which one would be the best approach.

 

The csv spreadsheet can range between 100 - 3000 records at a time.  It depends on the week.

 

My first process was through using an inbound action and Transform script.  Which means I had to script out the entire process.  

 

The second process was through Flow Designer.  I triggered the Flow off the inbound email, then I retrieved the attachment from the email, created a data source record, and then loaded the data from the csv into an import set so that I can easily configure the data before moving it to a specific table.  In order to configure each line on the csv, I had to do a look up of records from the import set table where the data was loaded, then set the max results to 5000 (just to give me space) and then use a foreach loop to loop through the records.

 

I found the second process to be much more simpler, but I wanted to know if doing it this way causes any issues down the line.

 

Any advice would be appreciated.

 

Thank you

7 REPLIES 7

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

Yeah, that is where you would traditionally use a transform script, and that's what would probably be my go-to solution as well. But I appreciate that if you want to make it really now-code (low-code?) then FD might be better. Really curious about performance though. At the end of the day, I believe the transform script and the for loop would pretty much do the same thing... (as the transform script also runs on every source record).

Nick78
Tera Contributor

Are you doing this all in Flow Designer without manual intervention? I'm curious how you trigger the the Transform to run in Flow Designer or if you are doing that part manually?

Hi Nick,

 

We actually don't use the transform.  Instead we use the import set table data within Flow to do all the manipulation of the data we need.  The main goal was to get the data loaded into the import set table.