DAMTool

🎨 Kwitykwity DAM Tool - Complete Setup Guide

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:

⏱️ Total time: 15-20 minutes


πŸ“‹ Prerequisites

Before you start, make sure you have:

No coding experience needed! πŸŽ‰


πŸš€ Part 1: Get the Code (5 minutes)

Step 1: Download the Files

Option A: Download ZIP (Easiest)

  1. Go to github.com/kwitykwity/DAMTool
  2. Click the green Code button
  3. Click Download ZIP
  4. Extract the ZIP file to your computer
  5. 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

  1. 🌐 Go to sheets.google.com
  2. βž• Click Blank to create a new spreadsheet
  3. πŸ“ At the top, click β€œUntitled spreadsheet”
  4. 🎯 Rename it: β€œDAM Database” (or any name you like)
  5. βœ… Leave this tab open!

πŸŽ‰ You now have your database!


πŸ—‚οΈ Part 3: Create Your Image Folder (2 minutes)

Step 3: Set Up Google Drive Folder

  1. 🌐 Go to drive.google.com
  2. βž• Click New β†’ Folder
  3. πŸ“ Name it: β€œDAM Assets” (or any name)
  4. πŸ“Έ Upload 3-5 test images to this folder
    • Supported: JPG, PNG, GIF, WebP, BMP
  5. πŸ”— 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
  6. πŸ“‹ 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!

  1. 🌐 Go to console.cloud.google.com
  2. πŸ†• Click Select a project β†’ New Project
  3. πŸ“ Name it: β€œDAM Tool”
  4. ⏳ Click Create (wait 30 seconds)
  5. πŸ”” Click the notification bell when it’s ready

Enable the Vision API:

  1. πŸ” In the search bar at top, type: β€œCloud Vision API”
  2. πŸ“± Click Cloud Vision API from results
  3. πŸ’™ Click the blue Enable button
  4. ⏳ Wait 30 seconds for it to enable

Create Your API Key:

  1. πŸ”§ Click APIs & Services β†’ Credentials (left sidebar)
  2. βž• Click + Create Credentials (top)
  3. πŸ”‘ Select API Key
  4. πŸŽ‰ A popup shows your key: AIzaSy...
  5. πŸ“‹ Click Copy and paste in your notepad
  6. βš™οΈ Click Restrict Key (important for security!)
  7. Under β€œAPI restrictions”:
    • Select Restrict key
    • Check βœ… Cloud Vision API
  8. πŸ’Ύ 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

  1. πŸ”™ Go back to your Google Sheet tab
  2. πŸ‘€ Look at the URL in the address bar:
    https://docs.google.com/spreadsheets/d/SPREADSHEET_ID_HERE/edit
    
  3. πŸ“‹ Copy the ID between /d/ and /edit
    • Example: 1H5o5NsDuqx5N9g9tXqNNVynAqqoWYqbCYcdjwfy31rQ
  4. πŸ“ Paste it in your notepad

βœ… Checkpoint: You now have all three IDs saved:


πŸ’» Part 6: Add the Code (5 minutes)

Step 6a: Open Apps Script

  1. πŸ”™ Go to your Google Sheet
  2. 🧩 Click Extensions β†’ Apps Script
  3. πŸ†• A new tab opens with Apps Script editor
  4. πŸ—‘οΈ Delete the placeholder code: function myFunction() { ... }

Step 6b: Add Backend Code

  1. πŸ“‚ Open the Code.gs file you downloaded
  2. πŸ“‹ Select ALL the code (Ctrl+A / Cmd+A)
  3. πŸ“‹ Copy it (Ctrl+C / Cmd+C)
  4. πŸ–₯️ Go back to Apps Script tab
  5. πŸ“‹ Paste the code (Ctrl+V / Cmd+V)
  6. πŸ’Ύ Click the Save icon (πŸ’Ύ) at top
  7. πŸ“ Name the project: β€œDAM Tool”

Step 6c: Add HTML Interface

  1. βž• Click the + button next to β€œFiles” (left sidebar)
  2. πŸ“„ Select HTML
  3. ⚠️ IMPORTANT: Name it exactly: DAMTool (no .html extension!)
  4. βœ… Click OK
  5. πŸ—‘οΈ Delete the placeholder HTML
  6. πŸ“‚ Open the DAMTool.html file you downloaded
  7. πŸ“‹ Select ALL and Copy
  8. πŸ–₯️ Go back to Apps Script
  9. πŸ“‹ Paste into the DAMTool file
  10. πŸ’Ύ Click Save

βœ… Checkpoint: You should see two files in the left sidebar:


βš™οΈ Part 7: Configure Your Credentials (3 minutes)

Step 7: Add Your Secret Keys

πŸ”’ This keeps your credentials secure and private!

  1. πŸ–₯️ In Apps Script, go to Code.gs
  2. πŸ“œ Scroll to the very bottom
  3. βž• 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!');
}
  1. πŸ“‹ Replace the three placeholder values with YOUR actual IDs from your notepad
  2. πŸ’Ύ Click Save

Run the Setup:

  1. 🎯 In the function dropdown at top, select setupMyConfig
  2. ▢️ Click Run (the play button)
  3. πŸ” A popup appears: β€œAuthorization required”
  4. πŸ”΅ Click Review permissions
  5. πŸ‘€ Choose your Google account
  6. ⚠️ Click Advanced β†’ Go to DAM Tool (unsafe)
    • Don’t worry! It’s safe - Google marks all custom scripts this way
  7. βœ… Click Allow
  8. ⏳ Wait for it to run (5-10 seconds)
  9. πŸ“Š Click Execution log (bottom) - you should see: β€œβœ… Configuration saved!”
  10. πŸ—‘οΈ DELETE the entire setupMyConfig function (important for security!)
  11. πŸ’Ύ Click Save

Update Code to Use Secure Config

  1. πŸ“œ Scroll to the top of Code.gs
  2. πŸ” Find the CONFIG section (around line 13)
  3. πŸ”„ 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']
};
  1. πŸ’Ύ Click Save

βœ… Checkpoint: Your credentials are now stored securely!


πŸ§ͺ Part 8: Test It Works (2 minutes)

Step 8: Quick Test

  1. 🎯 In the function dropdown, select syncFromInterface
  2. ▢️ Click Run
  3. ⏳ Wait 10-15 seconds
  4. πŸ“Š Click Execution log (bottom panel)
  5. βœ… You should see: { success: true, count: 3 } (or however many images you uploaded)

Check Your Sheet:

  1. πŸ”™ Go back to your Google Sheet tab
  2. πŸ”„ Refresh the page
  3. πŸŽ‰ You should see a new sheet tab called β€œAssets”
  4. πŸ“‹ 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

  1. πŸ”™ Go back to Apps Script tab
  2. πŸš€ Click Deploy β†’ New deployment
  3. βš™οΈ Click the gear icon next to β€œSelect type”
  4. 🌐 Select Web app
  5. βš™οΈ Configure settings:
    • πŸ“ Description: β€œDAM Tool v1”
    • πŸ”§ Execute as: Me (your-email@gmail.com)
    • 🌍 Who has access: Anyone
  6. πŸš€ Click Deploy
  7. ⏳ Wait 10 seconds
  8. πŸ“‹ 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
  9. πŸ“ Paste it in your notepad!
  10. βœ… Click Done

Step 9b: Connect the Frontend

  1. πŸ–₯️ In Apps Script, click DAMTool.html (left sidebar)
  2. πŸ” Press Ctrl+F / Cmd+F to open Find
  3. πŸ”Ž Search for: const baseUrl = '';
  4. πŸ“‹ Paste your deployment URL between the quotes:
    const baseUrl = 'https://script.google.com/macros/s/AKfycby.../exec';
    
  5. πŸ’Ύ Click Save

Step 9c: Redeploy with Updated URL

⚠️ IMPORTANT - Don’t skip this!

  1. πŸš€ Click Deploy β†’ Manage deployments
  2. ✏️ Click the Edit icon (pencil) next to your deployment
  3. πŸ”„ Under β€œVersion”, click New version
  4. πŸ“ Description: β€œAdded deployment URL”
  5. πŸš€ Click Deploy
  6. βœ… Click Done

βœ… Checkpoint: Your web app is deployed and connected!


πŸŽ‰ Part 10: Launch Your DAM Tool! (2 minutes)

Step 10: Open Your App

  1. πŸ“‹ Get your Web app URL from your notepad
  2. 🌐 Open a new browser tab
  3. πŸ“‹ Paste the URL and press Enter
  4. 🎨 Your DAM Tool loads!

First-Time Setup:

  1. πŸ”„ Click the πŸ”„ Sync button
    • Status shows: β€œSynced! Found 3 assets” βœ…
  2. πŸ”™ Go back to your Google Sheet tab
  3. 🧩 In the menu bar, you’ll see: 🎨 DAM Tool
  4. πŸ“‹ Click 🎨 DAM Tool β†’ 🏷️ Tag All Assets
  5. ⏳ Wait 30-60 seconds (AI is tagging your images!)
  6. βœ… Popup: β€œTagged 3 assets!”
  7. πŸ”™ Go back to your web app tab
  8. πŸ”„ Click πŸ”„ Sync again (refreshes the tags)

Try Searching:

  1. πŸ” In the search box, type a word related to your images
    • Examples: β€œperson”, β€œnature”, β€œblue”, β€œoutdoor”
  2. πŸ”Ž Click πŸ” Search
  3. πŸŽ‰ Your images appear as thumbnails!
  4. πŸ–±οΈ Hover over any image - you’ll see β€œβ¬‡ Download”
  5. πŸ–±οΈ 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:

  1. Upload to your Drive folder
  2. Open web app
  3. Click πŸ”„ Sync
  4. Go to Sheet β†’ 🎨 DAM Tool β†’ 🏷️ Tag All Assets
  5. Back to web app β†’ πŸ”„ Sync
  6. Search away!

πŸ”’ Keep it secure:

🎨 Customize it:


πŸ†˜ Troubleshooting

❌ β€œNo assets found”

❌ β€œError: Invalid response format”

❌ Search returns nothing

❌ β€œYou do not have permission”

πŸ› Still stuck?


πŸ“š 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


🎯 Next Steps

πŸš€ Share it:

🎨 Customize it:

πŸ’‘ Extend it:


πŸ“ž Support & Community

πŸ’¬ 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!** ⭐