Populate queue from attached file

Laura_Martinez
Kilo Guru

Hi All,

I must populate an RPA queue with the data from an excel file attached to an incident. To achieve it I'm using a flow with two custom activities, this is the flow:

Laura_Martinez_0-1696535193755.png

Laura_Martinez_1-1696535205390.png

This is the script for the "Load Data Source into Import Set" activity:

Laura_Martinez_2-1696535953831.png

It has the data source reference as input and the import set sys_id as output.

 

This is the script for the "Load Data Source into Import Set" activity:

Laura_Martinez_3-1696536175273.png

It has the import set sys_id and the transform map reference as input.

 

When executing the flow, it creates a data source with the file attached to it, but the import set is created empty (without a single row) and the transform map doesn't run; however, if I manually load the rows from the data source (by clickng "Test Load 20 Records") and transform the import set all the data is populated as expected in the queue.

 

The import set has a different short description when is created by the custom activity (blue square) and when is created by clicking "Test Load 20 Records" (red square):

Laura_Martinez_4-1696536756988.png

Does anyone know what I'm missing?

1 ACCEPTED SOLUTION

Laura_Martinez
Kilo Guru

I've found the solution šŸ˜Š.

 

So, for the "Load Data Source into Import Set" custom activity, I have the data source's sys_id as input variable and the import set's sys_id as output variable. This is the fixed code:

 

Laura_Martinez_2-1697141073142.png

And for the "Run Transform Map on Import Set" custom activity, I have the import set's sys_id, from the "Load Data Source into Import Set" activity, as input variable. This is the fixed code:

Laura_Martinez_3-1697141335259.png

I tested it, and it processed a file with 7329 rows in 4.5 minutes.

 

Hope it could be useful for someone else šŸ˜‰.

View solution in original post

3 REPLIES 3

varadhi
ServiceNow Employee
ServiceNow Employee

Hi 

 

Please find the example below.

 

Create a flow to retrieve the incident record's 'Sys_Id' and download the Excel attachment from the studio. Refer to the screenshots below for reference.

 

varadhi_0-1696932025495.png

 

varadhi_1-1696932025498.png

 

varadhi_2-1696932025501.png

 

Find the screenshot below that demonstrates how to push data into a queue.

 

varadhi_3-1696932025511.png

 

 

 

 

 

Hi Varadhi,

 

Thanks for replying, yes, it could be a solution, a good one, by the way, anyways, the process uses files with a large amount of rows (sometimes above 8000); if I use a dispatcher robot, it will increase the processing time due to the amount of queues items that should populate.

 

Cheers.

Laura_Martinez
Kilo Guru

I've found the solution šŸ˜Š.

 

So, for the "Load Data Source into Import Set" custom activity, I have the data source's sys_id as input variable and the import set's sys_id as output variable. This is the fixed code:

 

Laura_Martinez_2-1697141073142.png

And for the "Run Transform Map on Import Set" custom activity, I have the import set's sys_id, from the "Load Data Source into Import Set" activity, as input variable. This is the fixed code:

Laura_Martinez_3-1697141335259.png

I tested it, and it processed a file with 7329 rows in 4.5 minutes.

 

Hope it could be useful for someone else šŸ˜‰.