Hi @nickas123 ,
We need to get the file content by rest api like following code first
133042-sample.txt
Then we can read the file line by line. So we need to confirm is each line contains one column name and column type,and the index of them for us to retrieve and traverse and split them out.
We can complete this step by javascript.
Finally we can use rest api to create new columns with column names and types retrieved by js refer to following link
https://www.codesharepoint.com/rest-api/create-list-column-in-sharepoint-using-rest-api
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.