Skip to content

Google

For the administrator. One Google OAuth web client serves Google sign-in, Connect with YouTube, Connect Search Console, Connect Google Business Profile and Connect Gmail. Its id and secret are GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET, set on the PulseControlPlane from the instance’s secret store, never from a repository secret. Google Analytics and Google Ads do not use this client: each person pastes a service-account key (see Connections).

In the Google Cloud console

  1. In the project that owns the OAuth client, enable the APIs for what you want people to connect:

    APIFor
    YouTube Data API v3Publishing, statistics, comments and replies
    YouTube Analytics APIAverage view duration and percentage
    Google Search Console APISearch Console
    Gmail APISending from Gmail and seeing replies
    My Business Account Management APIGoogle Business Profile: the accounts
    My Business Business Information APIGoogle Business Profile: the locations
    Google My Business API (v4)Google Business Profile: reviews, replies and posts
    Business Profile Performance APIGoogle Business Profile: views, calls, website visits, directions
  2. Create (or open) the OAuth client of type Web application and add the redirect URIs, each under your https PULSE_PUBLIC_BASE_URL: /oauth/social/callback (YouTube), /oauth/search-console/callback (Search Console), /oauth/google-business/callback (Google Business Profile) and /oauth/mail/callback (Gmail). See Public address and redirects. For Google sign-in in the browser, Google also requires the app’s origin under Authorized JavaScript origins.

  3. On the OAuth consent screen, add the scopes below.

  4. Submit the app for verification. The YouTube scopes and webmasters.readonly are sensitive scopes and gmail.readonly is a restricted one: until Google verifies the app, only test users of the project can grant them (and restricted scopes are capped at 100 users).

YouTube

Connect with YouTube asks for:

  • https://www.googleapis.com/auth/youtube.upload (publishing);
  • https://www.googleapis.com/auth/youtube.force-ssl (views, likes, comment counts, comments and replies);
  • https://www.googleapis.com/auth/yt-analytics.readonly (average view duration and percentage).

PULSE stores the access and refresh tokens sealed and renews the access token shortly before it expires. A scope the person did not grant is listed on the card. YouTube has no mentions and no direct messages through its API; the app says “not available on YouTube”. Uploads are private unless YOUTUBE_PRIVACY_STATUS says unlisted or public. Publishing also needs PULSE_APPLY_ENABLED and PULSE_PUBLISH_YOUTUBE.

Without the client, the YouTube card accepts a pasted Google access token and its refresh token instead.

Search Console

Connect Search Console asks only for https://www.googleapis.com/auth/webmasters.readonly (with PKCE and offline access), then lists the properties the Google account can read. PULSE picks the one that matches the audited site, otherwise the person chooses. Once a day it reads clicks, impressions, click rate and average position per search and per page for the last 28 days and the 28 before (Google’s figures lag about two days). It spends at most 25 Search Console calls per account a day, manual reads included; a quota answer from Google is recorded and the read is retried the next day. Not connected, every place that would show these figures says “not measured”.

Google Business Profile

The Business Profile APIs are gated by Google: before they answer, request access for the Cloud project with Google’s Business Profile API access request form (business.google.com, API access), with the project number. Until Google grants it, every call answers with a quota of 0 and the card shows the read failed with Google’s reason. Then enable the four APIs above and add the https://www.googleapis.com/auth/business.manage scope to the consent screen (a sensitive scope: verification as in step 4).

Connect Google Business Profile asks only for business.manage (with PKCE and offline access) and lists the locations of every account the Google user manages; a single location is managed at once, several wait for the person to choose. Every 6 hours (and on Read now) PULSE reads the managed locations’ reviews (the newest 200 each) and the last 28 finished days of views on Search and Maps, calls, website visits and direction requests, at most 60 calls per account a day. A figure Google does not report is left out, never shown as 0; not connected says “not connected”.

Each new review without a reply gets a reply DRAFTED by PULSE’s own model (the review-reply skill: the review fenced as untrusted, OpenBias and the plan gate on the draft). Only a person’s Approve posts it, through PULSE_APPLY_ENABLED, PULSE_PUBLISH_GBP and PULSE_PUBLISH_GBP_REPLIES; a negative review (1 or 2 stars, or 3 with a complaint) is flagged and also needs the person to tick that they read it. Posts (update, offer, event) are made in Brand Analysis › Google reviews › New post, wait in Campaigns › Approvals on the Google Business Profile channel, and publish on approval through PULSE_APPLY_ENABLED and PULSE_PUBLISH_GBP.

When a deal is marked won, PULSE proposes one review-request email in that lead’s outreach: from the person’s own mailbox, after their approval, with the outreach footer, suppression list, daily cap and working hours. Google forbids offering anything for a review or asking only happy customers; every won customer gets the same request, and an approval whose text offers an incentive is refused.

Gmail

Connect Gmail asks for gmail.send, openid email, and gmail.readonly so PULSE can see who answered. See Email.

Google sign-in

With GOOGLE_CLIENT_ID set, the login screen offers Google sign-in. Who may sign in is AUTH_ALLOWED_EMAILS (empty means nobody); AUTH_GOOGLE_ONLY=true hides the password form. See Users and access.

The browser uses the web client directly (its origin must be under Authorized JavaScript origins). The Android app asks Google for a token for the same web client, and Google only answers an app it knows: in the same Google Cloud project, create an OAuth client of type Android for the package org.runink.pulse with the SHA-1 of each key the app is signed with. For an app installed from Google Play that is the app signing key (Play Console → Test and release → App integrity); add the upload key’s SHA-1 as well for builds installed outside Play. Until then the Android app says it is not registered with Google and offers the password form. The Linux app has no Google sign-in (the library does not support Linux desktops) and says so.