Skip to content

Sending Mail through Gmail

Hire2Retire now supports sending mails through your Gmail account using OAuth based and certificate based authentication mechanism.

Service Provider Application

Google application on Hire2Retire uses OAuth authorization. By linking your Google account with Hire2Retire, you can authorise the RoboMQ application to have delegated access to send mail on your behalf, for which you will be provided with a consent window to provide permission required by Hire2Retire. RoboMQ needs the following permissions on your account to provide a seamless integration experience

Scopes Explanation
auth/userinfo.email See your primary Google Account email address
auth/userinfo.profile See your personal info, including any personal info you've made publicly available
auth/gmail.send Send email on your behalf.

Create a Connection

You need to have an Google account with mailbox enabled before using Gmail services on Hire2Retire.

  1. To authenticate your account you need to click the Link account button, which will redirect you to the Google sign-in page.

    Google Connection

  2. Here, you can select an existing account or add a new google account.

    Google Login

  3. Following successful signup or account selection, Google presents you with a permissions page. On this page, you will be asked to provide certain permissions that are required by Hire2Retire to send mails on your behalf.

    Google Permissions

  4. Once you've consented to the permissions, you will be redirected back to Hire2Retire. This redirection signifies the successful establishment of the connection between the two platforms.

Customer Owned Application

Hire2Retire does not require the user to sign-in for this connection. Instead, for automation purposes, it will use your application service account to impersonate an user account. Choosing this connection requires you to manage your service account's Application Permission in your Google instance.

Create a Connection

  1. Firstly create a project in google cloud platform.

    Google Project

  2. Enable Gmail API for that project, by following the below mentioned steps:

    • Go to API’s and services from the side menu bar then select Enabled API’s and services
    • Click enable API’s and services from the top menu bar.
    • Search Gmail and enable the Gmail API for the project.

    Google Gmail API

  3. Create Service Account for that project

    • Go to Service Account section by selecting the IAM & admin from the side menu bar and selectng the service account.

    Google Service Account

    • Click on Create new Service Account from the top menu bar and fill the account name field and click Create and Continue

    Google Service Account Creation

  4. Go to Google Admin Console to give your service account domain wide delegation by following the instructions below

    • Select API controls by going to Security > Access and data Control from the side menu bar.

    Google Admin Console

    • Click Add New and enter the client ID and add https://www.googleapis.com/auth/gmail.send as the scope.
  5. Download the certificate from the Hire2Retire connection UI and add that certificate to the service account created in the google console by following the below steps;

    • Select the service account and go to the keys section from the top navigation menu

    Google Certificate

    • Select Upload existing key, browse the certificate which you downloaded from the Hire2Retire connection UI and upload it.

    Google keys

  6. Enter the service account and the user account of your organization through which you want the mails to be sent and link the account.

    Google Communication Hub