Google Docs

To start setting up your google cloud console for production with MailLink.

Navigate to https://console.cloud.google.com/ and create a new project, call it anything you want (your company name is probably a good idea)

image.png

Then go to the sidebar and click on the 3 horizontal lines to open the side bar, and navigate to the Enabled APIs & services page by clicking on the button. Once there you need to press the “Enable APIs and services” button

image.png

You should get to a page that looks a bit like this

image.png

Once here, search for gmail in the search box and hit enter, then click the Gmail API option from the results

image.png

Then click the “Enable” button, and wait for google to do its thing for a second.

image.png

Then click the back button, and once again press the “Enable APIs and services” button

image.png

image.png

This time, search for “pubsub” and hit enter. Then select the option titled “Cloud Pub/Sub API” (not the lite version)

image.png

And enable it if it looks like the image, if there is a Manage button there instead then just skip this step.

image.png

Then go back to the Enabled APIs and services page, which can be done with the back arrow.

Then navigate to the Credentials page

image.png

Click the “Create Credentials” button and then press the “Oauth client ID” button

image.png

On the page you were redirected to, select Web Application

image.png

Leave the name as is, or change it (It is only for internal use). Then add your websites URL to the authorized javascript origins

image.png

For the authorized redirect URI's. You just need to go to your MailLink dashboard where you should have enabled gmail in your production environment, and there will be the URI you need to add, ready to copy.

image.png

So copy that and put it in the authorized redirect URI section

image.png

Once you've done this, press the Create button at the bottom of the page, a popup should appear with the client id, copy this and paste it into the client id field on the MailLink dashboard

Once you've done that and clicked OK on the popup box you should be taken to a page like this (I just created Web client 2, yours will be called whatever you named it)

image.png

Now click on your newly created Oauth 2 client (Mines called Web client 2) and you should get a screen similar to this (I've redacted some data from the image)

Screenshot 2025-10-04 155149.png

In the bottom right you can see the client secret, click the copy button and then paste it into your MailLink dashboard where it says Client Secret.

Now go back to the google dashboard and type “pubsub” in the search bar at the top, then click on the top result “Pub/Sub”.

image.png

On this page, click the “Create topic” button

image.png

Then name it something such as “gmail-notify” and click create

image.png

Now on the new page you've been brought to copy the topic name, and paste it into the MailLink dashboard's “Topic Name” field.

image.png

Now all you need to do is click add principal on the right of the google dashboard, then give it a principal of “gmail-api-push@system.gserviceaccount.com” and set the Role to Pub/Sub Admin, then hit Save.

image.png

Now go to your MailLink dashboard and make sure you press the “Save Changes” button. Once you've done that, gmail connections will work in your production environment.