Integrating Google Calendar Data with SharePoint using Microsoft Flow

It can be time consuming to update multiple calendars. You can now setup custom flows using Microsoft Flow to copy and edit data between the two calendars.

Google Calendar to SharePoint

In the example below, I create a Microsoft Flow to detect when a new Google Calendar item is added and then create a new item in a SharePoint calendar.

First of all, open Microsoft Flow.

Microsoft Flow

Select “Create from blank” to open the flow editor

Search for the correct trigger by typing “Google” into the search box. You should see “Google Calendar – When an event is added to a calendar”. We will use this trigger to detect when a new item is added to the Google calendar.

Google Calendar trigger

When prompted, sign into your Google account and allow access to the calendar.

We are now going to add another step to the flow to add the items into our SharePoint calendar. Click “New Step” and then Add an action.

New flow step

Search for “SharePoint – Create item”, add the URL and list name. This should load up all the calendar new item fields.

Click in each field and select the output from the previous step (the google calendar data). You may wish to populate the Title, Start Time, End Time, Location and Description.

New SharePoint calendar item

Select “Create flow” when you are ready to publish the new task. It can take a few seconds for the task to run once the Google calendar item has been added. You can check the progress and status of the task from the Flow site.

There are other things to consider when setting this up such as all day events, recurrence, editing items and deleting items. However, you should be able to extend the logic in the flow to handle these data types. Below is a video guide going through the process.

Creating a simple Microsoft Flow for a SharePoint list

For anyone using the new style SharePoint lists, there is now a new action for Microsoft Flow integration. It’s a really cool product that integrates all the Office 365 products (and more) into your workflow.

SharePoint Designer workflows still have their place but the Microsoft Flow interface offers rich functionality and is easy to view and structure workflows.

One downside to using Microsoft Flow is the error messages. They come back as error messages from the REST API as headers which can be very confusing for non-technical users. SharePoint Designer errors were much clearer and easy to understand for general users.

In the video below, I go through quickly creating a Microsoft Flow from a new style SharePoint list in an Office 365 group site.

Creating a picture library slideshow using jQuery Cycle2 and the SharePoint framework

In this post, I wanted to show how you can modify the SharePoint framework Hello World web part and add other custom JavaScript libraries to create a simple slideshow.



I’m going to start my tutorial after following these steps:

Setup SharePoint Tenant
Setup your machine
HelloWorld WebPart
HelloWorld, Talking to SharePoint

Once that is all working fine, you should have something that looks like this:


Note: In the solution below, I have removed some of the HTML rendered in the SolutionNameWebPart.ts file (optional):

this.domElement.innerHTML = `
<div class="${styles.solutionName}">
  <div class="${styles.container}">
    <div id="spListContainer" />

Pull in images from SharePoint picture library

Create a picture library in your SharePoint site called “Slideshow”. Upload a couple of images into this library for testing purposes.

Inside your project, open up SolutionNameWebPart.ts (found inside your WebPart folder). Change the REST API call so that the picture library item URLs are fetched. Currently the REST query (found in the _getListData function) is pulling list and library names, change it to:

this.context.pageContext.web.absoluteUrl + "/_api/web/lists/GetByTitle('slideshow')/Items?$select=EncodedAbsUrl"

This will return the picture library item URLs.

Add the EncodedAbsUrl as a string to the ISPList object:

export interface ISPList {
  Title: string;
  Id: string;
  EncodedAbsUrl: string;

In the “_renderList” function, change the item loop to this:

items.forEach((item: ISPList) => {
   html += `<img src="${item.EncodedAbsUrl}" alt="image" />`;

This will now use the EncodedAbsUrl as the image location. Running this using gulp serve should now show the images from the picture library. You may want to add in some mock data for local tests.


Making it responsive

The images are rendered at their actual size. Some CSS is required to make the images responsive. Add the class ${styles.cdbImage} to the image tag.

html += `<img src="${item.EncodedAbsUrl}" class="${styles.cdbImage}" alt="image" />`;

Open the SolutionName.module.scss file and add the following code inside the last brace.


Serve the files again and the images will now be responsive.


Adding jQuery and Cycle2

Download using Node Package Manager

When adding common JavaScript libraries to projects, Node Package Manager is an excellent tool to quickly bundle items. Run the following nodeJS package manager commands:

npm install jquery

npm install jquery-cycle-2

Two extra folders are now created under “node_modules”.

Install TypeScript definitions

In order to use these libraries in TypeScript, a definition file is required for IntelliSense and compilation. jQuery can be added via the TypeScript definition tool in the nodeJS command line:

tsd install jquery –save

jQuery Cycle2 is not available via this command line but can be downloaded from here:

Github jQuery TypeScript

Download it and add it to a new folder called jquerycycle under the “typings” folder. The typings folder contains all the TypeScript definition files. jQuery has automatically been added here. However we need to manually add the Cycle2 definition.

In the root of the typings folder, open the file named tsd.d.ts. This file controls all the definitions which are used in the project. jQuery has already been added, manually add a new line for jQuery Cycle2.

/// <reference path="jquery/jquery.d.ts" />
/// <reference path="jquerycycle/jquery.cycle.d.ts" />

Add libraries to project

Open the config.json file (under the config folder) in the project. This lists all the external references. jQuery and Cycle2 need to be added here so they can be used in the project. In the “externals” section, add:

 "jquery": "node_modules/jquery/dist/jquery.js",
 "jquery-cycle": "node_modules/jquery-cycle-2/src/jquery.cycle.all.js"

The libraries can now be included in the project. Go back to the solutionNameWebPart.ts file and add:

import * as myjQuery from 'jquery';

The object myjQuery should be a unique name for your project to avoid conflicts. jQuery cycle is added using require as it has a dependency on jQuery.

At the end of the _renderList function in the web part class, add the following code to initialise the slideshow:

myjQuery( document ).ready(function() {

Refreshing the page, should now give you a responsive slideshow.


Creating a new SharePoint framework project using NodeJS

It’s finally been released as a preview! Please note that backwards compatibility will not be supported so don’t start any production work yet, this is for testing and feedback only!

It can be downloaded from GitHub now, I go through the process below but the official instructions are here (and really straightforward):

Getting familiar with the new environment

It takes some practice and learning to understand how the node package manager works along with Gulp and Yeoman. It can be a steep learning curve but there are some great Angular tutorials to help get familiar with the setup and technologies.

Error messages and path limitations

Even creating a new project can generate a large amount of errors. It’s important to get familiar with these errors and how to resolve them.

One important item to consider when creating a new project is the project path. The project folder structure can get very large and reach the limit allowed on windows machines. Try creating all the projects in a short path such as “C:\dev” to avoid hitting that limitation when generating projects.

Node Package Manager

Before starting, install NodeJS.

Install Yeoman and Gulp

All the other pre-requisites are installed via the NodeJS command line. It is very easy to add frameworks and components using this method.

Yeoman is a generator which will gather all the frameworks required and pull them down into the project. It is marketed as a scaffolding tool for modern WebApps. SharePoint has a Yeoman generator, this creates the project and downloads any dependencies.

Gulp is a JavaScript task runner. It provides a workflow to build, compile and optimise libraries and stylesheets. It also refreshes the browser as changes are made. Gulp will load the SharePoint workbench and refresh any changes made to the code live.

Yeoman and Gulp are installed from the NodeJS command line using the following line:

npm i -g yo gulp

Install the Yeoman SharePoint generator

The Yeoman generator for SharePoint is very similar to the old Visual Studio templates. Download the Microsoft SharePoint generator using the following line:

npm i -g @microsoft/generator-sharepoint

Creating a new project

Open up the NodeJS command line and navigate to your project folder (remember to keep the path short). Run the following line to create the new SharePoint web part project template:

yo @microsoft/sharepoint

Follow the instructions for entering the project details. Errors may appear on the screen which will need to be resolved at some point. This process takes around 20 to 30 minutes.

Running the SharePoint workbench

Test the new project template by running this command:

gulp serve

SharePoint workbench

The SharePoint workbench runs locally (so there isn’t a dependency to have a SharePoint farm or tenancy setup in the development environment).

Editing the code

Any text editor can be used to make changes to the code but it’s worth looking at Visual Studio Code. It is free!

These open source solutions are platform dependant so these projects don’t have to be created on a windows PC.

More resources

There are some detailed blog posts on all of the items skimmed above. Please read them and get up to speed with NodeJS before diving straight in with SharePoint.

Stefan Bauer’s blog posts on NodeJS and the SharePoint Framework
Chris O’Brien’s SharePoint Framework blog posts
Setup your environment
Official Microsoft starter tutorials

Gaining access to OneDrives within your organisation

Below I have created a quick guide to show you how to gain access to a user’s OneDrive within your organisation. This video is for SharePoint administrators and you will need to be at least a SharePoint admin in Office 365 to carry out these steps.

A OneDrive site is effectively a SharePoint site collection with a document library. When a OneDrive is created by the user in Office 365, it grants the user site collection admin rights. It doesn’t add any other administrators or groups to the permissions. You can do this manually using the steps shown in the video below or you could create a script to apply permissions to all of your OneDrive sites using the PowerShell Client Object Model.

Tag people in Office 365 videos

A new feature is available in the Office 365 video portal to tag people in videos. Not quite sure what this will be used for at the moment but I’m guessing that Delve will certainly be impacted by this new functionality. I’ve created a very quick video below to show you how it works.

You may also be interested in some of our other videos on the Office 365 portal:

Managing assignments in Microsoft Classroom

I’ve created a quick video to show the ease of setting and managing assignments in Office 365. My overall impression of assignment setting in Office 365 was good, however as you see in the video there are several random errors and UK MIS integration isn’t available at the moment (so this is only for advanced teachers who setup their own class groups).

Microsoft Classroom allows assignment setting and homework management. It can be used as part of a wider SharePoint portal hosted in Office 365. Please feel free to contact us for a demo of this at Cloud Design Box.

How to setup a class in Microsoft Classroom

In the video below, I go through the simple steps of setting up a class in Microsoft Classroom. It’s straightforward but does require teachers to manually setup and keep class membership up-to-date. Third party integration to MIS databases will be available soon in the UK (hopefully). In the meantime you can use a similar assignment system called Teacher Dashboard which has the option of syncing AD and Office 365 groups.

Microsoft Classroom is a great out-of-the-box product but doesn’t allow much customisation so you may want to think about some custom class and subject sites as part of your portal. Please feel free to contact us for a demo of these at Cloud Design Box.

Issues with the new SharePoint interface for document and picture libraries

Let’s start with the positive aspects of this new interface. It’s responsive and integrates really well into the OneDrive app for mobile devices. However there are currently a number of setbacks for users when switching to the new look interface. Users should consider it carefully before turning the new interface on at tenancy level or on a per user basis.

New Document and Picture Library

No JS Link property

Microsoft have mentioned that there is still some functionality to roll out, however they have not been specific about what that will include. A large number of businesses use JS Link to highlight data in a list or library and to add some custom actions at the item level. This is done using the Microsoft best practices of using client side JavaScript, however we are still awaiting this functionality in the new interface. New features are being added to the new interface such as content types and custom columns so we can only hope that this will also be added before the full implementation of the new interface in 2017.

No JS actions to brand the interface

A while ago I blogged about using JS instead of custom master pages to brand the look and feel. Again this is client side code and was Microsoft best practice, however this doesn’t seem to apply to the new view. The new look interface despite being modern and minimalist is bland and unbranded. Most companies/schools want branded intranets, they are always keen to get away from the “SharePoint” look. Although the new interface is modern and responsive, all of the pages look the same and it is possible that we will fall into the trap of looking like SharePoint again. Theming engines do not offer the bespoke customisation that most users require. The future of SharePoint event and videos did mention a chrome as part of the SharePoint framework so we can only hope that this is exposed to JS developers.

No image link in picture libraries

On occasions users require a link to a document or image inside a library. This used to be easy for users to do, open it up and copy the URL. This is no longer possible for an image library as each image opens up in a lightbox view. There are no options to get a link to the exact image, in fact there is an option called “get a link” but this shares the image and changes the permissions rather than giving a URL link (for users to use on a site or email).

These are the initial issues I have found with the new look interface. It seems to be have been rushed out to tenancies without investigation into how customers use library views within SharePoint. Although there is a benefit having a similar interface to OneDrive and having it work as a single page application, the fact that it is part of a SharePoint site and has that extra SharePoint functionality makes it usable to end users. The new views will run side by side until 2017, hopefully by then Microsoft will have resolved the issues and released the new SharePoint framework for Microsoft partners (due to go live in autumn 2016) to get developing branding and custom JS solutions.

UPDATE: 08/07/2016

Microsoft have released this update confirming that there is still functionality to be added to the new user experience. Looks very positive for JS links and other missing functionality:

How to show SharePoint list data in a pivot table

List data inside SharePoint can be pulled into Excel as a data source which can in turn be embedded on a SharePoint page as a graphical representation of the SharePoint list data. Great way to spice up your SharePoint page with graphical content and the functionality is built into SharePoint online. It’s also available in SharePoint on-premises 2010, 2013 and 2016 if you have Office Web Apps configured or excel services enabled.

Excel graph on SharePoint page

First open excel and go to “Data” in the ribbon and “From other sources”, select “From OData Data Feed”.

import sharepoint list data to excel

Copy and paste the URL of the site adding “_vti_bin/listdata.svc” at the end.

connecting to sharepoint

Select your list when prompted and a pivot table will appear. Select a few columns to populate it with data.

Pivot chart in excel

Save the excel file and upload it into a SharePoint document library on your site.

Edit the page and add the “Excel Web Access” web part under the business data category.

adding excel web access web part to sharepoint page

In the web part properties select the excel document and optionally enter a named item such as a pivot chart or table. Your chart is now on the SharePoint page and can be configured to refresh at intervals. It’s a great way to visualise SharePoint list data easily without any third party products.

web part on page

Watch the video guide below for a more detailed explanation and guide.