Google IDX Login icon

Google IDX Login

Google IDX Login

Overview

This node automates logging into a Google account via Google's sign-in page using a headless browser. It uses Puppeteer with stealth plugin to mimic human-like browsing and avoid detection. After successful login, it captures the session cookies and stores them as credentials in an external system via an authenticated API call.

Common scenarios:

  • Automating Google authentication for workflows that require access to Google services behind login.
  • Programmatically managing Google session cookies for reuse in other nodes or integrations.
  • Capturing login state snapshots for debugging or audit purposes.

Practical example:
A user wants to automate data extraction from a Google service that requires login. This node logs in with provided credentials, saves the session cookies securely, and outputs a screenshot of the logged-in state for verification.


Properties

Name Meaning
Profile Name The username (email) of the Google account to log in.
Password The password corresponding to the Google account.
Options Additional optional settings:
  Batch Size Maximum number of pages to open simultaneously (affects memory and CPU usage).
  Browser WebSocket Endpoint WebSocket URL to connect to an existing browser instance instead of launching a new one.

Output

The node outputs an array containing one item with the following structure:

  • json.data: The response from an external API after storing the Google session credentials. This includes metadata about the saved credential.
  • binary.image: A PNG screenshot (base64 encoded) captured at the end of the login process, showing the logged-in browser state.

This output can be used downstream to verify login success and to reference the stored Google session credentials.


Dependencies

  • Puppeteer-extra with stealth plugin: Used to launch or connect to a Chromium browser instance and perform automated login steps while avoiding bot detection.
  • An external API endpoint requiring an API key credential: Used to store the retrieved Google session cookies securely.
  • n8n credential configuration: Requires an API key and base URL for the external API where credentials are saved.

Troubleshooting

  • Failed to launch/connect to browser:
    Occurs if Puppeteer cannot start or connect to the browser instance. Check that the environment supports headless Chromium and that the WebSocket endpoint (if provided) is correct and accessible.

  • No token given:
    Indicates missing or invalid API key/base URL credentials needed to save the session cookies. Ensure the required API authentication is configured properly.

  • Login failures or timeouts:
    If Google changes its login page layout or flow, the hardcoded mouse movements and clicks may fail. Adjust timing delays or selectors accordingly.

  • Resource consumption issues:
    Opening many pages simultaneously (batch size) can cause high memory/CPU usage. Tune batch size based on available resources.


Links and References

Discussion