I built this AppleScript to automate a small but repetitive task in my research workflow: saving YouTube audio directly into DEVONthink for long-term archiving and retrieval. Normally, downloading, converting, and importing a track requires juggling multiple tools — yt-dlp, ffmpeg, Finder, and DEVONthink itself. This script compresses all of that into one clean pipeline. When I paste a YouTube URL, it automatically downloads the best available audio, converts it to high-quality WAV format, and imports it into DEVONthink’s Global Inbox with a single step.
Technically, the script is POSIX-hardened for macOS. It creates a temporary working directory under the Downloads folder, executes yt-dlp and ffmpeg inside that sandbox, logs every step to DEVONthink’s internal console, and then cleans up after itself — leaving no stray files behind. Once the audio is imported, the YouTube link is saved in the record’s URL field, and the file becomes a permanent, searchable item within DEVONthink. The design focuses on reliability, reproducibility, and minimal friction between discovery and curation — essential qualities for anyone managing large-scale research archives.
I also attempted to include metadata preservation. The script fetches the YouTube channel name via yt-dlp and applies it as a tag within DEVONthink…
Learn more Automating YouTube Audio Imports into DEVONthink 4 with AppleScript