2025 Oct 06 4:40 PM
Hi Experts,
I have an SFTP Sender Adapter configured in SAP CPI (Integration Suite) to pick multiple files from a folder. The file names start with a specific prefix — for example, "XYZ*" (e.g., XYZ_001.txt, XYZ_002.txt, etc.).
The current behavior:
Each file picked by the SFTP sender is processed separately and sent in individual emails through the Mail Receiver Adapter.
Expected behavior:
I want to collect all the files picked in one polling cycle and send them together in a single email, with each file attached separately in that one email.
Question:
How can I achieve this in CPI?
Is there any standard configuration or known pattern (like a Gather or Aggregator) that can be applied for this scenario?
If using an Aggregator/Gather step, how can we ensure all files picked in a single poll are aggregated before sending the email?
Any pointers or example iFlow design would be really helpful.
2025 Oct 06 6:37 PM
If the files were zipped this would be possible, but individual files are processed as individual messages as one would expect.
2025 Oct 07 10:30 AM
Hi @AGAS82
I have seen in one of the scenarios an external consultant delivered to us to use the "Poll Enrich" pattern. I have no idea, if this will work for your scenario - in our scenario we have read exactly two folders following two different folder names and merged them together:
Would be nice if you can share if your challenge worked with this pattern. I could imagine you start the process with a timer event (not SFTP poll timer!) and then polling will merge all payloads?
BR Helmut
2025 Oct 07 11:51 AM
Hi @helmut_skolaut3 - Thanks for the reply. Isn't the concatenate algorithm will combine tow files into one and then the mail adapter will send that combined file as one attachment in my scenario? My requirement is to send both files separate as two attachments in one email.