Is it possible to make multiple API calls (same API) from a webhook ? I am trying to overcome the issue of a max of 5 webhooks per table.

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I don't think conditional statement will not help in my case.
Photo of Anu

Anu

  • 0 Points

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,548 Points 50k badge 2x thumb
Are these 5 webhooks inherently different from each other, and being triggered by different conditions?
Photo of Anu

Anu

  • 0 Points
Here is what I need to accomplish in generic terms:
If field 1 = A, create 3 records (all different field values)
if field 1 = B, edit 2 records ( the keys values are different and the fields to be updated are different)
if field 1 = C, edit 2 records ( the keys values are different and the fields to be updated are different)
if field 1 = D, edit 1 record
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,548 Points 50k badge 2x thumb
it is possible to use the import from CSV API  in a webhook to create any number of records in a single webhook as long as they are all being created in the same table.

Here is an example of creating 5 records.  If that first webhook that you have was reduced to just 1, you would be still at 6, so still a problem.  So the only other idea i have is to trigger one of the 5 webhooks off the table where the records are being created in, so that it's sort of a daily chain.  The limit is 5 "per table".

<qdbapi>
<usertoken>bxv4tx_bjix_8csgf2bk9smkgc5igppzvgv53r</usertoken>
<records_csv>
%RepeatOn%

"[Last Modified By]","Client Name","[old.Client Name]", "[Client Name]", "CO","[Record ID#]","[Record ID#]"

"[Last Modified By]","Site Name","[old.Site Name]", "[Site Name]", "CO","[Record ID#]","[Record ID#]"

"[Last Modified By]","Contact Name","[old.Contact Name]", "[Contact Name]", "CO","[Record ID#]","[Record ID#]"

"[Last Modified By]","Contract Name","[old.Contract Name]", "[Contract Name]", "CO","[Record ID#]","[Record ID#]"

"[Last Modified By]","Contract Type","[old.Contract Type]", "[Contract Type]", "CO","[Record ID#]","[Record ID#]"

%RepeatOff%
</records_csv>
<clist>6.7.8.9.10.11.14</clist>
</qdbapi>
Photo of ARYEH ZELCZER

ARYEH ZELCZER

  • 342 Points 250 badge 2x thumb
how would this work if I need info from other tables in this app to populate these new records?
(Edited)
Photo of Anu

Anu

  • 0 Points
Thanks for the suggestion Mark ! I believe it will work for me. With the same IMPORT from CSV API , I can populate record ID and update multiple records .. i need to update a total of only two fields in the records, so believe it should be doable . Thanks !!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,548 Points 50k badge 2x thumb
The nice thing about this is that Import from CSV will also work in Grid Edit.  Even if you create 1,000 records, it still only counts as 1 webhook firing.  Note that there is a limit to not fire more than 10 webhooks per second.  But those 1,000 records would be just 1 webhook.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,074 Points 20k badge 2x thumb
Just some info about WebHooks: they are not really "a thing" in the sense of a standard or a technology. It is more of a marketing buzz word for a bundle of features related to detection of events and triggering of network requests across domains. You will not find a W3C standard for WebHooks - it does not exist.

That said, WebHooks are considered to be a server-to-server communication that occur when a server-side event triggers the WebHook.to execute a network request (normally a POST). In general the communication is between two different domains but QuickBase has allowed you to create a WebHook that detects an events such as {new, edit, delete} record and an API call back to QuickBase's own server. This is somewhat unusual because normally this type of service is implement in a product feature not called a WebHook or through a product's API. Also, in some implementations of WebHooks there is limited feedback, minimal logging, or rate limiting which makes the execution of the WebHook somewhat unreliable.(but very low probability unless you are exceeding some limit). Finally, WebHooks only respond to those events the provider chooses to detect - in the case of QuickBase this is only {new, edit and delete} records event (there is no "view record" event).

However, using script you can detect a vastly wider universe of client-side events - everything from a mouse movement to the clicking on a button as well as record related events. So as a final thought, if you can't accomplish what you want with QuickBase using a WebHook targeted back to QuickBase, you probably can accomplish what you want using script.