I’m stumped.
My next step would be to try running the following from script editor:
set thisName to “https://www.youtube.com/watch?v=__cjZ43g7-0”
set params to " -o "
set theInbox to "'~/Library/Application Support/DEVONthink 3/Inbox/%(title)s.%(ext)s' "
do shell script "/usr/local/Cellar/youtube-dl/2021.3.3/bin/youtube-dl" & quoted form of params & quoted form of theInbox & quoted form of thisName
This is a complete stab in the dark, it just eliminates one variable (DT/smart rules) from the equation. If it still doesn’t work, I think I’d try putting everything together as a single variable, so
set theCommand to "/usr/local/Cellar/youtube-dl/2021.3.3/bin/youtube-dl" & params & theInbox & thisName
do shell script quoted form of theCommand
Again, I don’t actually know what I’m doing - those would just be my next steps. (And I see @pete31 has also posted; he does know what he’s doing.)