googleworkspace / python-samples

🐍 Python samples for Google Workspace APIs
Apache License 2.0
1.2k stars 895 forks source link

docs_mail_merg Issues #810

Open thebaker05 opened 1 year ago

thebaker05 commented 1 year ago

Summary

https://github.com/googleworkspace/python-samples/blob/main/docs/mail-merge/docs_mail_merge.py --> docs_mail_merge

Expected Behavior

access to links Produced and for the resultant mail merge files to be deposited in my folders.

Actual Behavior

Receive the following message:

Merged letter 1: docs.google.com/document/d/11ePx7cP-M49rBVtF4gvaMBA02ZH92W5xOK5DXOzdH9Q/edit Merged letter 2: docs.google.com/document/d/1to3zGwJYsBflIeiOm9pydNOdmQ9IJDXxbtNADEsylkA/edit

like from this angle it looks like my code has run perfectly fine but then. I visit the links and it asks for me to request access even though, I performed all the previous steps using the same Gmail account ( i.e. built all the credentials using the same Gmail account, etc).

Steps to Reproduce the Problem

Specifications

thebaker05 commented 1 year ago
wdockery commented 1 month ago

I am having precisely the same problem after coming across the mail-merge quickstart yesterday and giving it a spin. Has anyone discovered the problem/solution?

thebaker05 commented 1 month ago

Hey @wdockery , you will have to "# Establish new permissions for the document" for your document. ( basically put your code through chatgpt and ask it to "# Establish new permissions for the document" ) Should attach code some where in it like this :

"# Establish new permissions for the document" new_permission = { 'type': 'user', 'role': 'writer', 'emailAddress': 'youremail@email.com' }

Hopefully that should work. again message if you have any questions or that doesnt work