Forum Discussion

JackFretwell's avatar
JackFretwell
Qrew Assistant Captain
7 years ago

First Webhook, First Error. API_AddRecord

Trying my first web hook.  This is the code so far:


MyData
%b33nat_ks4k_dkqpnf9dgmkmb2bhh-----%
[items_total]
"W - Won"
"Bombouche"
[products]
[total_ex_tax]


This is for when a record is added.
Http: POST, Format XML, Message header QUICKBASE-ACTION / API_AddRecord

Error Message


API_AddRecord
11
Could not parse XML input
XML Parsing Error. not well-formed (invalid token) at line 4 column 21 (which is byte 103)
mydata


I watched a youtube guide on this and have looked around this site but can't find an answer for it.  Is there a working example out there, I'd would like a screen print if possible.  

I'm not sure if anything has changed since the video was put up and now.  I had this with an app token but that failed with the same issue too. The user token is brand new. 

19 Replies

  • ... I'm late to chime on on this thread, but out of curiosity, are you using a Webhook to learn the syntax for tacking something more complicated in the future?  ie why not just use a no code Automation?  Or is this perhaps a Cross Realm Webhook (which can probably be done with an Action).
  • JackFretwell's avatar
    JackFretwell
    Qrew Assistant Captain
    Trying stuff out, I'm not familiar with all the components of Quickbase and do have a table from Big Commerce which needs loading. 

    But, I would like to know if you can put two fields from the source into one field in the destination, I've not seen any syntax for this so just going one for one at the moment.  
    • Laura_Thacker's avatar
      Laura_Thacker
      Qrew Commander
      Build a formula in the source table to combine the two field values; and then push the value of the formula into the destination field.
    • JackFretwell's avatar
      JackFretwell
      Qrew Assistant Captain
      I've done that as 

      <field fid="10">[items_total][Company Name]</field>

      But I don't know the correct coding for a space, e.g.

      <field fid="10">[items_total] & " " & [Company Name]</field>

      I'm sure this would fail and I'm tempted to try:- 

      <field fid="10">[items_total]%20[Company Name]</field>

      But can't find anything regarding this scenario, anywhere.


    • Laura_Thacker's avatar
      Laura_Thacker
      Qrew Commander
      No, build a formula in your table to combine the two field values together.  I do not believe you can push two values from separate fields into a single field within a Webhook.  I'm happy to be corrected.  But creating a formula specifically for this purpose in the table would be the easiest solution.
  • JackFretwell's avatar
    JackFretwell
    Qrew Assistant Captain
    For anyone who finds this, a few hints:

    <field fid="11">[products], [billing_company], [billing_first_name] [billing_last_name]</field>
    You can add more than one source field for a destination field, and put commas between the fields.  

    Populating a drop down:
    <field fid="14">W - Won</field>
    Don't use quotation marks in the field value.