Shorten URL and send it via Google Mail
-
Add and configure Google URL shortener ‘Shorten URL’ action
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
- Google Mail ‘Send mail’ action
Add Google URL shortener - ‘Shorten URL’ action to the canvas. Connect this action 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 action, 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.
Once you have entered all the details, click the 'NEXT' button, test the action and click on ‘DONE’. This will take you back to the canvas.
-
Add and configure Google Mail ‘Send mail’ action
Add Google Mail ‘Send an Email’ action and connect it with the previous action. Configure this action and enter value in the fields as per the instructions given below.
Gmail access token: In order to use this action, 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 {{$a7.url}} key available under 'Shorten URL' output on the right hand side of the configuration window as an input for this field.
Once you have entered all the details, click the 'NEXT' button, test the action, and click on 'DONE' to return to canvas. Connect this action to ‘Stop’ and 'Save' the workflow.
Now when you execute the workflow, it will shorten a long URL and send it to the specified Gmail account.