Forum Discussion

Re: Quickbase Webhook to JSON

Use a pipeline to convert that field using:   {{a.your_field|tojson}}  and store the output in another field.   That should format it correctly.   I do something similar with a few fields that I use to build a JSON to send to an external service.

Your pipeline will have 2 steps -   
A.  Triggers on record updated,  when that field is updated.
B.   Update record,  write the value to your JSON holding field using  {{a.your_field|tojson}}

Example:

Here I am stringifying the field [Technical Instructions] and writing the output to [Technical Instructions JSON] (which is a text type field) for later use.

------------------------------
Jeff Peterson
------------------------------

8 Replies

  • MarkLaudon's avatar
    MarkLaudon
    Qrew Member
    Thanks for the quick response! I currently don't have access to pipelines, but am looking to gain access to see if I do the way you said. 

    Do you have any other ideas/methods on achieving the same end result?

    ------------------------------
    Mark Laudon
    ------------------------------
    • JeffPeterson1's avatar
      JeffPeterson1
      Qrew Captain

      You need to 'stringify' the output of your field to a format that works in JSON.   You would either need to use my method above,  or write a text formula that can format it properly for JSON.    

      Can you share a example of what your field output looks like?



      ------------------------------
      Jeff Peterson
      ------------------------------
      • MarkLaudon's avatar
        MarkLaudon
        Qrew Member
        So currently, users use a multi select field and for example, choose Test-App-1 and Test-App-2.

        If that token is utilized in the webhook, it would be 

        "variableId": "509215617581245",
        "variableName": "Test",
        "val": [
        "[testApps]"
        ]

        [testApps] ends up equating to "Test-App-1 ; Test-App-2" due to how multi select works in quickbase

        I would need to change the semicolon into ", " (double quotation, comma, double quotation) so the JSON reads it properly.

        ------------------------------
        Mark Laudon
        ------------------------------