Zoho FSM | Push Zoho FSM Contacts to Google Contacts

Push Zoho FSM Contacts to Google Contacts

Use case: Push (create/update) a Zoho FSM contact to Google Contacts. Changes made to the Name, Email, Mobile, Phone, or Service Address of the Zoho FSM Contact will reflect in the corresponding Google Contact.
 
Follow the steps below to implement this use case:

Step 1: Create a custom field 

Create a custom field Google Contact ID of type Single Line in the Contacts module. This field will be used to store the ID of the Google Contact created for the Zoho FSM Contact.
 
Drag and drop a new section and name it as Other Info.
 
 
To the Other Info section, drag and drop a Single Line field and name it as Google Contact ID.


Step 2: Create a connection for Google Contacts 

To create a connection for Google Contacts that can be used in Zoho FSM for invoking the Google Contacts APIs, do the following:
  1. Navigate to Setup > Developer Space > Connections and under Default Services, select Google Contacts.



  2. Click Create Connection.



  3. Perform the following and click Create And Connect:
    1. Connection Name: googlecontact
      The Connection Link Name will be populated automatically.
    2. Disable Use Credentials of Login User.
    3. For the Scopes, select https://www.google.com/m8/feeds/



  4. Click Connect.



  5. Click Connect.


In the custom function, where the Google Contacts APIs are used via the invokeURL tasks, use this Connection Link Name.


Step 3: Create a workflow rule

Create a workflow rule in Zoho FSM to automatically create a Contact record in Google Contacts from a Zoho FSM Contact. Changes made to the Name, Email, Mobile, Phone, or Service Address of the Zoho FSM Contact will reflect in the corresponding Google Contact.
  1. Go to Setup > Automation > Workflow Rules and click Create Workflow.
  2. Enter the following details, then click Next:
    1. Module: Contacts
    2. Rule Name: CreateUpdateGoogleContacts



  3. Select the rule trigger as Created or Edited and click Next. Ensure that Repeat this workflow whenever a Contact is edited is selected.



  4. Select the rule criteria as To all Contacts and click Next.



  5. Click +Action and select Function.



  6. Select Create your own Function and click Next.



  7. Enter the following and click Save and Associate:
    1. Function Name: createupdategooglecontact
    2. In the Deluge Editor, paste this script and replace the placeholders with actual values.



  8. Click Save.


Custom Function Script 

Below is the custom function script:
 

fullName = contact.get("Full_Name");
email = contact.get("Email");
phone = contact.get("Mobile");
mobile = contact.get("Phone");
address = contact.get("Service_Address");
ginput = Map();
ginput.put("names",{{"givenName":fullName}});
if(email != null)
{
 ginput.put("emailAddresses",{{"value":email}});
}
if(mobile != null)
{
 ginput.put("phoneNumbers",{{"value":mobile}});
}
if(phone != null)
{
 if(ginput.containKey("phoneNumbers"))
 {
  phonenumberList = ginput.get("phoneNumbers").toList();
  phonenumberList.add({"value":phone});
  ginput.put("phoneNumbers",phonenumberList);
 }
 else
 {
  ginput.put("phoneNumbers",{{"value":phone}});
 }
}
if(address != null)
{
 ginput.put("addresses",{{"city":address.get("City"),"country":address.get("Country"),"postalCode":address.get("Zip_Code"),"streetAddress":address.get("Street_1")}});
}
if(contact.get("Custom_Field_ID") != null)
{
 googleContactId = contact.get("Custom_Field_ID");
 personFields = {"personFields":"names,phoneNumbers"};
 getGcontactInfo = invokeurl
 [
  url :"https://people.googleapis.com/v1/" + googleContactId
  type :GET
  parameters:personFields
  headers:Map()
  connection:"Connection_Name"
 ];
 if(getGcontactInfo != null && getGcontactInfo.get("etag") != null)
 {
  etagid = getGcontactInfo.get("etag");
  ginput.put("etag",etagid);
  gUpdateResp = invokeurl
  [
   url :"https://people.googleapis.com/v1/" + googleContactId + ":updateContact?updatePersonFields=names,addresses,phoneNumbers,emailAddresses"
   type :PATCH
   parameters:ginput.toString()
   headers:Map()
   connection:"Connection_Name"
  ];
  info gUpdateResp;
 }
 else
 {
  gcontactresp = invokeurl
  [
   type :POST
   parameters:ginput.toString()
   headers:Map()
   connection:"Connection_Name"
  ];
  if(gcontactresp != null && gcontactresp.get("resourceName") != null)
  {
   googleResourceName = gcontactresp.get("resourceName");
   updatedResp = zoho.fsm.updateRecord("Contacts",contact.get("id"),{"Custom_Field_ID":googleResourceName});
   info updatedResp;
  }
 }
}
else
{
 gcontactresp = invokeurl
 [
  type :POST
  parameters:ginput.toString()
  headers:Map()
  connection:"Connection_Name"
 ];
 if(gcontactresp != null && gcontactresp.get("resourceName") != null)
 {
  googleResourceName = gcontactresp.get("resourceName");
  updatedResp = zoho.fsm.updateRecord("Contacts",contact.get("id"),{"Custom_Field_ID":googleResourceName});
  info updatedResp;
 }
}

Replace Custom_Field_ID with the Api name of the custom field.



Replace connection_name with the Connection Link Name.
 

Testing the use case

Create a Zoho FSM Contact. A corresponding contact will be added in Google Contacts. The Google Contact ID field in the Zoho FSM Contact record will be populated with the ID of the Google Contact created (refer to the screenshot below).
 

 
Any changes made to the Name, Email, Mobile, Phone, or Service Address of the Zoho FSM Contact will reflect in the corresponding Google Contact.

    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION





                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          CRM Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal
                          Mobile App
                          Form Designer HR
                          Mobile Forms
                          Card Forms Food Offline Forms
                          Assign Forms Photography
                          Mobile Forms Features
                          Translate Forms Real Estate Kiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for Forms Alternatives Security & Compliance
                          Holiday Forms Google Forms alternative  GDPR
                          Form to PDF Jotform alternative HIPAA Forms
                          Email Forms
                          Encrypted Forms
                          Embeddable Forms
                          Secure Forms
                          Drag and Drop form builder
                          WCAG


                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                              • Related Articles

                                                                                                              • Push Zoho CRM Contacts and Accounts to Zoho FSM

                                                                                                                Usecase: Use custom buttons in Zoho CRM to do the following: Push (create/update) a Zoho CRM contact to Zoho FSM. If the contact has an associated account, create that account as a company in FSM. Push (create/update) a Zoho CRM account as a company ...
                                                                                                              • Zoho FSM Mobile App

                                                                                                                The Zoho FSM mobile app empowers on-the-go field agents with all the information they need, to be efficient at work and delight contacts with every appointment. It helps them to be on time for their appointments, attend more appointments in a single ...
                                                                                                              • Create Requests in Zoho FSM from Zoho CRM Deals

                                                                                                                Usecase: Using a custom button, push Deals in Zoho CRM as Requests to Zoho FSM. Also, create a related list in the Deals record that lists the Requests created for the Deal. Step 1: Create a connection for Zoho FSM in Zoho CRM Step 2: Create a custom ...
                                                                                                              • Contacts

                                                                                                                Available in Editions: All Editions Add Contact Details Contacts can be added in the following ways: Add contacts individually in the Contacts module. The details are described below. Import contacts from external sources. Import contacts from ...
                                                                                                              • Installation And Usage Guide for Zoho FSM Extension for Zoho Desk

                                                                                                                The Zoho FSM for Zoho Desk is an extension that will help you streamline the process of handling customer issues and requests by facilitating easy and direct communication between Zoho FSM and Zoho Desk. Ensure that every customer interaction is ...
                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources