Creating Webhook or Action to delete a file off of SFTP server sync connection

  • 0
  • 1
  • Question
  • Updated 7 months ago
  • Answered
I have a sync table created to retrieve hourly data and update main my main table (via report link and action).  After I retrieve the file, I need to send a call back to the SFTP connection which deletes the file off of the server.  How do I go about this?
Photo of Casie Masters

Casie Masters

  • 292 Points 250 badge 2x thumb

Posted 7 months ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
If you have the option to use something like Workato, that would be the easiest and fastest.

The alternative is to create your own Webhook and server script to delete the file.
Photo of Casie Masters

Casie Masters

  • 292 Points 250 badge 2x thumb
I got an answer.  Luckily, QB does this automatically if you specify your sync table to "Keep everything and add new records".  It looks at all the files in the folder, reads each, them moves them to another folder to remove them from the "active" one.  QB won't delete the file, but that's okay as it won't be in the usable folder so I then log in once a week or so and delete the files on my own. 

Here is the exerpt from QB online help in case anyone else needs it!  
Connect to a folder with multiple files

For CSV-connected tables, you can sync data from files dropped into your CSV folder from multiple sources, like invoice data from different vendors. Or, suppose your order management system outputs multiple CSV files every hour. You can ensure each of the files will be synced to your connected table.

Here's how it works:

  • If you choose Make my table match the latest CSV file, Quick Base only connects to the file that was uploaded last (according to the file's time stamp). Any other files in the folder are ignored.

  • If you choose Keep everything in my table and add new records, Quick Base connects to the files one at a time, starting with the oldest file and proceeding to the latest (according to the time stamp of the file).

    Quick Base will process a maximum of 10 files in a single refresh. After each file is read, Quick Base moves it to the Done folder. (Files in the Done folder have a timestamp appended to the filename). New records are added to your connected Quick Base table, and records with matching refresh keys are updated. No existing records are removed from the Quick Base table even if they are not in the connected files.

Warning:  As a best practice, do not create more than one "keep everything" connected table that points to the same CSV folder, since files that are processed and moved to the Done folder when you refresh one connected table won’t be available for refreshing another connected table.