If you want to use Google services like Gmail, Google Drive Sheets, docs in your n810 agents and automation,
you have to set up credentials.
So if you are using the paid cloud version of N810, it's very simple.
You just need to sign in using your email account.
So I'm going to show you how.
And.
Basically every time when you want to use Google Apps let's say Gmail.
And we want to use a trigger.
We need to create a new credential and simply sign in with Google.
And your credentials will be automatically saved for the next workflows, so you don't need to do it
over and over again.
But if you are self-hosting n810, you have to stop credentials manually.
And in the next part of this tutorial, I will show you exactly how.
Now, once you successfully sign in to your Google account, it will automatically create credentials
for you and there is a different way to access all your credentials in one place.
Just go to overview.
Click on credentials.
And here you can manage credentials.
So all your accounts connected to your N810 instance.
Now here is something important.
If you are using N810 cloud subscription, you still need to setup credentials for Google Drive manually
by following the rest of this tutorial.
Now I'm in my non self-hosted N810 instance, so for this N810 account I pay for the subscription.
As you can see, if I want to create credential.
It's still asking me for client ID and client secret.
So I have to set up credentials manually.
This is specifically required for the Google Drive for other Google services, and they can make it
easy.
You can simply sign in and Nathan will create the credentials for you automatically.
If you pay for the services and you don't need to sign in over and over again, sometimes it might ask
you to log in again to refresh your credentials.
So whether you are using Nathan Cloud or self-host it yourself, if you want to access Google Drive,
you are gonna need to follow this credential setup steps.
Also, I've prepared a nice PDF guide that's way easier to follow than the official Nathan documentation.
So apart from this video, what I'm showing you exactly how to setup credentials manually.
For Google apps, you can always use that guide.
You will find it in the resources section of this lesson.
Now I'm in the self-hosted instance, and if I want to use Google services such as Gmail, Google Sheets,
Google Drive.
As you can see, when I want to create a new credential, I can just simply sign in.
I need to provide client ID and client secret.
Now let's check Google Sheets.
The same.
Google drive we want to connect to Google Drive.
So we need to create a credential.
And yes we need to provide client ID and client secret.
So recently Google has changed the user interface slightly.
So The Google Cloud Console looks different.
So I'm going to show you how to set up credentials manually if you are self-hosting N810.
First of all, you can always go to the documentation, which is great by the way.
Open docs and follow this guide step by step.
But I'm going to show you how to do it in this video.
It will be easier for you.
Yes, Google recently updated their interface so the process looks a bit different now.
Let's walk you through step by step.
So first let's go to Console.cloud.google.com and sign in to your account.
The first thing we need to do is to create a new project.
So right here.
You can create new project.
Give it a name.
And press create.
If you can see this this is under notifications.
Select the project just created.
Make sure you are in the right project.
So in my case it's credentials demo.
Now we need to enable the for example Google Sheets API.
So let's say let's search for Google Sheets.
Click enable.
The API is now enabled.
So next we need to create credentials.
So click create credential.
Under credentials right here.
Create credentials.
Select user data and hit next.
Now give it a name.
I will call mine N810.
Data integration.
Now user support email.
So provide your email address.
Now the same for the developer contact information.
Perfect.
Save and continue.
Next this is really important step.
We have to provide scopes.
So scopes express the permissions that you request users to authorize for your app and allow your project
to access specific types of private user data from the Google account.
So click on Add or remove scopes And search for Google Sheets.
Just scroll down, change rows per page to 100, scroll down and tick all these boxes related to Google
Sheets.
When I perfect click update.
So in short, these are the permissions for what our app can do with Google Sheets.
Of course, you can read what each one does and deselect any you don't need for security reasons.
But as you can see, you allow any tend to see, edit, create and delete files and so on.
Now let's save and continue.
Let's choose web application.
You can leave the name as it is or change it.
Now this is really important.
We need to add URL.
So we need to go back to our workflow.
Let's open Google Sheets.
If you remember we enabled Google Sheets so far.
So let's create new credential.
And now we need to copy this auth redirect URL.
Go back to our Google Console.
URL and paste it right here.
Let's create.
This very moment.
Yes.
So by doing this we configured our OAuth client.
So it's done for now.
Now let's go to credentials on the left hand side.
You will see the credentials we just created.
So click on edit Edit Auth client.
First copy the client ID.
Switch over 2010.
And paste it right here.
Now we need to provide client secret.
So scroll down copy client secret.
Go to return and paste it right here and hit save.
Right.
As you can see credentials successfully created.
And now this button pops up.
for signing with Google.
So click on it.
Now select the Google account you want to use with Google Sheets.
So that's normal.
We need to add ourselves as a test user as as you can see.
Access blocked.
So let's go to our Google Cloud Console again.
And add an audience.
All right.
So now I'm going to click Get Started.
It's going to ask us a few questions.
So the first thing name of your app.
So I'm just going to call mine N810.
But you can name it whatever you want.
For the email you should only have one option here.
So just select your email.
Hit next.
Now for user type, I'm choosing external.
This basically means we can add external test users to our application, which we'll need later.
We will add ourselves first, but you can add other people later too.
Now press next.
Google needs a support email.
Just add your email.
So we're gonna do the same.
Hit next.
Then agree to the terms of service.
Continue and create.
If you get lost at any point just click the hamburger button.
Then go to APIs and services.
Then all of Constant Screen.
And here you can select audience.
Scroll down.
Click Add Users and at the same email address you are using for this connection.
In my case, N810 gmail.com.
Save.
And now when I test the connection again.
Sign in with Google.
Now you will see Google has verified this app.
So click on continue.
Select all the scopes.
And confirm.
Right.
Got connected.
Now that you know how to connect Google Sheets, you can use the same Credentials for other Google services
like Gmail, Google Calendar, or Google Docs.
The only difference is you will need to enable the specific API for each service.
So let's go to our Google Cloud Console and under the specific project, search for Gmail.
And enable this API.
And the same for Google services and the same for other Google services like Google Drive.
Google drive API.
And just simply enable it.
And now in the credentials section.
Then.
You can grab the same credentials.
So client ID and client secret.
So just edit it.
Copy the client ID.
This time let's connect our Google Drive to N810.
So create credential client ID.
And the client secret.
Hit save and sign in.
And that's it.
You have successfully connected Google Sheets to N810.
And I also showed you how to connect other Google services.
So you need to go through this process once and it will be automatically saved for future automations.
But from time to time you will need to refresh your credentials.
So now you know how to connect all the Google services to your workloads.
Thank you for your attention and see you in the next tutorial.