How to Automatically Save Customer Documents to Google Drive using DoubleTick
When customers send documents (like PDFs) on WhatsApp, they are stored in DoubleTick’s data storage.
Without automation, your team has to:
Open each chat
Download the file
Upload it manually to Drive
This process is repetitive and error-prone.
What this setup does
Once configured, every time a customer sends a document:
The file is automatically fetched from DoubleTick
It is uploaded to Google Drive
A shareable link is generated
The link is logged into a Google Sheet
No manual work. Everything is tracked automatically.
How the Automation Works
Here’s the complete flow:
Customer sends a document on WhatsApp
DoubleTick webhook triggers (On Message Received)
Bot sends document URL to your API
Google Apps Script fetches the file securely
File is uploaded to Google Drive
Drive link is saved in Google Sheets
Before You Begin
Make sure you have:
DoubleTick account with WhatsApp API active
DoubleTick Developer API Key
Google account (Drive + Sheets + Apps Script access)
Google Drive Folder ID (from folder URL)
Google Sheet ID (from sheet URL)
Part 1: Create Google Apps Script
Step 1: Open Apps Script
Go to: script.google.com
Click New Project
Step 2: Add Script
Paste the following script:
Step 3: Update Required Values
Replace:
YOUR_DOUBLETICK_API_KEY→ Your API keyYOUR_SPREADSHEET_ID→ Your Google Sheet ID
Step 4: Deploy Script
Click Deploy → New Deployment
Select Web App
Set access to: Anyone
Click Deploy
Copy the Web App URL
Part 2: Setup Bot in DoubleTick
Step 1: Create Bot
Go to Bots
Click Create New Bot
Step 2: Add Webhook Trigger
Add Webhook Node
Event: On Message Received
Copy webhook URL
Step 3: Register Webhook
Go to Settings → Webhooks
Click Create Webhook
Paste URL
Select event: On Message Received
Save
Step 4: Add Call API Node
Configure:
Method: POST
URL: (Apps Script Web App URL)
Body Type: JSON
Step 5: Activate Bot
Save the bot
Make sure it is active
Part 3: Test the Setup
Send a PDF to your WhatsApp number
Wait a few seconds
Expected Result:
File appears in Google Drive
A new row is added in Google Sheet
Sheet contains:
Timestamp
File link
Tips & Best Practices
Add timestamp to file names to avoid duplicates
Use a dedicated Drive folder for organization
Extend the sheet with more fields (customer number, etc.)
You can test using Postman by sending a file URL manually
Summary
With this setup, you’ve built a fully automated system that:
Captures customer documents instantly
Stores them securely in Google Drive
Maintains a real-time log in Google Sheets
This reduces manual effort, improves organization, and ensures no document is ever missed.
Last updated