Forum Discussion

JimHarrison's avatar
JimHarrison
Qrew Champion
5 years ago

Webhook doesn't send related data

Has anyone come across this Webhook behavior? I am wondering if it is timing or permissions.

A Webhook does not contain related data if the record is added by a non-administrator Role.

We have a code page that adds records to a table when a User presses the button. Some of the fields are added by entering the related field, and then the additional information is filled in by the relationship.
When the records are added to the table a Webhook in the table is triggered and sends JSON formatted data to Requestbin.

When the User is in the Administrator Role, it works great. All the data fields are present in the Webhook and JSON body. The JSON is properly formatted and everything works.

I thought it was permissions so I checked permission for Users in other Roles. I made a test Role and made certain the Role can "view/modify" all related tables.
After the records are added Users in the test Role can view/edit the new records in the table and all the related data is visible in the new records. The records are getting added correctly to the table using the button. Everything looks fine.

Then I look at what is being sent in the Webhook and here is what I see.

When an administrator role clicks the button, records are added and the Webhook triggers, the body of the Webhook has the Related data. example below.

due_date:02-04-21

employee_id:TEMP-1499833

employee_job_title:Project Manager

employee_job_title_group:Operations

full_name:QuickBase Test User

onboarding_check:bob

onboarding_responsible_party:QuickBase Test User

onboarding_stage:

priority:

record_id:3094

responsibility_group:new hire

responsible_party_email:qbtest@harder.com

status:New


When a User Role clicks the button and the records are added we send the body of the Webhook to Requestbin and see the Related Data is missing. see MISSING DATA below.
The User can see the related data in the table after the records are added, it's just not there when the Webhook triggers.

days_to_complete:8 days

dbid-tid:bqwpiktkf-2

due_date:

employee_id: MISSING DATA

employee_job_title: MISSING DATA

employee_job_title_group: MISSING DATA

full_name: MISSING DATA

onboarding_check:step 2

onboarding_responsible_party: MISSING DATA

onboarding_stage:Prior to Start Date

priority:

record_id:3097

responsibility_group:PRIME

responsible_party_email: MISSING DATA

status:New

Why?



------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------

3 Replies

  • With the proviso that I really don't know much about code pages, I do know that every single thing in Quick Base runs under the permission of a user.

    There's probably a way in your code page to use a user token but I do not know how to code that. If you use a user token that is from the role of a person or user ID that is in the admin role then it will work.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JimHarrison's avatar
      JimHarrison
      Qrew Champion
      Hi Mark,

      What has me perplexed is the records are added and appear correct no matter who clicks the button. It's the Webhook that runs when the records are added that is missing data.

      So a Code page runs with the Users permissions and adds the Records. We're using an App token to handle authentication in the Code page. That seems to be correct.

      Next the Webhook triggers and sends data. I think the Webhook runs off the Webhook "Owner". It says at the bottom of the Webhook page "The webhook uses the owner's permissions to determine access to Quick Base data" right next to the Owner field. In this case the Webhook Owner is an Administrator account, so the Webhook should run unimpeded... right?


      Thanks,
      Jim


      ------------------------------
      Jim Harrison
      transparency = knowledge + understanding : The Scrum Dudes
      ------------------------------
      • RickPutnam's avatar
        RickPutnam
        Qrew Cadet
        Hi, Jim,

        I believe you are correct regarding the webhook permissions being those of the owner of the webhook. I have not seen behavior like this. I would probably go with a support ticket at this point if I were in your shoes.

        Best of luck,
        Rick

        ------------------------------
        Rick Putnam
        ------------------------------