1

Just wondering whether it' s possible to upload a CSV file with contacts information in it to my Gmail account?

I already looked at the Google Data API. it only allows you to add one at a time. Is there a bulk import ?

kakopappa
  • 5,023
  • 5
  • 54
  • 73

3 Answers3

1

a picture that shows the very thing the question asks

What are you asking exactly? GMail has it right there inside gmail. Must you do it from the data protocol ONLY?

jcolebrand
  • 15,889
  • 12
  • 75
  • 121
1

My mistake, I found a method called Batch inside ContactsRequest class

               newContact.Title = name;
               newContact.Name.FullName = name;

               EMail primaryEmail = new EMail(email);
               primaryEmail.Primary = true;
               primaryEmail.Rel = ContactsRelationships.IsWork;
               newContact.Emails.Add(primaryEmail);

               newContact.BatchData = new GDataBatchEntryData();
               newContact.BatchData.Id = i.ToString();
               newContact.BatchData.Type = GDataBatchOperationType.insert;
               i ++;
               list.Add(newContact);

And then

           cr.Batch(list, new Uri(f.AtomFeed.Batch), GDataBatchOperationType.insert);
kakopappa
  • 5,023
  • 5
  • 54
  • 73
0

If it's not in the API then the answer's probably "no". But it';s wouldn't be hard to write a script to parse the CSV file and call the API to import each contact in turn.

Andrew Cooper
  • 32,176
  • 5
  • 81
  • 116