AutomationFlowsWeb Scraping › Google Contacts Sync

Google Contacts Sync

google_contacts_sync. Uses httpRequest. Webhook trigger; 8 nodes.

Webhook trigger★★★★☆ complexity8 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 8 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "google_contacts_sync",
  "nodes": [
    {
      "id": "wh_gc_1",
      "name": "Webhook Google Contacts Sync",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        200,
        300
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "google-contacts-sync",
        "responseMode": "lastNode",
        "options": {}
      }
    },
    {
      "id": "buscar_gc_2",
      "name": "Buscar en Google Contacts",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        300
      ],
      "parameters": {
        "method": "GET",
        "url": "https://people.googleapis.com/v1/people:searchContacts?query={{ $json.celular }}&readMask=names,phoneNumbers,addresses,metadata",
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api"
      }
    },
    {
      "id": "check_gc_2",
      "name": "Contacto Existe?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        660,
        300
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ ($json.results || []).length > 0 }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        }
      }
    },
    {
      "id": "crear_gc_2",
      "name": "Crear Contacto",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        880,
        200
      ],
      "parameters": {
        "method": "POST",
        "url": "https://people.googleapis.com/v1/people:createContact",
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"names\":[{\"givenName\":\"{{ $('Webhook Google Contacts Sync').item.json.nombre_cliente }}\"}],\"phoneNumbers\":[{\"value\":\"+57{{ $('Webhook Google Contacts Sync').item.json.celular }}\"}],\"addresses\":[{\"formattedValue\":\"{{ $('Webhook Google Contacts Sync').item.json.direccion || 'Sin direccion' }}\"}]}"
      }
    },
    {
      "id": "comparar_gc_2",
      "name": "Comparar Datos",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        880,
        420
      ],
      "parameters": {
        "jsCode": "const results = $input.first().json.results || [];\nconst contacto = results[0];\nconst datos = $('Webhook Google Contacts Sync').item.json;\nif (!contacto) return [{ json: { actualizar: false, synced: 'no_contact' } }];\nconst contactId = contacto.resourceName;\nconst nombreActual = contacto.names?.[0]?.givenName || '';\nconst direccionActual = contacto.addresses?.[0]?.formattedValue || '';\nconst cambios = [];\nif (datos.nombre_cliente && nombreActual.toLowerCase() !== datos.nombre_cliente.toLowerCase()) cambios.push('nombre');\nif (datos.direccion && direccionActual.toLowerCase() !== datos.direccion.toLowerCase()) cambios.push('direccion');\nreturn [{ json: { actualizar: cambios.length > 0, contactoId: contactId, datos, etag: contacto.etag, cambios } }];"
      }
    },
    {
      "id": "check_upd_2",
      "name": "Necesita Actualizar?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1100,
        420
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.actualizar }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        }
      }
    },
    {
      "id": "actualizar_gc_2",
      "name": "Actualizar Contacto",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1320,
        480
      ],
      "parameters": {
        "method": "PATCH",
        "url": "https://people.googleapis.com/v1/{{ $json.contactoId }}:updateContact?updatePersonFields=names,addresses",
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"names\":[{\"givenName\":\"{{ $json.datos.nombre_cliente }}\"}],\"addresses\":[{\"formattedValue\":\"{{ $json.datos.direccion || '' }}\"}],\"etag\":\"{{ $json.etag }}\"}"
      }
    },
    {
      "id": "resp_skip",
      "name": "No Necesita Update",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1320,
        340
      ],
      "parameters": {}
    }
  ],
  "connections": {
    "Webhook Google Contacts Sync": {
      "main": [
        [
          {
            "node": "Buscar en Google Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Buscar en Google Contacts": {
      "main": [
        [
          {
            "node": "Contacto Existe?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Contacto Existe?": {
      "main": [
        [
          {
            "node": "Crear Contacto",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Comparar Datos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Comparar Datos": {
      "main": [
        [
          {
            "node": "Necesita Actualizar?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Necesita Actualizar?": {
      "main": [
        [
          {
            "node": "No Necesita Update",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Actualizar Contacto",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

google_contacts_sync. Uses httpRequest. Webhook trigger; 8 nodes.

Source: https://github.com/josemorenoso/SushiServiceFidelitySystem/blob/b316069b6f267de19ba5f604e7476e0720c01949/n8n/google_contacts_sync.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.

HTTP Request
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request