botize.png

Authorize Botize to use your Gmail API?

By providing your Google Calendar Service Account Key represent

that you agree to aloww Botize to connect to your account.

Gmail account automation is only allowed for Google Suite accounts.

The first thing you have to do is  create a Service Account in the Google Cloud Platform Console.  Follow this steps to set up an account:

STEP 1. To create a Service Account, you must Create a Project first. 

1. Go to the Google Cloud Platform (GCP) Console and sign in as a super administrator. Choose an option: 

paso1a.jpg

Then click Create.

paso1b.jpg

paso1c.jpg

2. Enter a project name and click Create.

paso1d.jpg

STEP 2. Enable Google Calendar API

1. In the top-left corner of the GCP console, click Menu  APIs & Services and then  click Library.

paso2.jpg

2. Click the API name, in this case "Gmail". If you don't see the API, enter the API name in the search box.

And then click Enable.

STEP 3. Create the Service Account

  1. In the top-left corner of the GCP console, click Menu. Then IAM & Admin and click Service Account.

paso3.jpg

Click on Create Service Account.

paso3a.jpg

  1. In the Servicer Account name field, enter a name for the Service Account.

(Opcional) Enter a description of the Service Account. Then click Create.

paso3b.jpg

  1. (Opcional) Assign the role of Project viewer to the new account and click Continue.

paso3c.jpg

  1. Click Create Key.

paso3d.jpg

  1. Ensure the key type is set to JSON and click Create.

paso3e.jpg

  1. You´ll see a message that the service account JSON fie has been dowloaded to your computer. Make a note of the location and name of this file. Click Close.

paso3f.jpg

Then click Done.

paso3g.jpg

  1. In the list of service accounts, click the email address that relates to the service account you created and click Edit or click on the menu on your right and then edit.

paso3h.jpg

  1. Click View Domain Wide Delegation Client ID and click Edit.

paso4

Check the option to Enable the Domain Wide Delegation.

paso4a.jpg

  1. In the Product name for the consent screen field, enter a product name.
  2. In the Email address field, use the default email address or assign a new email address.
  3. Click Save.

paso4d

PASO 4. Give permissions to the email account you want to automate

  1. First of all you need to copy your Client Id, for this click on the Service Account section on the left menu.
  2. On the right you will see a table with the service account that you have already created. In the Domain Delegation column, click on the link that says See Client Id and copy the client Id that appears. We will need it below.
  3. Go to G Suite.
  4. Go to Security and then Advanced settings.
  5. Now click on the Manage API Client Access link.
  6. A form will be shown, where in Customer Name you have to paste the value the Customer Id that you copied previously.
  7. In the box "One or more API permissions" paste the following: https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.send
  8. Click Authorize
  9. You have completed all the steps!