Discussions

Expand all | Collapse all

Add Record with Webhooks and pull in file attachment field

  • 1.  Add Record with Webhooks and pull in file attachment field

    Posted 02-28-2017 21:16
    Hello,

    I am creating a webhook that fires off when a new file is attached to a record.  The webhook creates a new record in a documents table and populates some information.  It works, however I need a file attachment field to fill with the file from the other record.  Basically trying to create a history of documents based off of the file attachment field.  Here is my webhook currently:

    <qdbapi>     <udata>mydata</udata>
         <usertoken>%user.token.xxxx_xxx_xxx.xxxxxx User Token%</usertoken>
         

    <field fid="6">[Record ID#]</field>
         <field fid="10" >[File Link]</field>
       
         </qdbapi>
      
    Thanks.


  • 2.  RE: Add Record with Webhooks and pull in file attachment field

    Posted 03-08-2017 19:02
    Would a link to the original record's file attachment work?

    If not, for an API call (which is what webhooks are based on) file attachments have to be base-64 encoded and I'm not sure a process to do so has been built into webhooks yet.


  • 3.  RE: Add Record with Webhooks and pull in file attachment field

    Posted 03-08-2017 19:30
    For this case the original records file attachment won't work because I am trying to track history through webhooks.  So yes this does mean that I will have to use the API call and base-64 encode the file.  I wasn't sure how to do that unfortunately.  


  • 4.  RE: Add Record with Webhooks and pull in file attachment field

    Posted 03-08-2017 20:11
    Then, unfortunately, I'm not aware of a way to accomplish this with the current version of webhooks. Some of our partners: http://www.quickbase.com/partners/add-ons who have file attachment add-ons might be able to direct you to a resource, or help setup the process you need.