Forum Discussion

SterlingLong1's avatar
SterlingLong1
Qrew Trainee
6 years ago

Webhook URL endpoint using field value

Alright, so I have run into an issue using a text field with a URL in the URL endpoint of a webhook.

For 1, the webhook requires an https:// at the beginning, which is fine, I understand that, but what if the field's text has that there?
For 2, the text in the field is URL encoded before it is placed into the URL, which causes some major havoc and breakage when the URL is called.
So my question:
How can I stop this? =D

I don't want to share my specific URL with anyone for privacy reasons, but it is feasible to test this with any URL as a text field in the table, then simply pass that field's value to the URL in the webhook.
Let me know your thoughts!

Thank you!
Also, if it's Mark who responds to this, a double thank you to that man, and a Merry Christmas.

------------------------------
- Sterling Long!
------------------------------

5 Replies

  • I'm really operating in guessing as I don't claim to be an expert on webhooks and you have not been able to post even a disguised version of your code.

    If the field you are using already has https:// in it and also you feel that when Quick Base sees a URL field it treats it differently than a plain old text field by URLEncoding and also adding another https://, then my suggestion is to create a text field with the URL you want. Then Quick Base will not second guess what you want in trying to be helpful.

    That can be done via a formula text field.

    If(Begins([my url field],"https://"), NotLeft([my url field],8),[my url field])

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • SterlingLong1's avatar
      SterlingLong1
      Qrew Trainee
      Ok, I'll start by saying I should not have mentioned the https thing, it's simply a requirement by QB Webhooks that I found a little annoying. Not super important.

      The bigger issue is to follow, let me see if I can give a better example. With some pictures.

      Alright so if I do this:
      And type out the URL completely, then the webhook works perfectly and can ping google. Google is an example here.

      If I do this (Using the constant that you helped me make Mark), pulled in from another table:

      Where the contents of [TestURL] are www.googe.com/
      I end up with this error from the webhook:

      Quickbase URL encoded the field. Which I can understand being necessary in the body, and necessary in URL parameters.
      I hope this makes more sense of my problem, sorry I was too vague before. I've been thinking about this for a while so I just kind of assumed it would be easy enough to understand.

      The URL encoding seems to happen automatically. There is no code here, no javascript, etc. Just me trying to use a field and its contents as a URL. Which seems to go against intended purposes.
      Using a field as a URL isn't necessary. It simply allows me to ensure that all the URLs are the same by using that one field, and if the endpoint URL ever changes, I just have to change it in my constant... It makes upkeep much simpler. All the thing are simpler with this.

      Let me know your thoughts, and if anything doesn't make sense let me know.

      I should note that it does this when the field is both type text and URL. That has no effect. The URL encoding still happens in the same way.
      ------------------------------
      - Sterling Long!
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        I think we have reached the end of my technical ability to make suggestions. Maybe somebody else will chime in.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------