twenty
twenty copied to clipboard
Add CSV import for any object
What we want
We had previously built a feature to import a CSV or spreadsheet of companies/people directly into Twenty. This feature is live and works well, but since then we have moved to a generic framework where object names and properties are abstracted and driven by the backend. Users can now create any type of object.
The CSV import feature was not refactored does not rely on the new metadata framework. Therefore it's not possible to import a custom field via the csv import. Or to enable the import feature on custom objects.
See:
- https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/companies/hooks/useSpreadsheetCompanyImport.ts
- https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/people/hooks/useSpreadsheetPersonImport.ts
We need to abstract these two files on a single generic hook that takes the object name as parameter, and map the according fields (probably retrieved though useObjectMetadataItem - tbc).
Screenshots
This is the current state of the product. Nothing would really change from a UI perspective even though this is a frontend ticket. But we need to have the "options > import" button on every object, including custom objects. And during field mapping we will now see every custom field, not just the standard pre-created fields .
Hey @FelixMalfait, @charlesBochet I really want to take this up? Can I, please?
@mustajab-ikram yes obviously that would be fantastic! thanks
@mustajab-ikram Are you working on this? If not, maybe I can take this up.
This is a relatively though one, quite a lot of abstraction needed to make this work elegantly! (e.g. complexity with full name = first name + last name). @mustajab-ikram did you give it a try already?
@quest-bot stash 250
New Quest!
A new Quest has been launched in @twentyhq’s repo. Merge a PR that solves this issue to loot the Quest and earn your reward.
Loot of 250 USD has been stashed in this issue to reward the solver!
🗡 Comment @quest-bot embark to check-in for this Quest and start solving the issue. Other solvers will be notified!
⚔️ When you submit a PR, comment @quest-bot loot #3247 to link your PR to this Quest.
Questions? Check out the docs.
@quest-bot embark
@brendanlaschke has embarked on their Quest 🗡
- @brendanlaschke has been on GitHub since 2019.
- They have merged 76 public PRs in that time.
- Their swords are blessed with
JavaScriptandHTMLmagic ✨ - They have contributed to this repo before.
Questions? Check out the docs.
🧚 @brendanlaschke has submitted PR https://github.com/twentyhq/twenty/issues/3756 and is claiming the loot.
Keep up the pace, or you'll be left in the shadows.
Questions? Check out the docs.
Quest solved!
Congratulations! Your efforts have paid off. A PR that solves this Quest has been merged.
@brendanlaschke, you have been victorious in Quest #3247 🗡
💰 To claim your $250 reward follow instructions here
🧚 Thanks to all bold adventurers for attempting this quest! Sign-up to Quine.sh to access more exciting Quests like this one ⚔️
This Quest is now closed ✨
Questions? Check out the docs.