Skip to main content

Copy Uploaded Files to Google Drive: Overview

Example: copy uploaded files to Google Drive​

This page explains how to copy every file uploaded to AnyDB into Google Drive, once each, after the upload finishes, and gives the values both Zapier and Make need. For step-by-step instructions with screenshots, see the Zapier guide or the Make guide. The flow is the same in both tools:

  1. Trigger: AnyDB Updated Record, narrowed to records of type File whose file cell A1 changed. It fires once per upload, when the upload completes.
  2. Download: call AnyDB's file download endpoint with the record from the trigger.
  3. Upload: send the downloaded file to Google Drive, named after the AnyDB record.
note

The trigger fields used here (Record Type, optional Record ID and Cell IDs) need AnyDB Zapier app 1.2.1 or later, and the matching update of the AnyDB Make app.

What you need​

ItemWhere to get it
AnyDB URLhttps://app.anydb.com (or your own AnyDB server)
AnyDB emailthe email of the AnyDB user whose access the integration uses
AnyDB API keythe integration key in that user's Profile dialog. One key works for the Zapier app, the Make app and the download endpoint below
Team and Databasepicked from the lists in the trigger
Google Drivea Google Drive connection in Zapier or Make

The integration only sees records and files that this AnyDB user is allowed to read.

Reference: values used in both tools​

What the trigger sends. Each run receives one record. These are the keys used below:

KeyMeaningExample
teamidTeam ID<team id>
adbidDatabase ID<database id>
adoidRecord ID of the File record<record id>
nameRecord name, which for a file is the file name with its extensionInvoice 2024.pdf
cell_posthe cell that changedA1
object_urllink to the record in AnyDBhttps://app.anydb.com/<team>/<db>/<record>

Also sent: team_name, adb_name, type, created, updated, createdby_userid, createdby_displayname, updatedby_userid, updatedby_displayname, cell_key, cell_type and cell_value.

The download endpoint.

GET https://app.anydb.com/api/integrations/ext/download
Query parameterValue
teamidthe trigger's teamid
adbidthe trigger's adbid
adoidthe trigger's adoid
cellposA1 (the file cell of a File record)
redirectfalse returns the download link as JSON (used here). true answers with a redirect to the file
HeaderValue
X-ANYDB-EMAILyour AnyDB email
X-ANYDB-API-KEYyour AnyDB API key

With redirect=false the response is JSON. The data property holds a short-lived, pre-signed link to the file. The link needs no credentials:

{ "status": "success", "data": "https://<storage-host>/<path>?X-Amz-Signature=..." }

Step-by-step guides with screenshots​

Troubleshooting​

SymptomCause and fix
The Zap or scenario does not runRecord Type must be File and Cell IDs A1. The AnyDB user must be able to read the uploaded file.
It runs twice per uploadYour AnyDB server predates the fix that ignores the upload's placeholder write. Ask your AnyDB administrator to update the server.
Make: The initial URL is allowed, but the redirect destination is not allowed by this connectionUse redirect=false with the two HTTP modules shown above.
Make: [403] Request had insufficient authentication scopes at Google DriveSee the Google Drive permissions note above.
Make: hooks.type: Value must not be empty when creating the trigger's webhookYour Make account has an outdated copy of the AnyDB app. Refresh, or contact AnyDB support.
The download returns 401 or 403Check X-ANYDB-EMAIL and the API key, and that the user can read the record.