Recently I wanted to take advantage of SharePoint to be able to manage the storage of customer invoices, while also being able to provide a link to the invoice to the customer. Additionally, I wanted to be able to apply a time limit to the link and disable access at that time.
Working out the process initially wasn't easy and I was unable to find anything directly outlining my following approach. Thankfully there was enough information out there that got me across the line.
With an Office 365 account, you are provided with two SharePoint environments. One is ideal for use internally within your organisation and the other is Public facing and ideal for your customers. For the purpose of this exercise, I will be using the Public facing site (usually your company name-public.sharepoint.com).
I didn't want to be managing adding and removing users and I also did not want to provide everybody with access to view other peoples invoices. While you can generate a guest view link, this also requires you to be regularly checking up on documents and manually removing the link to stop access. The eventual solution was to create a workflow, which based on some information entered/generated while uploading the invoice, would do all the work of sending a link and then removing access when the expiration time was reached.
To create the workflow, you will need a Windows based computer and the SharePoint Designer application.
Step 1: Setting up the document library that will store files to be shared
Before setting up the Workflow, I would recommend setting up the document library that you will be using to store the files that will be made available externally.
Firstly, check the permissions that are currently assigned to the document library. Open up the document library, then on the ribbon click onto "Library" and then "Library Settings". Once in "Settings", click onto "Permissions for this document library". If the library is inheriting permissions, click onto "Stop inheriting Permissions" which will allow you to apply permissions limiting external view access to this library.
Once inherited permissions has been stopped, remove groups that are not necessary and ensure remaining groups do not provide access to external users. Once this is done, head back into the "Library Settings" for your document library. Scroll down to the Columns section. We are now going to create three columns which will be used by the Workflow.
Column 1 - Expiration date:
Column 2 - Customer Name:
Column 3 - Customer Email Address:
Step 2: Setting up an archive location
Part of my process to remove access from the customer to the file is to remove the file from the above location. I have this folder, as I would like to still be able to access the file at any time. If you have no need for this file after the expiration, then you can skip this step. To create an archive folder:
Step 3: Creating the Workflow
From this point forward, we will now be working mostly with the SharePoint Designer application. As I am using the Public SharePoint site, it is necessary to manually launch the SharePoint Designer application.
NB: Screenshots for the following are located below.
Once you have finished your configuration, click onto Save and then click onto Publish. To test the Workflow, go back to the Document Library, upload file (remembering to fill in the customer name and email address fields correctly). Once the document has been uploaded:
The email address specified when uploading the file should receive an email as per what was specified when creating the Workflow. You should also see a column in the Document Library view with the same name as your Workflow and "In Progress" listed underneath. This will remain until the expiration date of the document when the Workflow unpauses and continues with the rest of the Workflow.
To assist with testing, you may wish to adjust the "Expiration Date" column (back in "Library Settings") to generate a shorter expiration date.
If you have any questions or issues, please send me a comment.