Pages

Thursday, May 17, 2018

Gmail: Blast from the Past!

I've subscribed to Office 365 and installed Outlook to access my Gmail account. Just for testing. I haven't gone insane.

One of the interesting default features of Outlook is that it downloads every single email you've ever received. Every one. By default. Given that GDPR is on the horizon (7 days and counting!) I thought you might be interested in this one before the bonfire of the emails begins.

Gmail was launched on 1st April 2004 (the entire History of which is available here via Wikipedia), I purchased a beta key off of eBay (I think!) and signed up in February 2005.

Here's the first ever email I received in my Gmail account; a Welcome from the Gmail Team:

Original Gmail "welcome" email

My particular favourite section;

"As you're using Gmail, you might also see some ads or related links. We believe that you shouldn't have to share your inbox with large, blinking, irrelevant ads. Gmail's small text ads are matched by computers, and designed to be relevant to the messages you're viewing. Which means for once, you might even find ads to be interesting and useful."

See? Outlook can be useful for some things ...

Friday, May 11, 2018

Office 365: Creating a Simple Flow (Workflow) in a SharePoint Online Document Library

I've not done a great deal of playing around with SharePoint Online in the past and so jumped at the chance during a recent rollout. One of the things I've always wanted to do is automatically group documents in a SharePoint document library based on the name of the file. To me this feature has always been one of the ones I've most wanted - the ability to name a word document (for example);

High-Level Design - Microsoft - Exchange - Andy Pellew - 20180510.doc

And have the SharePoint document library where I've saved it extract the Document Type, Vendor, Software, Author, and Date directly into the corresponding properties of the document in the SharePoint library (rather than getting the user to update it manually) would be fantastic. In SharePoint Online with the new "Flow" functionality, it looks like this was possible *without* having to resort to SharePoint designer (and the consequent "upgrade issues" use of that software always seems to raise).

So to test this, I set up a new document library called "Help and Support". I added a column called "Active" as a simple Yes/No column (default "Yes"), and then created an "Active Documents" view to only show documents with "Active" set to "yes", and left the "All Documents" view to show everything. I created a new flow (clicking on "Flow" and then "Create a flow").

Once I was happy it was working I  uploaded a few documents;

SharePoint Online document library
You'll notice that all the documents in the view are PDF's. While it would be great to jump straight in and create all the columns I listed above it would be a little complicated for this post, so I'm going to make it simple; if it's a PDF active is "yes", if it's not then active is "no". Clear?

Let's see how it works. Clicking on "Flow" and then "See your flows" takes you to a new page;

My Flows
Clicking on the name of the flow "When a new file is added in SharePoint, complete a custom action", this then takes you to the details page;

My Flows > Flow Details
As you can see I haven't changed the description from the default (terrible practice, if it were staying then I would update it!).

Clicking "Edit flow" at the top shows the flow;

Flow details
As you can see this is an effortless flow. Basically, it's just a simple condition (does it end in pdf), followed by setting the property depending on the result (yes or no)*.

Starting at the top; the flow fires every time a file is created.

The condition was a relatively simple "end with .pdf" however I wanted to add a small amount of complexity here by converting the name of the file into lowercase so that PDF, Pdf, pdf, etc. are all treated the same. This made things a bit more complicated as there didn't seem to be a way to use the simple editor to do this and I was forced to click "Edit in advanced mode". The code I added was this;

@endswith(toLower(triggerBody()?['{FilenameWithExtension}']), '.pdf')

From the simple dialogue I started with this;

@endswith(triggerBody()?['{FilenameWithExtension}'], '.pdf')

The help showed that toLower was a function so when I dropped that in it worked the first time - I was actually very impressed!

Next was updating the file's properties based on the result. Here everything was very much "select from a list"; picking SharePoint, picking "Update file properties", then the SharePoint site, and document library.

The one little bump in what was looking like a very intuitive process (the Active field had already appeared once I picked the library name) was the mandatory field Id;

Update file properties dialogue
As you can see it's currently set to the ID of the SharePoint item. It became clear that it should be this on entering the field and help popped up with ID as the only option, but until I'd actually entered and the help had appeared I literally had no idea what this was going to require!

I repeated the process with "if no", setting Active to "no".

Testing was quick and relatively easy - I clicked the "Test" icon and then uploaded a file.

And that was it.

*- Yes, I know, you could just do this in a simple step by doing everything in one go (setting the property based on the filename), but that's not really in the spirit of either or this example or how to do workflows in general!

Thursday, May 10, 2018

Office 365: Turning off Focused Mailbox in Outlook.com (Shared Mailbox hidden emails issue)

Welcome back. It's been a while :-)

Anyway, we recently had an issue with an Office 365 implementation that was preventing users who were accessing a shared mailbox from seeing all the emails. The problem was traced back to the "Focused" inbox. For the uses Inbox there was a clear option to disable this;

Focused Inbox (outlook.com)
As you can see the "Focused" and "Other" links in the inbox enable a quick way to switch between the types of email you wish to view. Unfortunately when the user scrolls down and looks in a shared mailbox the top options are no longer available;

Shared mailbox (without Focused and Other options)
Rather than default to showing all the emails the shared mailbox is only showing the Focused emails but with no way to switch this off.

On the plus side it's relatively easy to switch off the Focused inbox - but unfortunately, it has to be switched off for all mailboxes at once.

Click the settings cog at the top-right, and then the "Display Settings" option;

Settings > Display settings
This gives you the Display options;

Display settings
First, click the "Focused inbox", and then at the bottom select "Don't sort messages".

Finally, click "OK".

And that's it, the "Focused" link will have vanished and you'll see all emails in your inbox.