Can I run a custom JS page using webhooks?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I'm interested in running a custom JS page using webhooks and would like to know if this is currently possible.
Photo of Evan

Evan

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
Yes this is and we've done it a few times.  If you know your code page,  and using the same parameters that you would pass data if you did the code page via a button push, you should be able to do the same through the webhook information.

You posted this a long time ago, so i'm sure you've found the solution, but let me know if you are still stuck.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,154 Points 20k badge 2x thumb
Matthew, I am not sure I understand your answer. A web hook makes a single HTTP request to an endpoint (either a QuickBase endpoint or a third party endpoint). The webhook does not load a HTML page and execute the JavaScript within it. Whatever the endpoint does when the webhook HTTP request is received by the server is completed on the backend by whatever programming language the server employs. So there is no opportunity to run user supplied JavaScript using a webhook.

Am I misunderstanding something? 
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,184 Points 20k badge 2x thumb
A webhook makes a single HTTP request to an endpoint - either a QuickBase endpoint or a third party endpoint. There is no JavaScript  involved whatsoever unless the third party server happens to be running Node and this fact would not normally be even known unless you had additional information about the third party server.

If you want to detect some event (record created, edited or deleted) and then run some JavaScript you have to do this client-side using one of the various JavaScript injection techniques. If you could elaborate on what your JavaScript does and what you want to accomplish I am sure there is a easy solution.

If you need assistance with solving this problem feel free to contact me off-world using the information in my profile:

https://community.quickbase.com/people/DanDiebolt
(Edited)
Photo of Drew

Drew

  • 62 Points
Thanks, exactly what I needed to know