У меня большой класс, и я не могу все это вставить, вам нужно как-то собрать это вместе
шаг 1)
получить все группы (http://raiyaraj.wordpress.com/2008/09/17/gmail-gdata-contacts-group-via-proxy/) и найтиидентификатор вашей группы или создайте его (вы можете сделать это с помощью Zend Framework), если он не существует
шаг 2)
сгенерируйте xml
// create new entry
$doc = new DOMDocument();
$doc->formatOutput = true;
$entry = $doc->createElement('atom:entry');
$entry->setAttributeNS('http://www.w3.org/2000/xmlns/' , 'xmlns:atom', 'http://www.w3.org/2005/Atom');
$entry->setAttributeNS('http://www.w3.org/2000/xmlns/' , 'xmlns:gd', 'http://schemas.google.com/g/2005');
$entry->setAttributeNS('http://www.w3.org/2000/xmlns/' , 'xmlns:gContact', 'http://schemas.google.com/contact/2008');
$doc->appendChild($entry);
...add various stuff....
$name = $doc->createElement('gd:name');
$entry->appendChild($name);
$fullName = $doc->createElement('gd:fullName', $this->name);
$name->appendChild($fullName);
.....
$group = $doc->createElement('gContact:groupMembershipInfo');
$group->setAttribute('deleted' ,'false');
$group->setAttribute('href' ,'http://www.google.com/m8/feeds/groups/' .urlencode($this->email) . '/base/'.$this->group_id);
$entry->appendChild($group);
шаг 3)
подключитесь к gmail и выполните запрос
$service = $this->service;
// perform login and set protocol version to 3.0
$client = $service;
$gdata = new Zend_Gdata($client);
$gdata->setMajorProtocolVersion(3);
$entryResult = $gdata->insertEntry($this->getXML(), 'https://www.google.com/m8/feeds/contacts/default/full');
return $entryResult->getLink('edit');
обратите внимание, что вы возвращаете ссылку для редактирования, чтобы при ее сохранении вы могли обновить контакт или проверить наличие изменений