Add Gmail/Outlook CSV contact import and export - #464
Merged
Conversation
CSV import now auto-detects Gmail's and Outlook's contact-export header shapes and remaps them onto Sourcerer's own columns before the existing import logic runs. Export gains two new formats (alongside the native CSV/Excel and vCard options) that write directly importable Gmail- and Outlook-shaped CSVs, for both the All Contacts and per-project views. Closes #463 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…mport fields - Gmail CSV import mapping was wrong for the current real-world schema (First Name/Last Name + unprefixed Organization Name/Title, not the Given/Family Name + "Organization 1 -" variant originally assumed). Both variants are now supported, verified against Google's own current import template. Outlook import now also picks up "Personal Web Page". - Gmail export now dynamically widens E-mail/Phone/Website columns to fit the widest contact in the batch, instead of a fixed 2-slot cap, matching Google's genuinely unbounded numbered-column schema. - Outlook export now fills all of Outlook's real fixed slots (3 emails, 6 phone types, 2 web pages) rather than an arbitrary 2-slot cap, since Outlook's schema has no room to expand beyond its named fields. - Import now reports which source columns carried data but have no home in Sourcerer's contact model (addresses, spouse, custom fields, etc.), surfaced as a note in the post-import summary modal. Type/Label companion columns are excluded from the report since they're just qualifiers on data that was imported, not distinct dropped information. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First Name/Last Name, unprefixedOrganization Name/Organization Title, numberedE-mail N - Value/Phone N - Value/Website N - Value) and an older export variant (Given Name/Family Name,Organization 1 - Name/Title). Verified against Google's own current contacts import template.First Name/Last Name, up to 3 emails, 6 phone types,Web Page+Personal Web Page. Verified against a real Outlook contacts export.E-mail N - Value/Phone N - Value/Website N - Valueto fit however many the widest contact in the export actually has — nothing is dropped, matching Google's genuinely unbounded numbered-column schema.Phone 1 - Type) are excluded from that note since they're just qualifiers on data that was imported.YYYY-MM-DD), Google's year-unknown form (--MM-DD, discarded), and Outlook'sM/D/YYYY.Test plan
npm run typecheckpassesnpm testpasses (547 tests), includingsrc/test/csv-format-detection.test.ts(Gmail/Outlook detection, both schema variants, dropped-field reporting, end-to-end import) and cases insrc/test/export.test.ts(Gmail/Outlook export shape, dynamic widening, fixed Outlook slots)Closes #463