Elizon Docs
Workflows

Google Contacts

Search, read, create, update and delete contacts as a connected Google account.

The Google Contacts app reads and writes the contacts of a connected Google account.

A worked example

Google Contacts — add the sender of an email, if they are not already a contact.

  1. An Email trigger starts the run.
  2. A Google Contacts step, Contact · Search contacts, with Search text set to {{ trigger.from.address }}. It answers an array of matching contacts, so itemCount is 0 when the sender is new.
  3. An If / Else on {{ upstream.search.output.itemCount }} equal to 0.
  4. On the true branch, a second Google Contacts step, Contact · Create a contact, with Email address set to {{ trigger.from.address }} and First name to {{ trigger.from.name }}. The Email trigger's from is a { name, address } pair, not a string — see Triggers.

To change a contact instead, run Get a contact first and pass its etag to Update a contact. Google refuses an update carrying a stale etag, which is what stops two workflows overwriting each other's edits — so the Get is part of the operation, not an optimisation.

Fill in both halves of a pair you touch. Google replaces a whole field group at a time, so an update that sets First name and leaves Last name empty clears the last name; the same goes for Company and Job title. The Get you already ran carries both, so pass the half you are not changing straight through.

Operations

The App step's own settings — account, resource, operation, and { value, valueMode } per input — are described in the Apps overview. These are this app's operations.

OperationWhat it doesInputs (bold = required)Permission
contact.searchSearch contactsquery, pageSizecontacts.readonly
contact.getGet a contactresourceNamecontacts.readonly
contact.createCreate a contactgivenName, familyName, email, phone, company, jobTitle, notescontacts
contact.updateUpdate a contactresourceName, etag, givenName, familyName, email, phone, company, jobTitle, notescontacts
contact.deleteDelete a contact. Cannot be undone.resourceNamecontacts
contact-group.listList contact groups—contacts.readonly

Example

workflows/find-sender.yaml
name: Find sender
description: Looks the sender of an email up in Contacts.
graph:
  nodes:
    - id: start
      type: trigger_manual
      position: { x: 0, y: 0 }
      data: { description: 'Run it from Studio.' }
    - id: search
      type: app
      position: { x: 280, y: 0 }
      data:
        app: google-contacts
        version: 1.0.0
        resource: contact
        operation: search
        connection: google-account
        inputs:
          query: { value: '{{ trigger.from.address }}', valueMode: expression }
          pageSize: { value: '5', valueMode: fixed }
  edges:
    - { id: start-to-search, source: start, target: search }

In a Package

The step travels whole; the account becomes a credential Slot the installer binds one of their own Google accounts to. See Apps in a Package.

elizon.yaml
slots:
  - id: google-account
    type: credential
    scheme: oauth2
    app: google
compliance:
  providers: [google]
  • Travels: app, version, resource, operation, inputs
  • Converted: connectionId → connection (the credential Slot)
  • Never carried: none