Same header names but different column numbers.. How do I get the right data?

Hello there, I’ve tried a lot and I just can’t get it right.

I have for example, 3 different CSV files and they all have the same header names but the columns are not in the same place. So for example:

CSV #1: firstName, lastName, phone, email, linkedinURL

CSV #2, firstName, lastName, email, phone, linkedinURL

CSV #3, firstName, lastName, email, linkedinURL, phone

What I want to do this to search for the data that’s under the right header and somehow convert the files to have the data in the right format.

So it’s any CSV, looks for the headers and the values beneath it and then posts it to the right format. Like this:

Action: I upload any of the 3 CSV’s mentioned above

Action: It searches for the right data

Action: It always spits out the CSV in the following format: phone, email, firstName, lastName, linkedinURL

Is there any way I can do this?

Please help me out!

Hi. You can store the data in datastore and let all CSV data in the same table form. So you can use it in any flow later.

If you need additional support, please don’t hesitate to reach out.


Thanks for your quick reply.

I’m not sure what you mean. Because for example:

in CSV #1: column1 = firstName, column2 = lastName, column3 = email

but in CSV #2: column1 = email, column2 = firstName, column3 = lastName

If I store in a Data Store, it asks me to select a field from the parsed CSV.


As you can see in this picture. I parsed the CSV data, and now I have “Column 1” and “Column 2” etc etc. But the headers of those columns could differ. So for instance in one CSV column 1 could be “firstName” and in another CSV column 2 could be “firstName”. The question is: How do I filter on the values under the headers that I specify?

I hope this makes sense.

Dear, if the fields are differents in every csv you will not be able to map it. Mapping in save it in the datastore allow you have an unique data model for all CSVs in a table.

If you need additional support, please don’t hesitate to reach out.


Hey @Leon_Botzen ,

Everything is possible, as long as you are looking in the right direction :wink: However the question is; is the time and effort you might put into this worth it?

What you could do, is use AI to analyze the columns and properly map each field. These days you have the OpenAI which is very powerfull and this AI is also used by the new chatGPT. I have already seen great things happening with ChatGPT and I can imagine it could also do this:

Again, the question is if it’s worth it . We have build AI systems for our clients already and this is working great since it’s getting way more powerfull. However you need to have a very good use case for a profitable ROI.

1 Like