Hi,
I’ve recategorized this for “How To” as I’m not sure this need to be under an experimental code.
Trying to shorten a url using either bit.ly or short.io. This worked perfectly on Google Script, but I cannot get it to work on Glide. Tried all possible column types, including the experimental code suggested in the discussion above.
This works fine (using a secret key) when opening it in a browser. It generates a shortlink and the short link is working.
I simply cannot get it to work inside Glide.
Rather similar situation with bit.ly, although I played with this option less.
Wonderful app, but I can’t see below the hood. Reading the follow-up posts on that showcase, I understand you’re using Zapier. While it’s a great, and super-clean solution, I prefer to avoid it as I don’t want to give Zapier access to these confidential Google Sheets. Any other ideas?
Hi
I was able to create the URL which I plan to send to the API using template. My logical skills are still not sharp enough to grasp the full power of Construct URL, but template is fine for now.
The second step is where I’m stuck. Using Fetch JSON column but not getting anything back.
When I manually follow the same exact link from the template column I do get a response (masked some part with XXX):
My reason for suggesting the Construct URL column is that it will automatically take care of URL escaping where necessary. It’s just a guess, but that’s what might be tripping you up here.
My only thought was that there might be some characters in the templated URL that is causing it to break. Which again, is why I suggested the URL column.
Pasting it into a browser most likely works because most browsers will automatically add URL escaping. You could test this by copying the URL that your browser produces and pasting it back into a template column, and then try that with the Fetch JSON column.
I have provided this parameter but I think that it’s actually something with the transitioning to percentage URL coding. It’s not recognized by either WhatsApp (when trying to run manually in a browser) or by Short.io, as you can see in the response above.
If you can manually follow that link and get a response but not in Glide, I think this is a CORS problem and I haven’t found a way to deal with it when I ran into it.
Looking at your screenshot, a giant red flag for me was that you had ‘originalURL=’ as a query parameter name instead of ‘originalURL’. That extra equal symbol probably resulted in a parameter name of ‘originalURL==’. Which makes sense that the error you were given was ‘No original url parameter’. It couldn’t find the parameter value because no value existed after the first equal symbol, other than another equal symbol, and the second equal just threw everything off.
Hi
Yes, you’re right. I also noticed it after posting. I corrected it but, sadly, it didn’t do any good.
Happy to review your solution if you can make it work. I actually prefer short.io to bit.ly, but at the end of the day they’re both fine.
Thanks