Shorten URL and send it via Google Mail

  1. Add and configure Google URL shortener ‘Shorten URL’ activity

    Add Google URL shortener - ‘Shorten URL’ activity to the canvas. Connect this activity with the ‘Start’ icon, and configure it.

    On the configuration page, you will notice a few fields. Enter values in the fields as per the instructions given below.

    Google URL Shortener access token: In order to use this activity, first you will have to create an access token. Select 'Add new', and fill in the required details. If you have already created a token, you can select it from the drop-down list.

    Long URL: Enter the long URL that you wish to shorten.

    shorten-url

    Once you have entered all the details, click on ‘Done’. This will take you back to the canvas.

  2. Add and configure Google Mail ‘Send mail’ activity

    Add Google Mail ‘Send mail’ activity and connect it with the previous activity. Configure this activity and enter value in the fields as per the instructions given below.

    Gmail access token: In order to use this activity, first you will have to create an access token. Select 'Add new', and fill in the required details. If you have already created a token, you can select it from the drop-down list.

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

    Body: Add the {{$a0.url}} key available under 'Shorten URL' output on the right hand side of the configuration window as an input for this field.

    send-mail

    Once you have entered all the details, click on 'Done' to return to canvas. Connect this activity to ‘Stop’ and 'Save' the flow.

    Now when you execute the flow, it will shorten a long URL and send it to the specified Gmail account.

    output