Shorten URL and send it via Gmail

This workflow shortens a long URL with Google shortener and sends it to a Gmail account. To set up this workflow, you will need to use:

  • Google URL Shortener - Shorten URL action
  • Gmail - Send an Email action

Add and configure Google URL shortener - Shorten URL action

Add Google URL shortener application and connect it to the Start icon.

Next, double-click the Google URL Shortener connector icon, select the Shorten URL action from the Select Action drop down list, and select the Google URL Shortener account you want to use to execute the action.

Once this is done, click Next.

In the action configuration form that appears next, provide the details by entering the long URL you want to shorten in the Long URL field.

google_url_shortner.PNG

Once you have entered these details, click Next, Test the action, and click Done.

Add and configure Gmail - Send an Email action

Add Gmail connector to the canvas and connect it to the previous action.

Next, double-click the Gmail connector icon, select the Send an Email action from the Select Action drop down list, and select the Gmail account you want to use to execute the action.

Once this is done, click Next.

In the action configuration form that appears next, provide the details as given below:

To: Enter the email ID of the recipient you want to send the shortened URL to. You can also add multiple email IDs by using a comma separator or a new line separator.

Subject: Enter a suitable subject for the email.

Body: Add the output key, say {{$a7.url}}, available under Shorten URL output on the left-side of the configuration window as an input for this field.

gmail.PNG

Once you have entered all the details, click on Next, Test the action, and click Done. This will take you back to canvas. 

Now connect the Gmail connector icon with the Stop icon, and Save the workflow.

Now when you execute the workflow, it will shorten a long URL and send it to the specified email address.

output