School District Solution Help Needed

36 views
Skip to first unread message

Clay Smith

unread,
Mar 10, 2020, 4:20:21 PM3/10/20
to Google Apps Script Community
Hi All, 
I have a Firebase Dynamic URL creator. I need to create around 3600 short URLs with specific short codes. I'd be pulling the short code from a spreadsheet. I'm competent in Appscript. I have not used the Firebase Dynamic URL REST API yet. Can anyone direct me to a resource for this specific use? I see I can use a long url and get a generic short link. Can I specify the short link I want? Thanks for your help this is a very quick turn around considering the situation. 

Clay
(NYC Schools)

ChiefChippy2

unread,
Mar 11, 2020, 2:37:11 PM3/11/20
to Google Apps Script Community
If I understand correctly, you want to create 3600 short URLs with specific short codes like 
short.link/ShortCode
right?

I would suggest doing the following : 
Make a do get function that detects the parameter, say, shortCode. 
Lookup the matching url from your source and return a simple html script that automatically redirects to the url.
Then, shorten your web app url with a url shortener service that passes arguments like tinyurl.
A similar process can be done with other services that doesn't support passing arguments from the shortened url to the original url with anchors ( i.e https://example.com#Shortcode ), which requires a more client-based script. ( since doGet can't return the #Shortcode part.)

Hope this helps.

Clay Smith

unread,
Mar 11, 2020, 9:48:59 PM3/11/20
to Google Apps Script Community
That helped a lot. I was able to get a URL shortener working from a sheet. Thanks for the tip!

Darren D'Mello

unread,
Mar 12, 2020, 2:54:51 AM3/12/20
to google-apps-sc...@googlegroups.com
Which is the URL shortener you used?

On Thu, Mar 12, 2020 at 7:19 AM Clay Smith <cl...@claycodes.org> wrote:
That helped a lot. I was able to get a URL shortener working from a sheet. Thanks for the tip!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/e2c1f781-1d02-4ed4-9ee6-7b23457c6315%40googlegroups.com.

Clay Smith

unread,
Mar 12, 2020, 8:00:52 AM3/12/20
to Google Apps Script Community
I found a github repository which helped for my needs


On Thursday, March 12, 2020 at 2:54:51 AM UTC-4, miscellaneousmailer wrote:
Which is the URL shortener you used?

On Thu, Mar 12, 2020 at 7:19 AM Clay Smith <cl...@claycodes.org> wrote:
That helped a lot. I was able to get a URL shortener working from a sheet. Thanks for the tip!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages