I am using Python, Gmail API and Google Calendar API to retrieve emails and then use those information to make events in Google Calendar. I was able to do this, however I want to rerun these code periodically so it can make new events when new emails are received. Whenever I rerun, I stumble upon duplicates, and I don’t know how I can prevent that. This is my first time using stack overflow, please let me know if you need more details to help me out.
So far I have done set() to keep track of the titles of events that have already been added to the calendar. I was hoping by checking whether a new event’s title is already in this set before adding it, duplicates are avoided, but it is not working in my favor. After many trials and errors, I just see duplicates of the events that has already been created. How can I overcome this?
ashhteroid is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.