Create Shortened (‘TinyURL’) links from your SharePoint Workflow – Part 2

Clavin Fernandes

Clavin Fernandes

Related Products

PDF Converter

PDF Converter


Not too long ago we wrote about how to create a Short URL from a SharePoint workflow using the Muhimbi URL Shortener (MuSH) in combination with our Workflow Power Pack. The response from our customers has been so positive that we decided to ship a Workflow Action with the new version of MuSH.

For those not familiar with the product , the Muhimbi URL Shortener for SharePoint, aka MuSH, can be used to shorten URLs for typical web applications and SharePoint in particular. It integrates tightly with both WSS and MOSS and allows short URLs to be created directly from a list item’s context menu, workflows and web services. For details see the original product announcement.

Creating short URLs from a workflow can be very useful. For example creating a short URL named after data in an InfoPath form or create a short URL for a deeply nested folder. In the example below we create a short URL that always points to the latest entry in the announcement list. Not sure if this is useful, but it illustrates the power of this facility.

Create the workflow as follows:

  1. Download and install the Muhimbi URL Shortener for SharePoint.

  2. Make sure you have the appropriate privileges to create workflows on a site collection.

  3. Create a new workflow using SharePoint Designer.

  4. On the Workflow Definition screen associate the workflow with the Announcements list, tick the box next to ‘ Automatically start this workflow when a new item is created’ and proceed to the next screen.

  5. From the Actions Menu select Create Short URL, you may need to click More Actions first.

  6. The following Workflow Sentence is inserted:


  7. To auto generate the short URL, leave the optional short name empty, but in our case we always want to give it the same name, so enter Announce.

  8. Click this ID / address, click the Workflow Lookup button and select Current Item as the Source and ID as the field.

  9. Click Document / Display Form and select Document (when used in a Document Library) or Display Form showing the item’s properties. As we are not dealing with a Document Library, it doesn’t matter what is selected.

  10. Click Overwrite / Return null and select the Overwrite as we always want to write the latest announcement using the same short name. (Return Null will return null in the output variable, which can then be tested for and action can be taken accordingly.)

  11. Click Variable: this variable and specify the variable the Short URL will be stored in. In this example name it shortURL.

  12. Add a Log To History List Action and specify the name of the workflow variable the Short URL has been stored in using the Workflow Lookup dialog box.

Close the workflow and create a new Announcement. When the workflow has finished, click the completed link to see the output. Click the generated URL to link to the latest announcement.

Create another Announcement, the Short URL should now link to the latest announcement.

Labels: Articles, News, Workflow


Clavin Fernandes

Clavin Fernandes

Developer Relations and Support Services @ PSPDFKit

Clavin Fernandes is a Microsoft Business Applications MVP and works in Developer Relations and Support Services for PSPDFKit.

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2024
This website uses cookies to ensure you get the best experience. Learn more