Google Hangouts link in event descriptions - php

I use a PHP iCal library to import ics URLs from gmail. Everything worked fine until Friday (19th of January). Hangouts links are now included in the description of the events. I've read that there is a setting in the Google Admin console to disable automatic video calls but we can't ask each and everyone of our clients to go and disable this option. What is the easiest way to strip out these links? Keep in mind it's not only a URL. Also the text might appear in different languages.
This event has a Google Hangouts video call. Join: https://plus.google.com/hangouts/...
Does this have anything to do with the new Calendar app that Google launched recently?

Disabling the "Automatically add video calls to events created by a user" setting is the first step in solving this problem (per https://support.google.com/a/answer/6188027?hl=en).
However, it doesn't get rid of Hangout links in existing calendar events. I have multiple calendars going back over 15 years with thousands of events, and I noticed that even old events were filled with Hangouts links. Manually unchecking the Hangouts box in the Calendar web interface was not practical.
After searching far and wide, I found the Bulk Edit Calendar Events spreadsheet(?)/script that looked like it might be a good starting point to do this, but I was unable to get this to delete the Hangouts links (the script interface used there apparently does not allow modifying Hangouts on the calendar).
After contacting the author, he wrote a new script Remove Hangouts from events with a lower-level Calendar API (link is to my somewhat modified version), that removes only the Hangouts from each of the matching Calendar events. This needs to be imported into your Google space and run there (modifying the events from iCal doesn't get rid of the Hangout link), edited to set parameters, and authorized to run.
I'm leery of running unknown scripts with access to my Google account, but is short and simple enough to review that it is clearly doing what it should.

You have to ask users to disable it on their settings. It's what's stated in the support page:
Disable automatic video calls in Google
Calendar
By
default, video calls are automatically added to all Google Calendar
events.
Administrators can disable this setting. Users must then manually
click Add a video call every time a Google Calendar event is created.
To change the setting:
Sign in to the Google Admin console. Click Apps > G Suite > Calendar.
Click Sharing settings. Under Video Calls, uncheck Automatically add
video calls to events created by a user.

Related

Add a link to email to allow users add events created on website to their calendar

I am trying to add a feature to my website that allows users to add an event created on the website to their calendar.
Basically the app allows users to schedule a meeting and after which the meeting is sent to the mail of members of the site. What I want to do is to add a link with the meeting details to the site so users can click on it to add the event to their calendar, majorly google and office 365 calendars.
I have tried initially with google calendar apis but I can't seem to figure out what to do with the apis given. I was going to try with schema (with reference from google calendar api) to allow users to execute click actions but I realized it wont allow me to add events to the calendar but could be used to trigger certain actions which is not what I need at the moment.
I am building the app with laravel and can send the markdown email alright just need to be able to allow users a click action to add events to their calendar.
Thanks in advance.
Lance, the action taken when an ics file is clicked upon depends on the users application and their personal setup. For example on my desktop I have it set that a .ics file will be opened in notepad++, whereas my iphone will have a more standard response. Then in Google for example it will automatically show events in google calendar that it has found in my gmail emails.
Other than sending the .ics in email, Some other things you can do:
offer a 'Add to Google Calendar' button with html link. More info here: Link to add to Google calendar. This prompts add to default calendar.
Example:
http://www.google.com/calendar/event?action=TEMPLATE&text=Friday%20Drinks&dates=20200501T080000Z/20200501T090000Z&location=407%20King%20St,%20Newtown%202042&trp=false&details=Regular%20Friday%20Night%20Get%20together%20at%20Earls%20Juke%20Joint
OR
offer a subscribable link on the website, unique to each user, of all meetings arranged. Once they have subscribed they will automatically see new ones. These would show in a separate calendar though.
I'm not aware of an Outlook 365 equivalent of the google 'TEMPLATE' - possibly they just go with the single event .ics.
You could use ics files, which are supported on most platforms.
A sample PHP Library is https://gist.github.com/jakebellacera/635416

Google Calendar API: How to create a "read-only" / non-editable event?

I'm trying to copy some events from my web app into a user's Google Calendar, with the catch that the events in the Google Calendar should not be editable once they're there (in particular, it should not be possible to change their time). In other words, the Google Calendar is meant to be a read-only mirror of what's in my app. I haven't been able to find any properties in the v3 API call that would make this possible; can I do this? Thanks!
#Jim Unfortunately I think there is no features yet that support your request. Some work around is to embed Google calendar to your web app.
On a computer, open Google Calendar. You can only get the code to embed in your website from a computer, not the mobile app.
In the top right, click Settings settings gear button > Settings.
Open the Calendars tab.
Click the name of the calendar you want to embed.
In the Embed This Calendar section, copy the iframe code displayed.
Open your website editor, then paste this code where you want the calendar to display
Note : Your embedded calendar will only be visible to people you've shared it with. To allow all visitors to see your calendar, you'll need to make it public.
Another tip is to remove check the option for guest can modify on event.
You can get more information from this SO question.

Is web calendar publishing (.ical or ics) pushed by publisher or pulled by subscriber?

In my custom php web application I want to publish an ical calendar using calendar events I'm selecting from my own database. After I create the ical file and create a link to it, and then the (iphone subscriber for example) sets up their subscription information to pull it, how do changes get sync'ed back to the subscriber after the initial pull? Is the subscriber software regularly polling for changes? Or do I have to push the changes somehow?
I've looked around for this information but there is not a concise answer.
An iCalendar feed is pulled by the client. There's no standard for how often or when it does this, it depends on your client when it decides to refresh.
Microsoft Outlook respects the X-PUBLISHED-TTL field.
Google Calendar refreshes every up to 8 hours.
Apple's iCal has a Refresh option in the menu.
Mozilla Thunderbird's Lightning add-on has a configurable refresh option.

Integrating Outlook Calendar to Website / Other

When the users add events to the online calendar they also can be added to the outlook calendar (synchronize). Obviously a site built using PHP can not integrate with desktop application directly, so I am looking alternative options.
Options I found:
Using PHP ICAL library creates an .ics file and the user can download it and install. Not the most user friendly way of doing it, might work.
Use SharePoint or exchange server- but have no previous experience working Microsoft technologies, so it not ideal.
Use Google Calendar and Zend Library (gdata), create online calendar and add events to that. Then using Google Calendar Sync tool the user can sync the online calendar to outlook. But the problem here is the all users need a gmail account to use the Sync tool, it not ideal when you have thousands of users on the site. Unless I create one global gmail account and create many calendars on that account, if that even possible.
Questions:
Are there any outlook plug-ins paid or free (ideally) that can achieve this?
Are there any web service/ APIs that can achieve this?
Any other ideas or solutions?
Office 365 comes with an REST API that can be used to read/write to calendars.
Here's some documentation on this. http://msdn.microsoft.com/office/office365/api/calendar-rest-operations
Alternatively, the EWS Managed API might be able to help you: http://msdn.microsoft.com/en-us/library/office/dd633696(v=exchg.80).aspx and
http://msdn.microsoft.com/en-us/library/office/dd633702(v=exchg.80).aspx
you could do this by having the outlook subscribe to the online calendar.
with phpicalendar you can have other clients subscribe to your calendars (here)
you may want to tweak the generated .ics file to include X-PUBLISHED-TTL - Recommended update interval for subscription to the calendar
To get the calender event follow these step:
Sign in to Calendar
On the toolbar, click Share
Select the calendar that you want to export/embed.
Click Get a link.
Under Show event details (click Create)
Note: If step number 5 is already performed, just skip it and click Link to event details
Copy the link that you needed and paste it on the desired program/website.
Use EWS exchange webservice to achieve this.
If it is a website with a no. of users u will need to create OU in exchange server and add a admin user who has read permissions to all accounts in the DL.
EWS exposes endpoints where in u can fetch the calendar mail add read and do all kind of operations.
Building off Rahul's idea but using a different approach - Microsoft provides something similar to a "RSS feed" that auto updates each time you GET the URL, except it's an feed of "ICS" event data:
Open up Outlook Web Access (OWA), e.g. if you are using a microsoft.com account the URL might be https://outlook.live.com/calendar/ (if you are using some other Microsoft 365 account the URL may be different)
On the top right, click the Settings icon
Click View all Outlook Settings
Click Calendar > Shared Calendars > and under Publish a calendar, select the calendar, then under Select permissions, choose as appropriate, then click Publish
It will give you HTML and ICS links. Copy the ICS link URL.
Use your favourite programming language/tool/software to periodically do a HTTPS request (using CURL or AJAX or some other HTTP fetch) using GET method to the URL you got in step 5. You will get back a bunch of calendar data in ICS format. Use this however you need. You may be able to find some pre-written code from elsewhere that parses ICS data for you, or you can manually create your own parser code if you have to.

Google Calendar sync with php in 2 ways

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.

Categories