# Shortening a URL

**URL:** https://community.glideapps.com/t/shortening-a-url/28638
**Category:** Ask for Help
**Created:** [July 2, 2021, 10:10pm UTC](https://community.glideapps.com/t/shortening-a-url/28638 "2021-07-02T22:10:15Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [July 2, 2021, 10:10pm UTC](https://community.glideapps.com/t/shortening-a-url/28638/1 "2021-07-02T22:10:15Z")

</div>

Im importing some data and a url comes in with additional chars that I need to remove

Ex:

> [www.mywebsite.com/utm12](https://www.mywebsite.com/utm12)

Need to convert that to just [www.mywebsite.com](http://www.mywebsite.com)

Any ideas how to accomplish this?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 2, 2021, 11:30pm UTC](https://community.glideapps.com/t/shortening-a-url/28638/2 "2021-07-02T23:30:14Z")

</div>

Is it in Google Sheets?

If so here’s an arrayformula.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/0/402bb1239177618d036321fec24b46b5aa05a12e.png)

```auto
={"Shortener";ARRAYFORMULA(IF(A2:A<>"",LEFT(A2:A,FIND(".com/",A2:A)+3),""))}

```

---

<div class="post-metadata">

### Author: ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)
#### Post date: [July 2, 2021, 11:57pm UTC](https://community.glideapps.com/t/shortening-a-url/28638/3 "2021-07-02T23:57:44Z")

</div>

@ThinhDinh I was thinking how to do everything in Glide but I just don’t seem to find a way. If only we had a kind of ‘single value column’ that does not act on the rows, but on the index of an array, they could solve many cases similar to this.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 3, 2021, 12:22am UTC](https://community.glideapps.com/t/shortening-a-url/28638/4 "2021-07-03T00:22:18Z")

</div>

We can definitely do more with some text manipulation ability.

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [July 3, 2021, 12:29am UTC](https://community.glideapps.com/t/shortening-a-url/28638/5 "2021-07-03T00:29:56Z")

</div>

This looks to do what I want, thanks! Guessing there isnt a way to sort of import data from a Google sheet into a Glide Table, right?

Currently using a zap to import new rss feed posts into a google sheet. No way to import into a Glide Table, correct?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 3, 2021, 12:36am UTC](https://community.glideapps.com/t/shortening-a-url/28638/6 "2021-07-03T00:36:02Z")

</div>

Yes, correct, for now.

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [July 3, 2021, 12:46am UTC](https://community.glideapps.com/t/shortening-a-url/28638/7 "2021-07-03T00:46:19Z")

</div>

Maybe I can do like a Google Sheet with “Pending Posts” that users can review and when they hit a “Publish” button, it adds a row to my Glide Table…

---

<div class="post-metadata">

### Author: ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)
#### Post date: [July 3, 2021, 12:54am UTC](https://community.glideapps.com/t/shortening-a-url/28638/8 "2021-07-03T00:54:29Z")

</div>

Hypothetically, can’t you use a Split Text column, using the “/”, and then just grab the first value from the cell of the two items?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 3, 2021, 12:58am UTC](https://community.glideapps.com/t/shortening-a-url/28638/9 "2021-07-03T00:58:30Z")

</div>

You don’t have a way to grab that first value, I believe.

---

<div class="post-metadata">

### Author: ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)
#### Post date: [July 3, 2021, 1:01am UTC](https://community.glideapps.com/t/shortening-a-url/28638/10 "2021-07-03T01:01:39Z")

</div>

If only there was a kind of fuzzy search with template columns or relations… like in this case, each of the first strings will start with “www”, and you want to ignore everything after the “/”.

---

<div class="post-metadata">

### Author: ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)
#### Post date: [July 3, 2021, 2:14am UTC](https://community.glideapps.com/t/shortening-a-url/28638/11 "2021-07-03T02:14:15Z")

</div>

![Image 2021-07-02 at 7.10.16 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/optimized/3X/a/2/a20ac9b1a8eb81bf1919bea1e62610e31d3bc5da_2_690x290.png)

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [July 3, 2021, 2:26am UTC](https://community.glideapps.com/t/shortening-a-url/28638/12 "2021-07-03T02:26:00Z")

</div>

I think what I will do is this:

Zapier RSS to Google Sheets (New posts)  
Google Sheets Array as Thinh wrote above to find the actual website  
Link to Screen → Google Sheet (New Posts)  
Button → Add Row to Glide Sheet + Delete Row

---

<div class="post-metadata">

### Author: ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)
#### Post date: [July 3, 2021, 2:37am UTC](https://community.glideapps.com/t/shortening-a-url/28638/13 "2021-07-03T02:37:50Z")

</div>

That particular formula only works if the TLD is “.com”, hence why I’m trying to use other methods to trim / break up the full URL into pieces, and then grab the piece I want. In the URL shortening services, I wonder if there is this ability, so rather than try to make a bit.ly/a7sg9adasdf , just trim it to the root domain.

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [July 3, 2021, 2:44am UTC](https://community.glideapps.com/t/shortening-a-url/28638/14 "2021-07-03T02:44:52Z")

</div>

Do you know if its possible to shorten to both .com and a .co?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 3, 2021, 3:09am UTC](https://community.glideapps.com/t/shortening-a-url/28638/15 "2021-07-03T03:09:28Z")

</div>

What types of URL do you have? Are they all .com, .co or follow any specific patterns?

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [July 3, 2021, 6:24am UTC](https://community.glideapps.com/t/shortening-a-url/28638/16 "2021-07-03T06:24:55Z")

</div>

Actually I fixed the issue. I need a separate worksheet per User to import their content via IMPORTFEED so I can just customize the Array based on their website TLD.

---

<div class="post-metadata">

### Author: ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)
#### Post date: [January 17, 2024, 4:51pm UTC](https://community.glideapps.com/t/shortening-a-url/28638/17 "2024-01-17T16:51:39Z")

</div>


