Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to deploy the gmail plugin to my Google Apps Scripts #34

Open
utkarshns opened this issue Mar 10, 2023 · 3 comments
Open

Unable to deploy the gmail plugin to my Google Apps Scripts #34

utkarshns opened this issue Mar 10, 2023 · 3 comments

Comments

@utkarshns
Copy link

The Objective:
To enable odoo gmail plugin for my on-prem odoo installtion.

The Problem:
Following this after modifying the login.ts as suggested here

So, when I try to enable gmail plugin by clasp apis enable gmail
I get the following error:

response: { config: { url: 'https://serviceusage.googleapis.com/v1/projects/odoo-gmail-304313/services/gmail.googleapis.com:enable', method: 'POST', userAgentDirectives: [Array], paramsSerializer: [Function (anonymous)], headers: [Object], params: {}, validateStatus: [Function (anonymous)], retry: true, responseType: 'json', retryConfig: [Object] }, data: { error: [Object] }, headers: { 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000', 'cache-control': 'private', connection: 'close', 'content-encoding': 'gzip', 'content-type': 'application/json; charset=UTF-8', date: 'Fri, 10 Mar 2023 11:04:49 GMT', server: 'ESF', 'transfer-encoding': 'chunked', vary: 'Origin, X-Origin, Referer', 'x-content-type-options': 'nosniff', 'x-frame-options': 'SAMEORIGIN', 'x-xss-protection': '0' }, status: 403, statusText: 'Forbidden', request: { responseURL: 'https://serviceusage.googleapis.com/v1/projects/odoo-gmail-304313/services/gmail.googleapis.com:enable' } }, config: { url: 'https://serviceusage.googleapis.com/v1/projects/odoo-gmail-304313/services/gmail.googleapis.com:enable', method: 'POST', userAgentDirectives: [ [Object] ], paramsSerializer: [Function (anonymous)], headers: { 'x-goog-api-client': 'gdcl/5.1.0 gl-node/14.21.3 auth/7.14.1', 'Accept-Encoding': 'gzip', 'User-Agent': 'google-api-nodejs-client/5.1.0 (gzip)', Authorization: 'Bearer REDACTED', Accept: 'application/json' }, params: {}, validateStatus: [Function (anonymous)], retry: true, responseType: 'json', retryConfig: { currentRetryAttempt: 0, retry: 3, httpMethodsToRetry: [Array], noResponseRetries: 2, statusCodesToRetry: [Array] } }, code: 403, errors: [ { message: 'Permission denied to enable service [gmail.googleapis.com]\n' + 'Help Token: REDACTED', domain: 'global', reason: 'forbidden' } ] } API gmail doesn't exist. Try 'clasp apis enable sheets'.

I have enabled Google Apps Script for my Gsuite Account.

@wrych
Copy link

wrych commented Mar 31, 2023

The way I solved this was by entering the gmail folder, deleting .clasp.json and then creating a new project (clasp create <PROJECT_NAME>) and pushing (clasp push) it to my gmail business account. From there, the apis work after you link it to a google cloud project. Be aware, though, we had to do some code changes to the code to make it run.

I would be interested what solutions other users have found?

@utkarshns
Copy link
Author

utkarshns commented Mar 31, 2023

@wrych
Hey, thanks a ton for your input.
I deleted the .clasp.json and created a new one by clasp create gmailPlugin
then I did clasp push after than clasp open which gets me to the business account apps script page.
What do I do from there?

@wrych
Copy link

wrych commented Mar 31, 2023

@utkarshns

Do a clasp open, then in the brower navigate to the project's settings, create a google cloud project.

image

After doing so, you may install it for your self by going to the code tab > deploy > test deployments. At that point, you will run into #33.

I have a working fork, but please be aware that there are not warranties whatsoever that we will maintain this fork. I am open to accept contributions, though.

https://github.com/wrych/mail-client-extensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants