Is it possible to add a blank line after each item in a csv?

Hi friends,

I have a curious situation where I need to import a CSV into an accounting software that is an offline windows application. The CSV has a specific format for importing invoices through a .txt file.

For it to be able to differentiate between invoices, it needs to have a blank line in between the items.

The CSV that is exported via n8n doesn’t have an option to do this, I was wondering if anybody could think of a way to achieve this result? I’ve been trying for a few days and can’t make it happen.

This is what n8n exports:

Inclusive,Inc-Tax Amount,Date,Amount,Account #,Job,Customer PO,Co./Last Name,Invoice #,Description
TRUE,0,02-12-2022,1100,41100,7464 - 05 Section J report ,7464 - 05 Section J report ,CFA,000025555,7464 - 05 Section J report
TRUE,0,02-12-2022,191.13,41100,7857 - 05 Construction Documents,7857 - 05 Construction Documents,DJC property Group Pty Ltd,000025554,7857 - 05 Construction Documents
TRUE,1320,01-12-2022,1320,41100,5166a - 09 Variation - NBN Drawings ,5166a - 09 Variation - NBN Drawings ,Leicester Street Pty Ltd,000025429,5166a - 09 Variation - NBN Drawings

This is what the accounting software can import:

Inclusive,Inc-Tax Amount,Date,Amount,Account #,Job,Customer PO,Co./Last Name,Invoice #,Description
TRUE,1320,01-12-2022,1320,41100,5166a - 09 Variation - NBN Drawings ,5166a - 09 Variation - NBN Drawings ,Leicester Street Pty Ltd,25429,5166a - 09 Variation - NBN Drawings

TRUE,0,30-11-2022,550,41100,6124a - 05 Construction Documents,6124a - 05 Construction Documents,Shaq City Pty Ltd,25431,6124a - 05 Construction Documents

TRUE,0,30-11-2022,2750,41100,7092 - 05 Section J report,7092 - 05 Section J report,Charlie Schembri,25532,7092 - 05 Section J report

Super thank you!

Hi @Seena_Wardi

There is a few options. easiest one is probably to make sure to process all invoices one by one in the workflow and then append an empty item after each invoice. This can be done by using a set node without any data filled in and merge node to append it to the normal path.

Hey @BramKn

Thanks for your reply.

I gave it a shot and now end up with , on the new line. I tried to import but since the line is not blank, the accounting software still sees it as one connected item.

You mentioned there’s other ways?

Results:

invoiceNumber,date,status,invoiceAmount,dueDate,
,

Was not expecting that output. But does make sense of course.
You will need to use a function or something like that to fix it I guess. Shouldn’t be to big of a deal, but don’t have time now to play around with it for ya.

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