How to Create a Free URL Shortener Using Google Apps Script?

 

Free URL shortening is the best way to save the web addresses of your websites. There are several ways to create short links to your site. One of the best ways is using Google Apps Script.

But, it is not very easy to create a script in Google Apps Script. In this blog, I will share with you how to create a script in Google Apps Script and make a free url shortener.

Google Apps Script is a new service of Google that helps you to make scripts to automate your business tasks. With the help of Google Apps Script, you can automate the entire processes on your website. It is a great way to save the time and effort.

Let’s see how to create a script in Google Apps Script.

1. Create an account for Google Apps Script

To use Google Apps Script, you need to create an account for it. Go to the below link to create an account.

https://script.google.com/macros/

2. Create a new script

Once you created an account for Google Apps Script, you will land in the dashboard page. Click on the “Create a new script”.

You will see the following screen.

3. Choose a name for the script

In the “Name” field, you will be asked to name your script. The script name must be unique.

4. Choose a package

This is the most important part of the script. You have to choose a package for your script.

You will see two packages on the left side of the screen. You have to select the one that you want to use.

5. Select the service

You will be asked to select the services you want to use in your script. Here you have to select “Apps Script”.

6. Add code

Now you will be asked to add the code for your script. Click on the “Add script” button.

The next page will show a script editor where you will add the code for your script.

7. Save the code

After adding the code, click on the “Save” button. Your code will be saved.

8. Create a trigger

This is the most important part of the script. You have to create a trigger for your script.

You will see the “Create a new trigger” option. Now you have to select “Trigger” from the menu.

You will see the following page.

9. Create a trigger

Here you will have to add the code for your trigger.

10. Test the code

Once you are done with the code, click on the “Test” button. If everything is ok, you can move to the next step.

11. Publish the code

Click on the “Publish” button to publish the code.

12. Set the scope

After publishing the code, you will be asked to set the “Scope”.

This is a mandatory step for any script.

13. Get started

Once you are done with the above step, you can start using your script.

Conclusion:

I hope this tutorial helped you to create a script in Google Apps Script. If you want to know about other Google services, you can refer to the below link.

https://script.google.com/home

Comments

Popular posts from this blog

The Only Marketing Automation Platform That Merges 14 Marketing Services Into One Intuitive, Easy-To-Use Platform

10 Best Shorteners To Make Your URL More Attractive

Simplify Your Business Operations with an AI-driven CRM: A Step-by-Step Manual