Forum Discussion

ChristineCarpe1's avatar
ChristineCarpe1
Qrew Member
21 days ago

Pipelines - Connected Table Refresh

Is it possible to run a table Refresh/Sync, for a Google Drive Connected Table,  within a pipeline?  I want to refresh a table at a specific scheduled time and then run a Table to Table import job.  The refresh scheduling on the connected table is not specific enough since it is anytime within a one hour period. Thank you in advance for any help that you can provide.



------------------------------
Christine Carpentier
------------------------------

5 Replies

  • Yes, you can. You need to get the 'replicationID' for your sync table, but then you can create a Pipeline using the 'Request' Channel where you POST the following: 

    URL: https://yourrealm.quickbase.com/qb/sync/refreshTasks?replicationID=yourReplicationID

    Headers: 

    Authorization: QB-USER-TOKEN your usertoken

    Then you can schedule your pipeline to run at the set interval you need.



    ------------------------------
    Chayce Duncan
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Qrew #1 Challenger

      tag teaming w/ Chayce.

      This post here says this

      • In URL:
        • "qbhostname": replace with hostname (the text before quickbase.com in your realm URL)
        • #####: replace with your replication ID
          • For those like me who didn't know how to find this, if you go to your connected table page, press F12 to bring up the developer tools console. Click on the "Network" option across the top. I filtered for refresh to limit what displayed. Click on any item and then click on "Headers" to make sure you're on the right tab. Then, click the Refresh table button in QB, quickly click on the "refreshTasks?replicationID=..." that shows up under the "Name" side, and capture the Request URL that comes up. It can happen pretty quickly so you have to be read to go. I just took a screenshot since it was the fastest. There may be another place to find it where the ID/URL sticks around, but I couldn't find it. See screenshot attached.
      • In Headers Value:
        • "####": replace with your user token
      • In Body: Information can be found on the Advanced Settings of the table
        • Name: replace "Table Name" with name of table, not ID
        • singleRecordName: replace "Name" with the name for single records in the table
        • pluralRecordName: replace "Names" with the name for multiple records



      ------------------------------
      Brittany ......



      ------------------------------
      Mark Shnier (Your Quickbase Coach)
      mark.shnier@gmail.com
      ------------------------------
      • ChristineCarpe1's avatar
        ChristineCarpe1
        Qrew Member

        Thank you Chayce and Mark! Much appreciated.



        ------------------------------
        Christine Carpentier
        ------------------------------
  • Thanks to the feedback from Mark and Chayce, my pipeline is successfully running a refresh on the connected table. However, the pipeline job completes upon kick-off of the refresh instead of completion of the refresh. My plan was to add a second step in the pipeline to execute a table import but this won't work if the the refresh/sync is still running. Am I missing something or do I need to keep these two steps in separate pipelines and schedule the second job (import job) with a few minutes lag to allow the refresh to complete? 

    Thanks again for the help!



    ------------------------------
    Christine Carpentier
    ------------------------------
    • ChayceDuncan's avatar
      ChayceDuncan
      Qrew Captain

      You'll have to impose your own delay outside of the refresh. The refresh action isn't like an API call with a callback upon completion so there is no way to bind the two pipelines together. You can take a look on average at how long the refresh takes and either add a 'wait' into the pipeline or just schedule the second one to be slightly after the first. 



      ------------------------------
      Chayce Duncan
      ------------------------------