How to Connect Your AmazonQ Application to Gmail
Tags: amazonq, generativeai, aws, awsbigdata
Published: 2024-01-31 22:39:44


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1bs324xbyzrgwzufm6y.png)



We will go trough the steps of creating a Personal AI Assistant who can have access to our emails. 

1.Navigate to https://aws.amazon.com/ and sign in to your AWS Console.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6rvkkvo6mxhrce5w9dlz.png)

2.From the services type and select "Amazon Q"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dwuftn0lmmphf16l84j9.png)

3.Click "Create application"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i6tpleve4h7thsnt6ggk.png)

4.Type your application's name ex:"MyAssistant" and leave the default "Create and use a new service role" and click "Create".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9i5zvst3c3emf38o2pwc.png)

5.On the next page leave the default Retrievers. Leave Index provisioning as "1" and Click "Next".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y9hdbkbu0qgsm7gbb9as.png)

6.Select Gmail.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i23hgyp1s61q340tjj5w.png)

7. For the "Data source name" field enter name.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clbyr9y6cc0icvy84qe8.png)

8.Choose "Create and add new secret"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nkcxy43qard3jt3k2ufz.png)

9.Fill in the information. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ia995mk3s25rl3zmony.png)

Now you are going to need the Private Key of your Gmail account. 

10.Navigate to Google Cloud Platform.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tj5255qs7r11i45sk75.png)

11.Write a project name and click "Create" 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wnz1i5hfwi4ufa8avkex.png)

12.Click ok "SELECT PROJECT"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf358eiowdpsetlopj18.png)

13.From the left bar go to Service Accounts.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q4f4iscd1s2mesdvu7xi.png)

14.Click the "Service account name" field and type a name, something like "AmazonQAssistant". 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tv0vxakgbk7j1oxb207x.png)

15.Create a service account.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dhieeeoqy0vlwuly9gg9.png)

16.Service account ID will be generated. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k61i1rk7pq3mfah4la4e.png)

17.Click "CREATE AND CONTINUE"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rkrvtlco4eym9giax702.png)

18.And then click on "DONE".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9a50mfpbn6iuogfyoxw.png)

19.Clik on the account Email.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fdn3sj5662i1f25tseea.png)

20.Go to "KEYS"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ubmzqiy4v4qvnr4ylldn.png)

21."ADD KEY" and "Create new key".

22. Now go back to AWS Console > Amazon Q and add your "Private key" generated in Gmail account in this field and SAVE.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4y3jhoi3d3qlh5gpse0x.png)

23.Continue adding data source.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/znvhot2xwxo87a4snecd.png)

24. Create your application.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u1mcgek0tmi19sj8u46f.png)











![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hsxeh0shw8beh0monrym.png)

21. You can now select Jason and click on "Create" to download it to your local driver.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ko1tubclf4s9f3y5u3mi.png)