Folder listing and data mapper

Hi

I have a flow with a folder listing followed by a mapper. What do I need to do to get it to run the mapper for each file it finds in the folder listing as currently it just runs whatever was in the original pickup node

Also how do I get it to just repeat the mapper for every file and once it’s done the mapper then do a data get for all the records and run the template etc once

Is there a reason why you are using a folder listing instead of a folder capture?

Folder capture doesn’t have an input so how would I trigger it?

The way we run jobs is we pickup the files from the SFTP and then place them into a “JobBag” which is a folder with a unique number. We then put the files into a “original files” folder and a “processing folder”. We then run the mapper for all the files in the processing folder

Then you’ll need to use a split node that will act as a loop.

How about moving the files to the respective job bag folder under a watched folder. Setup the folder capture node to only capture .trigger files. After writing all incoming files add a file with a file dummy file with the .trigger extension

The debug/test flow in the Commingling Sample is doing that and is inspired by Workflow techniques. You can import that flow via: Menu (upper right corner) > Import > Examples > @objectif-lune/node-red-contrib-connect/create paginated content/commingling.

Erik