CSV Import Problems - 4.2.1

braindump
braindump
Community Member

I noticed in the most recent release (4.2.1), "Improved import from CSV" was listed under Tweaks in the release notes [1].

No matter what I do, I am unable to successfully import login entries from a CSV file into 1P... all line items in the import file are always added to a single Login record. I've followed the advice regarding well-formatted CSV data on the "How can I import data from another application?" User Guide page [2], but cannot get any better results.

Is there a definitive process, or a template CSV file I can use to successfully import login records from a CSV file?

[1] https://app-updates.agilebits.com/product_history/OPM4#webstore

[2] http://learn.agilebits.com/1Password4/Mac/en/KB/import.html

Comments

  • sjk
    sjk
    1Password Alumni
    edited April 2014

    Hi @braindump,

    I'm sorry you're having trouble getting 1Password to import your CSV data.

    The CSV file should have CR+LF or LF newline (line break) character(s). Give "DOS-style" CR+LF newlines a try, which you can convert to (if necessary) using the LineBreak GUI utility:

    It may also help if the CSV file uses UTF-8 character encoding:

    • Open the .csv file with TextEdit and select File > Save As… (Option-Shift-Command-S)
    • In the save dialog window:

      • If necessary, change Plain Text Encoding to Unicode (UTF-8)
      • Use a new name like import-utf8.csv as the Save As filename
    • Confirm Use .csv when saving the new file

    Also try a "divide and conquer" strategy to isolate problems in your input file. For example, first try importing just the first few lines of the file. If that fails it may be a general issue. If it succeeds, then try importing half of the input file. If failure, then half of that. Etc.

    Surrounding fields with double-quote (") characters can help. There might be special characters that need some attention, especially in password fields. If a field contains double-quote characters use a second double-quote to quote it. For example:

    "this is my quoted "" character in the field"

    Finally, if you can create a redacted sample input file that fails to import we can take a look and help you find a solution.

    I hope that information is useful for successfully importing your data. Please let us know how it goes and if you need any more help; we'll be here. :)

  • braindump
    braindump
    Community Member

    Thanks, I'll try this.

    Regarding properly mapping field names, is the primary label of a record always Title, regardless of record type?

    Also, when mapping data to fields based on the field label in a new 1P record for a particular type, are field names case sensitive?

    Thanks!

  • sjk
    sjk
    1Password Alumni

    Hi @braindump,

    The first column (field) of each CSV record will always be used as the item Title in every import category (Login, Credit Card, Software, Secure Note).

    All labels for extra imported fields (beyond the built-in labels/fields) are fixed Field # names, appearing as custom fields under the Other Fields section of the item, e.g.:

    The CSV importer currently doesn't support including custom labels for those custom fields.

  • braindump
    braindump
    Community Member

    OK, got this to work. The CSV file format (CRLF/UTF-8) seemed to be the issue.

    One thing I noticed is that the order of fields in the CSV files needs to be different from the order of fields in the Login record. For example, the (top-down) order of fields in the Login record are:

    Title, username, password, website, then other fields (Field n).

    To properly map imported data into these fields, the order of the CSV file needs to be:

    Title, website, username, password, then other fields (Field n).

    Not very intuitive, but workable once you figure that out.

    In any case, it works now, so thanks for your help!

  • sjk
    sjk
    1Password Alumni

    Hi @braindump,

    It's great to hear you've got importing working. Thanks for your feedback and letting us know what the issue seemed to be.

    The CSV input column (field) order for Login items mentioned in the import guide is:

    "title","location","username","password","notes"

    4.2 extends that to be:

    "title","location","username","password","notes","custom1","custom2","customN",…

    When we update the guide it might be clearer using field label names that match those in the actual item, e.g.:

    "title","website","username","password","notes","field 1","field 2","field n",…

    If you have other issues or suggestions please let us know. Thanks!

This discussion has been closed.