Discussions

Expand all | Collapse all

Pipelines | Dropbox & Webhooks assist.

  • 1.  Pipelines | Dropbox & Webhooks assist.

    Posted 04-22-2020 16:32
    Goal:  Utilize a third-party file storage service due to the economics of storing photos on Quickbase, but still maintain the ability to display the photos in a notification email.

    Method: Using pipelines, copy a new attachment to Dropbox then via Webhook - convert it to a shared file.

    Problem: I'm completely stumped on how the Pipelines Webhook channel needs to be set up to talk to Dropbox.  I've set up an api 'app' in Dropbox, gotten the authorization key generated, and tested both the key and the path generated by previous steps in the Pipeline using Dropbox's nifty testing tool.  The issue I run into is in the actual configuration of the Pipelines webhook which has just enough documentation to make me feel like I'm 90% there, but not enough to make the last 10% feel like something I can figure out on my own.

    Any assist on this, or just a flat-out redirect to another service or method of managing the attachment space for essentially no cost would be awesome.

    ------------------------------
    Brad Lemke
    ------------------------------


  • 2.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 04-22-2020 16:43
    One solution is to implement the add on for the Juiced storage on Amazon S3.  The Amazon cost is very trivial https://aws.amazon.com/s3/pricing/  .  There is a nominal monthly cost for the Juiced add on. They also have a different add on which allows for multi file upload.  It can let you browse to your file source, grab a bunch by dragging or highlight them and then click to create multiple child records each with a file attachment or liked into Amazon S3. 

     http://qbtools.helpdocsonline.com/amazon-s3-overview

    http://qbtools.helpdocsonline.com/amazon-s3-multifile-overview




    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 04-22-2020 16:53
    Here's my biggest wrinkle to third-party uploaders: It's gotta work on the mobile app.  I actually got the dropbox chooser/saver buttons and scripts to work in the forms from desktop, but they break mobile hard.

    ------------------------------
    Brad Lemke
    ------------------------------



  • 4.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 04-23-2020 14:10
    After bashing my face against the brick wall for another several hours, I finally got the command to not only go through - but also succeed at making the change I needed in Dropbox while providing the information I need (the share link) in its' response.  Now I'm at an unexpected roadblock: how do I use the information provided in the response?  

    It feels like I'm wading through super-uncharted territory on this one.

    ------------------------------
    Brad Lemke
    ------------------------------



  • 5.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 04-23-2020 14:30
    Pipelines is pretty much brand new so you basically are the first one I've seen do this.

    I don't have the dropbox plugin enabled but do you have the ability in the Pipeline to update a record after receiving the response? You should be able to add that in as another step at the end. Or is the issue with parsing the response?


  • 6.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 04-23-2020 14:50
    It appears to be an issue with parsing the response.  Here's the steps of the pipeline so far:
    Trigger - Quickbase Channel - record created
    Action - Dropbox Channel - Upload a File
    Action - Webhook Channel - Make request: Create Shared Link for Uploaded file.
      The link is located in the response, but I'm unable to pull anything from the response into later steps.

    ------------------------------
    Brad Lemke
    ------------------------------



  • 7.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 04-27-2020 14:14
    Update: I got everything operating incredibly smooth and efficient now.  Here's the Pipelines steps:
    A - Trigger - Quickbase Channel - Record Created - Inspection photos table (one photo=one record)
    B - Action - Dropbox Channel - Upload a file - using the photo's url from the record
    C - Action - JSON Handler Channel - Fetch JSON - Execute Dropbox API command previously set up in Webhook channel
    D - Query - JSON Handler Channel - Iterate over JSON records - Enter sample JSON Response into 'Schema Sample' - This lets you pull and use data from the response to the previous step!
    E - Action - Quickbase Channel - Update record with the URL in step D, and the file ID from step B (into their own unique fields).

    Next, I created a standalone webhook that will delete the file from Quickbase once the Dropbox URL field is filled in. 

    Lastly, I created a Rich-Text Formula field that modifies the Dropbox URL into an embeddable format (removing dl=0 from the end and adding raw=1).
     
    And voila - my app now has virtually unlimited attachment space with no attachment management upkeep, all while using the mobile user-interface without intruding on existing workflows.  All this allows my app to use the 'email notification' feature to send the attachments (in addition to the rest of the report) to our customer the instant the inspection is completed on-site and not a day or two later after being processed in the office.

    ------------------------------
    Brad Lemke
    ------------------------------



  • 8.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 04-27-2020 15:54
    Thank you posting,
    BTW, that Pipeline setup you did is exportable as YAML.  The recipients (or yourself using this technique in a different app), would edit the references to the Quick Base table IDs and the field numbers.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 9.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 04-29-2020 22:28
    Thanks for outlining everything you did here!

    ------------------------------
    Christine Suarez
    ------------------------------



  • 10.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 29 days ago
    Thanks for sharing this @Brad Lemke! I'm building something similar, but for the life of me, I cannot get the file to properly upload to Dropbox. 

    Can you share how you're getting the attachment from the QB record into Dropbox?

    This is what I'm doing, but it's not fully loading the file to Dropbox:

    • A Quick Base record is added with an attachment triggering the pipeline
    • It has a formula URL field with this formula URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e9/v0"
    • I'm then using that in the Dropbox Upload a File Chanel in the URL field
    The pipeline does place a file in Dropbox, but it's just an 'empty' file with the name I gave it. No file type and always ~65kb.

    I've double checked the link is correct and opens the attachment in the browser (even when I click on it in the Pipeline activity, it displays the file)

    Perhaps there is a different formula for the file that I should be using?

    As someone who got this to work, I would love your input.

    Thanks!
    -Sharon



    Result in Dropbox






    ------------------------------
    Sharon Faust (QuickBaseJunkie.com)
    Founder, Quick Base Junkie
    https://quickbasejunkie.com
    ------------------------------



  • 11.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 29 days ago
    I remember seeing this exact issue when testing and it was a bear to figure out.  Your URL formula is exactly how I set mine up.  Is your File Attachment field set up to 'Allow Open Access'?  I don't remember if that specifically was the fix for me, though it couldn't hurt to test.

    ------------------------------
    Brad Lemke
    ------------------------------



  • 12.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 29 days ago
    Great question @Brad Lemke. Yes, it was/is set to allow open access.

    Might there be a dropbox setting or configuration needed?




    ------------------------------
    Sharon Faust (QuickBaseJunkie.com)
    Founder, Quick Base Junkie
    https://quickbasejunkie.com
    ------------------------------



  • 13.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 29 days ago
    That was my train of thought, to rule out as much as we can from Quickbase before moving to Dropbox.

    When you log into your Dropbox account @ https://www.dropbox.com/developers/apps/, did you create an app that has 'Full Account Access?' 

    I created my app before they did their latest API update, so setting up an identical app to what works for mine would use their legacy (supposedly not recommended) API.

    Let me know if this helps at all.

    ------------------------------
    Brad Lemke
    ------------------------------



  • 14.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 29 days ago
    Very interesting @Brad Lemke, I hadn't set up a developer app in Dropbox as I don't need a share link.

    For the initial upload did you authenticate to Dropbox with your developer app? Or a user account? When I authenticated it pulled my credentials from my browser as I was already logged into Dropbox.​

    ------------------------------
    Sharon Faust (QuickBaseJunkie.com)
    Founder, Quick Base Junkie
    https://quickbasejunkie.com
    ------------------------------



  • 15.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 28 days ago
    Apologies for the confusion, the Dropbox App is for the custom Pipelines Webhook/JSON Handler API commands to Dropbox later in my particular use-case.  The App is not necessary at all for simply uploading to Dropbox.  I confirmed this by creating a fresh Dropbox Personal User Account, free version, and no Dropbox settings adjusted before pointing my Pipeline at it - meaning it's likely safe to assume now that it is one obscure little thing in Quickbase that I've been forgetting about.

    That one obscure little thing might be in the URL Formula itself: Try hardwriting out the first half of the URL:
    • "https://realm.quickbase.com/up/tableid/a/r" & [Record ID#] & "e9/v0"
      • Adjust the bolded portion as needed.


    ------------------------------
    Brad Lemke
    ------------------------------



  • 16.  RE: Pipelines | Dropbox & Webhooks assist.

    Posted 28 days ago
    @Brad Lemke that was it! I recall having to do this when inserting a link into a notification with HTML... tricky-tricky!

    I also noticed that I need to name the file through the pipeline with the file extension or it won't recognize the file type in Dropbox.

    Cheers! I owe you a coffee or beer! Thank you so much!

    -Sharon


    ------------------------------
    Sharon Faust (QuickBaseJunkie.com)
    Founder, Quick Base Junkie
    https://quickbasejunkie.com
    ------------------------------