Set Date for each entry


this is my first post here. Hello first of all together!

we have a file that we receive daily that contains stock levels of items. Unfortunately, there is no date noted in the file.
This is in the file name. Now we would like to set for each entry, the date to be able to write it to a database.

However, only the first entry is always provided with the date. (We have already solved the formatting of the date from the file name)

I think we need a loop or something similar. But then how do we always address the next item and also know when it ends.

We currently have over 800 files with increasingly larger content.

We use the version 0.182.0 self-hosted.

Glad to hear opinions. If you still need info. Just let me know.

Thanks already once =)

Hey @Eric_Hoetzel,

Welcome to the community :cake:

Can you share the workflow JSON and the file you are using or maybe just the first 5 lines. With data looping n8n will automatically loop the results for most nodes so you don’t need to but if you wanted to make a manual loop you can use the Split in Batches node.

This page has a bit more info on looping that could be useful for you: Looping - n8n Documentation

Hi @Jon ,

thank you for your quick feedback.

All built the same way. I just had to take out the live data and rename it slightly.

ean stock_location_id stock_location_name status amount
1234567891234 423423-423423423-2fdsw3235-3423scd Mönchengladbach offerable 2
1234567891234 423423-423423423-2fdsw3235-3423scd Mönchengladbach non_offerable 0
1234567891235 423423-423423423-2fdsw3235-3423scd Mönchengladbach offerable 6
1234567891235 423423-423423423-2fdsw3235-3423scd Mönchengladbach non_offerable 0
1234567891236 423423-423423423-2fdsw3235-3423scd Mönchengladbach offerable 6
1234567891236 423423-423423423-2fdsw3235-3423scd Mönchengladbach non_offerable 0

I share the first time on the way the data. I hope you can work with it.  :sweat_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.