I've been able to programmatically develop a 2 way sync between my Fullcalendar and my Google Calendar using php and javascript. My fullcalendar displays events from a Mysql database as well as events from Google calendar.
The problem I am having is that my when my mysql fullcalendar events load into my Google calendar, I then see the mysql events 2x on my fullcalendar...one from mysql and then the one coming back from Google. I need to continue displaying the event created by mysql and discontinue displaying the google events....but only the google events that originated from mysql.
In essense I need to filter out the Google Calendar events that originated from my database, but display google calendar events that were entered manually into the Google Calendar.
When I send the mysql events to google, I currentlty store the returned google calendar id, $gcal_id = $createdEvent->getId() into mysql. My intent is to read the google api callback and filter out the gCal$uid's that match the id's I stored in mysql.
I cannot figure out how to access the gCal$uid values found in the google api callback, and then compare them to an array of id's pulled from the database.
Any ideas or code snippets would be greatly appreciated.
Thank you.
I attacked the problem from a different angle and was able to solve the problem of duplicate entries appearing on my fullcalendar.
As the calendar loads each event, i compare the events id, (minus the #google), to the gcal ids I stored in the database in FullCalendar's "eventAfterRender". If I get a match I use FullCalendar's 'removeEvents' to remove the duplicate event from the Calendar.
I'm having inconsistant results. The process will work several times in a row then all of a sudden stop working. I'm still troubleshooting although it's difficult due to the lack of documentation for PHP.
Anyways, the incoming to FullCalendar from Google Calendar is a breeze compared to the outgoing to google calendar.
For the incoming you need to provide instructions to the user on how to attain their Public or Private XML feedk. The steps to get the Public XML are detailed here http://arshaw.com/fullcalendar/docs/google_calendar/
To get the Private XML just don't make your calendar public and then click the XML button in the Private section.
There are some other steps but they are all detailed in the link the provided.
I'll provide more detailed info on the outgoing sync to google once I get it all worked out
BTW- why can't you send me a private message. Is there something I need to change in my stackoverflow settings?
Related
I am working on Google Apps script that will list all Out of office events from the calendar of someone from my organization.
Calendar is made available for my organization, but limited to free/busy data (and I cannot change the sharing settings). The Out of office events are public by default, so when I open someones calendar in the Calendar application, I can see the out of office events. I am not able to do it using API.
Any ideas? :)
I tried:
let currentCalendar = CalendarApp.getCalendarById("someone#organization.com"); - returns null
response = Calendar.Events.list("someone#organization.com", params); - returns response with empty collection of events and accessRole: "freeBusyReader".
I would like to now if the following functionality is supported by google calendar api:
Does the functionality provided by "Push notifications" include new events or just existing ones. Here is a copy paste from the documentation that let me doubt that new event notifications are supported "The Google Calendar API provides push notifications that let you watch for changes to resources.". So does this only apply to already existing resources (events on my case).
Is there a way to limit the availability on the google calendar. By this I mean setting a general limit (i.e working hours for a company for example from 9am to 5pm). And putting the logic further, is there a way to add more constraints. For example after I receive a notification of a new event created (if this functionality is provided), I check the event's data in my web-hook and let google calendar know that this event shouldn't be considered as valid.
If these requirements are not provided already by google calendar API, I am open to any suggestions to accomplish this even if it takes more coding.
Just to make it clear. The context of these questions is when the user creates an event in their google calendar through google calendar web interface not through my application.
I am somewhat new to this, and I've been building an app on low code platform Bubble.io. I've recently been trying to learn the Google Calendar API to integrate a new function into my app.
Here's what I'm trying to enable: a Calendly-esque function where a user of the app can connect their Google Calender. The user can then send a url to non-users of the app to book time with the user on the user's Google Calendar.
Here's my question: how can someone book time on another persons calendar without making the calendar public? From what I've been researching the calendar has to be public to book without authorizaton, but Calendly manages to do this without making a calendar public.
Thank you in advance to anyone who takes time to read / respond!
if you're still trying to solve this, yes this is possible. Two ways I know this can be done:
Nylas, which would also allow you to integrate with Microsoft/Outlook calendars using the same API calls https://www.nylas.com/
Google Calendar API https://developers.google.com/calendar
Both of these will require you to set up OAuth functions, and might require some custom javascript actions (but also might not). When I tried to set up Nylas using Bubble several months ago, it was not possible to create a Bubble OAuth flow using the API Connector with Nylas. Instead, I had to create a custom flow and it was quite confusing to set up, but eventually worked to do what you've described.
I'd like for my app to add/delete/update events on a user's Google Calendar. The app only needs to delete and update events that the app itself has added.
Have I understood it correctly, that in order for this to work, the users have to give the app full access to their Google Calendars, meaning that the app could potentially read and delete private events on any calendar?
Or, is there a way to limit the access that a user gives to the app, for example, allowing the app to create a single calendar and only giving it access to events on that one calendar?
I've read through the relevant Google Calendar API, and I'm not seeing that this is possible. However, giving full access seems crazy and unnecessary!
It seems that this isn't possible. Google, why!?
What I ended up doing was skipping the API and using a calendar subscription. Limited use since the user needs to be able to set up a subscription and, especially, because Google takes up to a day to update subscribed calendars.
We have a shared calender and we want to find out who edited or deleted the event using google calender api. Is there anyway we can find out this?
You need Calendar audit log.
Track calendar notifications and view changes to your users’
calendars, events, and subscriptions
You can follow the steps provided to find out who have made changes in you public calendar.
Using the API, you can visit Calendar Activity Events.