How can I receive event info when it is created on google calender site ..
I want to get the event and process it using my script ..
example :
1- user create an event in Google Calender site
2- Google push the event to my url www.example.com/event.php
3-event.php will process the event data
the question how can configure Calender to send the creation event? is this applicable or should i use cron job to query Google calander and fetch events
Google introduced push notifications for calendar,
for more details refer http://googledevelopers.blogspot.ch/2013/07/google-calendar-api-push-notifications.html
Related
I have created a code which generates .ics to synchronize events from my application to other calendar system like google, mac-ical, outlook etc.
I add url to these systems and all events from my application get synchronized.
This code does work fine but problem is event doesn't get synchronized instantly, it takes time to fetch events automatically.
So I want to make all events to get pushed to all subcribers, so that they get instantly updated, many applications do provide such things, in that I get instant update to my iCal on creating event.
So that is possible, I want to know how can I do it using php language, what technology I need to push events, instead of auto fetching by calendar system.
It will get general push to all subscribers not for any particular system like google calendar, I know it does have its own API.
I have created a Calendar App where users can add their events and user can sync this Calendar with their Google Calendar. Basically, it is a two-way syncing.
Here is how it's working:
When a user adds a new event in the calendar app, it is adding to Google Calendar.
When User Adding an event in Google Calendar directly it is syncing to my Calendar App via Calendar Notifications (Channel notification).
Problem is that when user adding an event in my calendar App it's adding to Google Calendar and I am getting sync notification and system adding/updating the recently added event again.
So, I am searching a way that I should not get sync notification when an event just added from my Calendar App.
I'm working with Google calendar API, all my site is about to manage my appointments.
Now I'm integrating Google calendar to my site, so if I add or update any from my site the same are going to change in my Google calendar. If I change details in calendar I need to get my site DB updated via Push mechanism. Now I've established connection/mechanism to update the event details so if I change the date/time in my calendar my code is changing my DB with respect to Google calendar new date/time on that event via Push.
But I'm not sure how to delete any event which I delete in my calendar, for example:
If I delete an existing appointment in my calendar, that needs to be deleted in my DB too so it wont list on my appointment list.
Can someone help me how to track event deletion from Google API?
Is there a flag to notify at all?
Deleted events have status set to "cancelled".
If you want to also have cancelled events included in the events list requests, you should specify showDeleted=true as a request parameter.
Check out the documentation for details
https://developers.google.com/google-apps/calendar/v3/reference/events/list
I have created iCal event by using iCalcreator. I want to make the google calendar so that it syncs automatically. I can create the .ical file that I will be importing or adding by URL. After I login into Gmail it is working. How can I make my events to automatically add to calendar by using the URL dynamically?
would the feature under
other calendars
>import by URL
be what you are looking for?
provided your URL always points to the up to date calendar your google calendar will always be up to date (down to the synch frequency of google calendar) and you or anyone who you shared you google calendar url with will have access to it
I am creating a php website that uses the Google Calendar API. It's working fine with Create, Update and Delete: any event from the PHP website goes into my Google Calendar events after login.
Events created on my site are created in Google Calendar.
What I want now that is: when I create an event from my test page it goes into Google Calendar after login, then if I update or delete that event from Google Calendar then it should automatically update or delete the php website event.
Basically: 1-way sync is working fine but now I want 2-way synchronization.
If anybody has any ideas then kindly share with me, it will be much appreciated.
There are no application hooks in Google Calendar (gCal) that allow you to trigger an action when an event is deleted. Instead you must either poll gCal at intervals (this could be a cron job every few minutes/hours) and update your calendar accordingly, or any time you perform an action from your calendar have a 1 in X possibly of a full re-sync.
This implies that you are using the gCal as the definitive source, and mirroring those changes back to your local application.
well, after following these answers and building a hole 2 way sync process,
i realized there's a push notifications for calendar since 2013.
you will still need a full sync process because the push notification only notifies about a change but no data about the change.
hope it will save you some time.
Push Notifications
Would it not be an option for your system to generate an iCal output at a special, user-specific URL, and then have the user subscribe to that calendar in Google Calendars (or their iCal-reading calendar of choice)?
That way, your system would always hold the authorative calendar, and Google Calendar would reflect any changes you make automatically.
Alternately, if you are wanting changes in the Google Calendar to be reflected in your application, then you may be able to subscribe to iCals for the User's Calendar, and then poll them at a regular interval to reflect any changes the User has made at that end.
I would lean towards the first option (your iCal subscribed through Google Calendar), as it is a simpler and easier solution.