T
Twenty2mo ago
Dream

Import csv questions

Good day. Is there any way to import a csv in such a way that seperate columns are used at the same time for a single field? Like, I have 2 columns in a csv "First name" and "last name". This is how it is generated from source. Can I use this somehow to assign both together to a "name" field on Twenty? I also need to import CSV's automatically once it's added to a folder. I was thinking a watcher script to monitor a folder on linux. Once added, file is detected. Is there a way to start the "import" function so that the CSV content is added automatically?
16 Replies
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
About 2 columns, yes, it's possible
No description
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
About automatic adding, you can use REST or GraphQL API for that and some programming language like Python https://twenty.com/developers/rest-api/core#/operations/createOnePerson Just be aware that import can handle up to 20k records in 1 file, more than that and it's only problems
Dream
DreamOP2mo ago
Ah. I see that works on the pre created "person" tab that you get along with the freshly created instance of Twenty. I can't recreate this field in a custom data model? I won't be doing more than 1 person per CSV file, as the forms input webpage sends the csv per person.
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
Just an idea, what if your app skipped saving to CSV and directly called Twenty's API? You can as long as field has "Full name" type
Dream
DreamOP2mo ago
Maybe in the future. For now I'm focusing on getting only the basics set up and then move onto more advanced features. Keeping as much of the original system active as possible Thanks for all the help! I'll try those out and see how it goes
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
No problem, if you encounter any problems then let me know
Dream
DreamOP2mo ago
Is there any way to make REST create any missing fields, if the CSV includes a column that isn't already created as a field?
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
I think it's possible using endpoints from Metadata group but I'm not sure how exactly it works https://twenty.com/developers/rest-api/metadata#/operations/createOneField
Twenty.com
Open Source CRM
charles
charles2mo ago
Thanks a lot @bob for the accurate answers!
Dream
DreamOP2mo ago
YES! Bob's been awesome!. Thank you @bob Another silly question. I added a bunch of fields to the People section. Is there any way to reorganize the default layout of the fields? Some fields are 2-3 seperate fields but all contain related data. I don't see any way to move them The API is awesome BTW
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
Where? In records tab or when sending request via API?
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
If in records, you have to click Options > Fields and you can drag fields
No description
Dream
DreamOP2mo ago
Ah that's neat, but not quite right. Once you click on a person, for example. How do you change the order on the left side Seems to be alphabetical. But i have something things that arent alphabetical but would be best if they are next to each other
Dream
DreamOP2mo ago
this
No description
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
Ah, no, sadly not
ɃØĦɆᵾS
ɃØĦɆᵾS2mo ago
It sorts fields alphabetically in some way (like on screenshot below) but you can't change the order
No description
Want results from more Discord servers?
Add your server