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

Function save email to google sheet error #22

Open
goldcoders opened this issue Jun 8, 2020 · 2 comments
Open

Function save email to google sheet error #22

goldcoders opened this issue Jun 8, 2020 · 2 comments

Comments

@goldcoders
Copy link

Is there anything missing here?
i copy the code to a fresh function folder and invoke the function
but i keep getting this error

SyntaxError: Unexpected token } in JSON at position 0

i did npm install googleapi and dotenv

Im not sure what im missing,

I also have my own .env file that contains GOOGLE_SERVICE_ACCOUNT

and also change the google sheet id to mine ...

@grod220
Copy link
Owner

grod220 commented Jun 8, 2020

Did you grant access your service account edit access in your google sheet?

For example, I used the share button in my sheet and gave access to my service account email:
ccstockholm***@*****.iam.gserviceaccount.com

@goldcoders
Copy link
Author

can you add that in the read me file , thanks

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