Newbie having trouble
Hi there, I've tried this on both my Google Workspace and personal account and get the same error when I run the script
Exception: Cannot retrieve the next object: iterator has reached the end. RefreshSyncToken @ Code.gs:528 ClientInit @ Code.gs:205
Any clue what I'm doing wrong? I have gone through it a few times and can't find any skipped steps. Thanks in advance, this will be a godsend once it's running!
There appears to be something wrong with the script finding the synctoken file. Be sure you have granted the script all of the permissions it asks for. Also, ensure you followed step 12:
- Create an empty text file on your computer and then upload it to your Google drive (be sure the option to automatically convert uploaded files to Google file format is turned OFF). It does not matter where you put the file in your Google drive. However, for convenience, just put it in the directory with the spreadsheet:
Please let me know if that works or if it throws another error.
Did you ever get this working?
I had this issue and solved it by sharing the file [email protected]_PeopleSyncToken.txt, stored in the mater account drive, with the [email protected] account.
@noamross I don't think that was your problem. There should be a different sync token file in each of your accounts, and it doesn't need to be shared with the other accounts. In fact, if one account somehow accesses the other account's token file, it would mess up your sync.
Tangent: here's a quick warning, too: DON'T pen the sync token file using the Google Drive editor. Google Drive will create a new Google Docs version of the file... and this will also mess up your sync. If you need to examine that file for any reason, download it first, and open it locally using Notepad or whatever text editor you use.