Help

Script to get data from within a csv file in an attachment

Topic Labels: Automations
Solved
Jump to Solution
128 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Thierry_Gattlen
6 - Interface Innovator
6 - Interface Innovator

Hello the community,

I want to write a script which will read the data from a csv file which is in the attachment field "doc"  in the table "fileImport"
The csv has 4 columns:

Nom,Ligne,Jour,Valeur

here is an example of the data:

Nom,Ligne,Jour,Valeur
Bornet Marc,AL / ASD,2024-04-01,2
Doe John 85%,AL / ASD,2024-04-01,17

I want to parse all data and to create/update/delete records in the table "Planning" and writing the data in the appropriate field:

Nom,Ligne,Jour,SV 

how can I do such a script

 
1 Solution

Accepted Solutions

Thank you for @ScottWorld for your answer.

Going via Make is not possible because the CSV is behind a VPN. I have succeeded in making this script with the help of Chat GPT. The problem now is to put the CSV in Airtable using the API... which seems to be complicated.
To solve this, we are writing the content of the CSV in a long text field and parse it. It is working very fine.
Thanks for your help.
Thierry

See Solution in Thread

2 Replies 2

Sorry, I don’t know scripting, so I can’t help you with your specific request. Hopefully, someone else will be able to help you with writing a script below.

In the meantime, while you’re waiting for other people to chime in below, if you are interested in doing this in a no-code way that doesn’t require writing any programming code at all, you can do all of this with Make’s CSV automations and Make’s Airtable automations.

I give an entire demonstration on parsing CSV files into Airtable by using Make on this episode of the BuiltOnAir podcast.

If you’ve never used Make before, there is a bit of a learning curve, so I’ve assembled a bunch of Make training resources in this thread. For example, here is how you would instantly trigger a Make automation from Airtable. I also give live demonstrations of how to use Make in many of my Airtable podcast appearances here. For example, I show how to work with attachment fields in Make in this video, which may be helpful for you.

Hope this helps! If you’d like to hire an expert Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld 

Thank you for @ScottWorld for your answer.

Going via Make is not possible because the CSV is behind a VPN. I have succeeded in making this script with the help of Chat GPT. The problem now is to put the CSV in Airtable using the API... which seems to be complicated.
To solve this, we are writing the content of the CSV in a long text field and parse it. It is working very fine.
Thanks for your help.
Thierry