Automation User

The automation user is the Pipedrive account whose identity is used for all non-interactive (webhook-triggered) API calls. This includes:

  • Google Ads conversion uploads – reading deal data to extract GCLIDs and stage information.
  • Retry queue processing – re-attempting failed operations via the cron scheduler.

Requirements

The automation user must have:

  1. Authenticated the app at least once – the user must have logged in through the Pipedrive OAuth flow so that valid tokens are stored in the database.
  2. Sufficient Pipedrive permissions – the account needs access to read and write deals, persons, and notes in the pipelines that webhooks will operate on.

Configuration

  1. Log in to the app as the user you want to designate as the automation user.
  2. Navigate to Settings > General.
  3. Click the “Use me as the automation user” button.

The system stores the current user’s ID as the automation_user app setting. All subsequent non-interactive API calls will use this user’s OAuth tokens, refreshing them automatically as needed.

If the automation user’s token expires and cannot be refreshed (e.g., the user revoked access or was deactivated), all webhook-triggered operations will fail. The system will send failure notifications if configured. To resolve this, have the user re-authenticate the app or designate a different automation user.

How It Works

When a webhook arrives (e.g., from a Pipedrive Automation or Google Ads), the worker calls getAutomationToken() which:

  1. Reads the automation_user setting to get the designated user ID.
  2. Fetches that user’s stored OAuth tokens from the oauth_tokens table.
  3. Refreshes the access token if it has expired.
  4. Returns the token data for use in Pipedrive API calls.

If the automation user is not configured, the system throws a coded AUTOMATION_USER_NOT_CONFIGURED error. If the token cannot be refreshed, it throws AUTOMATION_USER_TOKEN_EXPIRED. Both trigger failure notifications when email alerts are enabled.