A Digital Asset Management tool that uses AI to automatically tag your images!
β‘ What Youβll Build
By the end of this guide, youβll have:
- π€ AI-powered image tagging using Google Cloud Vision
- π Instant search across all your assets
- πΌοΈ Beautiful thumbnail gallery
- β¬οΈ One-click downloads
- π Auto-sync with Google Drive
- π― 100% FREE using Googleβs free tier!
β±οΈ Total time: 15-20 minutes
π Prerequisites
Before you start, make sure you have:
- β
A Google account (Gmail)
- β
Basic ability to copy/paste
- β
3-5 test images ready to upload
No coding experience needed! π
π Part 1: Get the Code (5 minutes)
Step 1: Download the Files
Option A: Download ZIP (Easiest)
- Go to github.com/kwitykwity/DAMTool
- Click the green Code button
- Click Download ZIP
- Extract the ZIP file to your computer
- You should see:
Code.gs and DAMTool.html
Option B: Clone with Git
git clone https://github.com/kwitykwity/DAMTool.git
cd DAMTool
β
Checkpoint: You have Code.gs and DAMTool.html files on your computer
π Part 2: Create Your Google Sheet (2 minutes)
Step 2: Make Your Database
- π Go to sheets.google.com
- β Click Blank to create a new spreadsheet
- π At the top, click βUntitled spreadsheetβ
- π― Rename it: βDAM Databaseβ (or any name you like)
- β
Leave this tab open!
π You now have your database!
ποΈ Part 3: Create Your Image Folder (2 minutes)
Step 3: Set Up Google Drive Folder
- π Go to drive.google.com
- β Click New β Folder
- π Name it: βDAM Assetsβ (or any name)
- πΈ Upload 3-5 test images to this folder
- Supported: JPG, PNG, GIF, WebP, BMP
- π Get the Folder ID:
- Open the folder
- Look at the URL:
https://drive.google.com/drive/folders/FOLDER_ID_HERE
- Copy the ID (the long string after
/folders/)
- Example:
13kaO35wK7x3pGQrrCL7b0FGgVw5NjUP
- π Paste it in a notepad - youβll need it soon!
β
Checkpoint: You have a folder with images and the Folder ID saved
π Part 4: Get Your API Key (5 minutes)
Step 4: Enable Google Cloud Vision API
π― This is what gives your tool AI superpowers!
- π Go to console.cloud.google.com
- π Click Select a project β New Project
- π Name it: βDAM Toolβ
- β³ Click Create (wait 30 seconds)
- π Click the notification bell when itβs ready
Enable the Vision API:
- π In the search bar at top, type: βCloud Vision APIβ
- π± Click Cloud Vision API from results
- π Click the blue Enable button
- β³ Wait 30 seconds for it to enable
Create Your API Key:
- π§ Click APIs & Services β Credentials (left sidebar)
- β Click + Create Credentials (top)
- π Select API Key
- π A popup shows your key:
AIzaSy...
- π Click Copy and paste in your notepad
- βοΈ Click Restrict Key (important for security!)
- Under βAPI restrictionsβ:
- Select Restrict key
- Check β
Cloud Vision API
- πΎ Click Save
β
Checkpoint: You have your API key saved (starts with AIzaSy...)
π Part 5: Get Your Spreadsheet ID (1 minute)
Step 5: Find Your Sheet ID
- π Go back to your Google Sheet tab
- π Look at the URL in the address bar:
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID_HERE/edit
- π Copy the ID between
/d/ and /edit
- Example:
1H5o5NsDuqx5N9g9tXqNNVynAqqoWYqbCYcdjwfy31rQ
- π Paste it in your notepad
β
Checkpoint: You now have all three IDs saved:
- β
API Key
- β
Drive Folder ID
- β
Spreadsheet ID
π» Part 6: Add the Code (5 minutes)
Step 6a: Open Apps Script
- π Go to your Google Sheet
- π§© Click Extensions β Apps Script
- π A new tab opens with Apps Script editor
- ποΈ Delete the placeholder code:
function myFunction() { ... }
Step 6b: Add Backend Code
- π Open the
Code.gs file you downloaded
- π Select ALL the code (Ctrl+A / Cmd+A)
- π Copy it (Ctrl+C / Cmd+C)
- π₯οΈ Go back to Apps Script tab
- π Paste the code (Ctrl+V / Cmd+V)
- πΎ Click the Save icon (πΎ) at top
- π Name the project: βDAM Toolβ
Step 6c: Add HTML Interface
- β Click the + button next to βFilesβ (left sidebar)
- π Select HTML
- β οΈ IMPORTANT: Name it exactly:
DAMTool (no .html extension!)
- β
Click OK
- ποΈ Delete the placeholder HTML
- π Open the
DAMTool.html file you downloaded
- π Select ALL and Copy
- π₯οΈ Go back to Apps Script
- π Paste into the DAMTool file
- πΎ Click Save
β
Checkpoint: You should see two files in the left sidebar:
- β
Code.gs
- β
DAMTool.html
Step 7: Add Your Secret Keys
π This keeps your credentials secure and private!
- π₯οΈ In Apps Script, go to Code.gs
- π Scroll to the very bottom
- β Add this function at the end:
function setupMyConfig() {
const scriptProps = PropertiesService.getScriptProperties();
scriptProps.setProperties({
'VISION_API_KEY': 'PASTE_YOUR_API_KEY_HERE',
'DRIVE_FOLDER_ID': 'PASTE_YOUR_FOLDER_ID_HERE',
'SPREADSHEET_ID': 'PASTE_YOUR_SPREADSHEET_ID_HERE'
});
Logger.log('β
Configuration saved!');
}
- π Replace the three placeholder values with YOUR actual IDs from your notepad
- πΎ Click Save
Run the Setup:
- π― In the function dropdown at top, select setupMyConfig
- βΆοΈ Click Run (the play button)
- π A popup appears: βAuthorization requiredβ
- π΅ Click Review permissions
- π€ Choose your Google account
- β οΈ Click Advanced β Go to DAM Tool (unsafe)
- Donβt worry! Itβs safe - Google marks all custom scripts this way
- β
Click Allow
- β³ Wait for it to run (5-10 seconds)
- π Click Execution log (bottom) - you should see: ββ
Configuration saved!β
- ποΈ DELETE the entire
setupMyConfig function (important for security!)
- πΎ Click Save
Update Code to Use Secure Config
- π Scroll to the top of Code.gs
- π Find the
CONFIG section (around line 13)
- π Replace it with this:
const CONFIG = {
VISION_API_KEY: PropertiesService.getScriptProperties().getProperty('VISION_API_KEY'),
DRIVE_FOLDER_ID: PropertiesService.getScriptProperties().getProperty('DRIVE_FOLDER_ID'),
SPREADSHEET_ID: PropertiesService.getScriptProperties().getProperty('SPREADSHEET_ID'),
SHEET_NAME: 'Assets',
SUPPORTED_TYPES: ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/bmp']
};
- πΎ Click Save
β
Checkpoint: Your credentials are now stored securely!
π§ͺ Part 8: Test It Works (2 minutes)
Step 8: Quick Test
- π― In the function dropdown, select syncFromInterface
- βΆοΈ Click Run
- β³ Wait 10-15 seconds
- π Click Execution log (bottom panel)
- β
You should see:
{ success: true, count: 3 } (or however many images you uploaded)
Check Your Sheet:
- π Go back to your Google Sheet tab
- π Refresh the page
- π You should see a new sheet tab called βAssetsβ
- π Click it - your images are listed!
β
Checkpoint: Your images are synced to the sheet!
π Part 9: Deploy Your Web App (3 minutes)
Step 9a: Create Deployment
- π Go back to Apps Script tab
- π Click Deploy β New deployment
- βοΈ Click the gear icon next to βSelect typeβ
- π Select Web app
- βοΈ Configure settings:
- π Description: βDAM Tool v1β
- π§ Execute as: Me (your-email@gmail.com)
- π Who has access: Anyone
- π Click Deploy
- β³ Wait 10 seconds
- π CRITICAL: Copy the entire Web app URL
- Looks like:
https://script.google.com/macros/s/AKfycby.../exec
- Click Copy button
- Or select all and Ctrl+C / Cmd+C
- π Paste it in your notepad!
- β
Click Done
Step 9b: Connect the Frontend
- π₯οΈ In Apps Script, click DAMTool.html (left sidebar)
- π Press Ctrl+F / Cmd+F to open Find
- π Search for:
const baseUrl = '';
- π Paste your deployment URL between the quotes:
const baseUrl = 'https://script.google.com/macros/s/AKfycby.../exec';
- πΎ Click Save
Step 9c: Redeploy with Updated URL
β οΈ IMPORTANT - Donβt skip this!
- π Click Deploy β Manage deployments
- βοΈ Click the Edit icon (pencil) next to your deployment
- π Under βVersionβ, click New version
- π Description: βAdded deployment URLβ
- π Click Deploy
- β
Click Done
β
Checkpoint: Your web app is deployed and connected!
Step 10: Open Your App
- π Get your Web app URL from your notepad
- π Open a new browser tab
- π Paste the URL and press Enter
- π¨ Your DAM Tool loads!
First-Time Setup:
- π Click the π Sync button
- Status shows: βSynced! Found 3 assetsβ β
- π Go back to your Google Sheet tab
- π§© In the menu bar, youβll see: π¨ DAM Tool
- π Click π¨ DAM Tool β π·οΈ Tag All Assets
- β³ Wait 30-60 seconds (AI is tagging your images!)
- β
Popup: βTagged 3 assets!β
- π Go back to your web app tab
- π Click π Sync again (refreshes the tags)
Try Searching:
- π In the search box, type a word related to your images
- Examples: βpersonβ, βnatureβ, βblueβ, βoutdoorβ
- π Click π Search
- π Your images appear as thumbnails!
- π±οΈ Hover over any image - youβll see ββ¬ Downloadβ
- π±οΈ Click any image - it downloads instantly!
π Congratulations! Youβre Done!
π What You Built:
β
AI-powered image search engine
β
Automatic tagging with Google Cloud Vision
β
Beautiful visual gallery interface
β
One-click downloads
β
Two-way sync with Google Drive
β
100% FREE using Googleβs free tier!
π Pro Tips:
πΎ Bookmark your Web app URL - thatβs your personal DAM Tool!
πΈ Add more images:
- Upload to your Drive folder
- Open web app
- Click π Sync
- Go to Sheet β π¨ DAM Tool β π·οΈ Tag All Assets
- Back to web app β π Sync
- Search away!
π Keep it secure:
- Never share your API key
- Your credentials are safely stored in Script Properties
- Your deployment URL is private (only you can use it)
π¨ Customize it:
- Change colors in the CSS
- Modify the search logic
- Add more features!
π Troubleshooting
β βNo assets foundβ
- Check: Did you upload images to the Drive folder?
- Check: Did you click Sync in the web app?
- Solution: Upload images, then click Sync
- Check: Did you paste the deployment URL in DAMTool.html?
- Check: Did you redeploy after adding the URL?
- Solution: Go back to Step 9b and 9c
β Search returns nothing
- Check: Did you run βTag All Assetsβ from the Sheet menu?
- Check: Are the tags actually in column G of your sheet?
- Solution: Sheet β π¨ DAM Tool β π·οΈ Tag All Assets
β βYou do not have permissionβ
- Check: Did you run the authorization in Step 7?
- Solution: Apps Script β Select any function β Run β Allow permissions
π Still stuck?
- Open browser console (F12) and check for errors
- Check Apps Script Execution Log
- Open a GitHub issue with screenshots
π How It Works
βββββββββββββββββββ
β Google Drive β β You upload images here
β (Storage) β
ββββββββββ¬βββββββββ
β
β Sync
βββββββββββββββββββ
β Google Sheets β β Metadata database
β (Database) β
ββββββββββ¬βββββββββ
β
β Cloud Vision API
βββββββββββββββββββ
β AI Tagging β β Generates tags automatically
β (Vision API) β
ββββββββββ¬βββββββββ
β
β Search
βββββββββββββββββββ
β Web Interface β β You search and download here
β (DAMTool) β
βββββββββββββββββββ
π‘οΈ Security Checklist
- β
API keys stored in Script Properties (not in code)
- β
Credentials never committed to GitHub
- β
API key restricted to Cloud Vision API only
- β
Web app runs under your account (not public scripts)
- β
All data stays in YOUR Google account
π― Next Steps
π Share it:
- Deploy for your team
- Each person needs their own setup (15 min each)
π¨ Customize it:
- Fork the repo
- Modify colors, layout, features
- Submit pull requests!
π‘ Extend it:
- Add more file types
- Integrate with other tools
- Build a mobile interface
π¬ Questions? Open a GitHub Issue
π Found a bug? Submit a Pull Request
β Like it? Star the repo!
π Share it! Help others find it
π License
MIT License - Free to use and modify!
### π¨ Made with π by Kwitykwity
**[GitHub](https://github.com/kwitykwity)** β’ **[Live Demo](https://kwitykwity.github.io/DAMTool/)** β’ **[Report Issue](https://github.com/kwitykwity/DAMTool/issues)**
β **Star this repo if it helped you!** β