How to create Webhook to retrieve record that changed in QuickBase

  • 0
  • 1
  • Question
  • Updated 1 month ago
  • Answered
I'm trying to retrieve "only" records that have been changed in QuickBase for a given table.  I'm using Zapier Webhooks since there is not a QuickBase Record Change Trigger availabe.  I understand how to use Webhooks.  The problem is I can't figure out which QuickBase API I'm supposed to use for the Message Body in the QuickBase Webhook designer.  All the APIs require you to provide a record id which defeats the whole point.  Effectively I'm looking for an API that says "here are all the  records that have changed".  I haven't been able to find one example from QuickBase or anywhere on the Web which I find remarkable.  This seems like a basic task.
Photo of Matthew Stanigar

Matthew Stanigar

  • 100 Points 100 badge 2x thumb

Posted 1 month ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,512 Points 20k badge 2x thumb
The query qid=2 returns those records that have "changed".

I rarely use it because without researching it I don't remember the timeframe QuickBase uses to determine what constitutes a changed record.

Matthew, Can you explain what you intend to do with the changed records? Automations, Webhooks, Actions and email notifications are all designed to work with such records. The difference is what you intend to do with them. Not all APIs require you to specify a record id. The API you need to use in the message body, depends on what you intend to do. As for Dan's solution, for it to work, you need to uncheck the box for "Hide the new/updated icons for all users". It is checked by default. This is available on your app properties page.
(Edited)
Photo of Matthew Stanigar

Matthew Stanigar

  • 100 Points 100 badge 2x thumb
Dan and Surya - I'm trying to get a list of records that have changed from one QuickBase table and then based upon what field values changed make an update in AWeber which is an email app similar to MailChimp.  More specifically, in the QB table I'm looking for records where a date field went from NULL to having an actual date.  In Zapier, when I receive the list of records that changed I'm going to check to see if the date field is now populated and if it is I'm going to make a change in AWeber.  This is why I just need to understand how to setup the Webhook in QB so that it returns a list of records that changed.  I've got the Zapier piece covered as I know it well but I'm new to QB Webhooks.
(Edited)
Every webhook starts with specifying the table, the operation to trigger your action (in this case "when data modifies") then specifying what fields to look for (in this case your date field) and then what condition to meet after the change (in your case, that date has a value) BEFORE specifying what you want to do with it. In this case, if you want to integrate with a third party service, you should be able to mention what your target is, and what message you want to send. You don't need an API to pull the data changed. Is that helpful?
Photo of Matthew Stanigar

Matthew Stanigar

  • 100 Points 100 badge 2x thumb
Surya, I appreciate what you're saying at it is helpful, especially knowing that I don't need to use one of the QB APIs, but there is still something I'm missing. I've attached a screenshot of the Webhook I've created.  First image shows the When and the second shows the Then.  You can see I'm looking for changes to two date fields, for JSON to be returned, Zapier webhook url is defined (hid part of it for obvious reasons).  I left the message header and body empty which I think are the remaining problem because I don't understand what should go there if I'm not using the API?  Btw, I did setup a user token and an app token.  I had done that based upon a video I saw online for how to work with QB Webhooks.  I understand how to enter them in the message body but I can't tell at this point if they're needed and again I don't know what shoud go in the body and in what format? I did try calling the Webhook from Zapier with it formatted like below and got an error that it could not pull in a sample.  I tried it after I make a change to the Consultation Booked Date.






(Edited)
Photo of Matthew Stanigar

Matthew Stanigar

  • 100 Points 100 badge 2x thumb
I just wanted to share that I got this working.  As I mentioned above, I couldn't figure out what I should enter in the message body.  What got me completely messed up was that all the QuickBase examples used one of the QuickBase APIs and all of them rely upon XML.  With XML you have to have a root element and I couldn't figure out what that would be if I wasn't going to be using one of the QB APIs.  That then through me because I could figure out how I'd have to translate a root into JSON.  I finally stumbled into an article that gave a detailed description about how to create payloads in JSON and that a header was not necessary.  I then realized I didn't need to worry about a root. Below is what I ended up using for the message body and it works great. It's very simple and exactly what I needed.  I have to say I'm incredibly dismayed at the documentation available from QuickBase for their Webhooks.  I've been a developer for 20 years and I can only imagine how many must just completely bail on trying to use their Webhooks.  The functionality is obviously there and extremely powerful but with poor documentation a significant number of users will end up not using it.  I needed to figure it out and so ended up spending a ton of time for something that I could have done in under and hour with better documentation.  I appreciate the feedback from Surya which was helpful in helping me get past a few issue.

{
    "email": "[Email]",
    "name": "[Name]",
    "consultationdate": "[Consultation Booked Date]",
     "evaluationdate": "[Evaluation Booked Date]"
}