Skip to main content

Gmail

Prefer guided AI setup?

Instead of following these steps manually, you can use the AI Credential Assistant — describe what you want to connect and the AI will walk you through the setup step by step, tailored to your account.

Overview​

Connect your Gmail account to Nirvai to send, read, and manage email and labels programmatically.

Supported Authentication Methods​

  • OAuth2

Prerequisites​

  • A Google account
  • Access to Gmail

Setup Instructions​

  1. In Nirvai, go to Credentials > Add Credential
  2. Select Gmail OAuth2
  3. Click Authorize
  4. Sign in with your Google account
  5. Review and accept the requested permissions:
    • Read, compose, and send email
    • Manage labels and drafts
  6. You'll be redirected back to Nirvai with your credential saved

Permissions Requested​

  • gmail.send: Send email on your behalf
  • gmail.readonly: Read messages and metadata
  • gmail.modify: Manage messages, labels, and drafts

What You Can Do​

  • Send and reply to emails
  • Read and search messages
  • Manage labels, threads, and drafts
  • Mark messages as read/unread or archive them

Troubleshooting​

Common Issues​

  • Access Denied: Ensure you authorized all requested scopes
  • Insufficient Permission: Re-authorize with the scope needed for the action (e.g. gmail.send to send)
  • Quota Exceeded: Check your Gmail API usage limits

Adapted from Google documentation for Nirvai platform


Next Steps​

Got your credential? Connect it to an agent

Use the AI Tool Creator to turn this credential into agent-callable tools. Describe what your agent should be able to do and the AI investigates the API, configures the endpoints, and gives you a reviewable toolkit before saving anything.