Announcement

Collapse
No announcement yet.

How to push Contacts to google Contacts Automatically

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to push Contacts to google Contacts Automatically

    Hello Friends,
    I am using google Integration extension to integrate my google account. I have more than 10000 Contacts In espo crm I have to push all contacts to Google Contacts . Till now i am pushing all contacts to google Mannually by Push to Google Button. Nowi want to push all contacts automatically to google . Please Help
    yuri

    Thanks in Advance

  • #2
    Hi,

    To select absolutely all contacts at once, click in the upper left corner (right next to the Name field) on the small inverted triangle next to the empty checkbox and select "Select All Results". I'm attaching a screenshot.

    Comment


    • #3
      We make hook to push contacts after any save.

      PHP Code:
      public function afterSave(Entity $entity, array $options = array())
      {
      $this->pushContact('102',$entity->id); // '102' is the espoId of the user authorized in google
      }

      public function 
      pushContact($userId$contactId)
      {
      $user $this->entityManager->getEntity('User'$userId);
      $this->applicationUser->setUser($user);

      $googleContacts $this->serviceFactory->create('GoogleContacts');
      $pushResult $googleContacts->push('Contact', [ 'ids' => [$contactId]]);


      Comment


    • #4
      where should i place this code ?

      yuri Any Other Option . Can we achive this through Workflow

      Comment

      Working...
      X