Setting up Google Cloud Console
There are a lot of good use cases for integrating with your google stuff with AI, for example fetching data or content from Google Drive, writing emails for your Gmail account or using Google Search or Google Serper via APIs. Most of these uses require credentials, enabling APIs and API keys. In order to do this, you need to set up an account and organization in the Google Cloud Console. This is how to do it.
For this setup post I will create a new google account for TaskAutomation.dev with a Gmail account, activate the Google Cloud Console and set up an organization. Then I will configure the OAuth consent screen, activate the Gmail API and download the credentials.
I have set up a new Google account with Gmail, and clicking not now for the business setup.
Lets google "Cloud console" and click on the first obvious link to "Google Cloud Platform".
I check the first box, agree and continue. I click select a project in the upper leftish part of the page and create a new project under "No organization" Location.
After selecting your new project, click the "hamburger"-menu and choose APIs & Services.
Here I am doing three things.
- Configure OAuth consent screen
- Enable the Gmail API
- Downloading a credentials file
The OAuth consent screen is a setup or registration of the app in order to access resources like Gmail etc. I am setting this up as User Type Internal. The internal radio button is unclickable, but I guess it is internal if I don't click the external.
Here I need to enter an app name, user support email and email for developer contact, the rest is optional.
The next screen is Scopes, I just save and continue. Under test users, I add my new Gmail as a test user. Save and continue. Check the summary and I am done.
In order the use the Gmail API I go to the Enabled APIs & Services item on the left menu. Search for Gmail API and click the Enable button.
At last, I am creating credentials, under the Credentials menu item. For our AI integration I need a OAuth client ID.
Select Desktop app, create and then download JSON.
When I download this file it is called something like client\_secret\_13298394823948....json
, but when I used it in for example a langchain project it is expected to have the name credentials.json
Now I am ready to start using this in an AI app!
Subscribe to my newsletter.
Get updates on my latest articles and tutorials.
- Weekly articles
- I aim to publish new content every week. I will also share interesting articles and tutorials on my blog.
- No spam
- You will not receive any spam emails. I will only send you the content that you are interested in.