# Tips: Insert video into markdown notes

**URL:** https://discourse.devontechnologies.com/t/tips-insert-video-into-markdown-notes/58717
**Category:** DEVONthink
**Tags:** automation, devonthink3
**Created:** [October 5, 2020, 3:22pm UTC](https://discourse.devontechnologies.com/t/tips-insert-video-into-markdown-notes/58717 "2020-10-05T15:22:17Z")
**Posts on this page:** 1
**Showing post:** 17

<div class="post-metadata">

### Author: ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)
#### Post date: [October 6, 2020, 9:25am UTC](https://discourse.devontechnologies.com/t/tips-insert-video-into-markdown-notes/58717/17 "2020-10-06T09:25:13Z")

</div>

Here’s a minor revision which does not depend on the version of macOS/Finder or the localization:

```auto
tell application id "DNtp"
	set URLList to {}
	
	repeat with thisRecord in (selection as list)
		set recordName to (name of thisRecord as string)
		set recordType to type of thisRecord
		set recordLink to (reference URL of thisRecord as string)
		if recordType as string is "quicktime" or recordType as string is "«constant **** quti»" then
			if width of thisRecord is greater than 0 and height of thisRecord is greater than 0 then
				copy ("* [" & recordName & "](" & recordLink & ")" & return & return & space & space & space & space & "<video controls=\"\"> <source src=\"" & recordLink & "\"></video> " & return & return) to end of URLList
			else
				copy ("* [" & recordName & "](" & recordLink & ")" & return & return & space & space & space & space & "<audio controls=\"\"> <source src=\"" & recordLink & "\"></audio> " & return & return) to end of URLList
			end if
		else if recordType is picture then
			copy ("* [" & recordName & "](" & recordLink & ")" & return & return & space & space & space & space & "![](" & recordLink & ")" & return & return) to end of URLList
		else
			copy ("* [" & recordName & "](" & recordLink & ")" & return & return) to end of URLList
		end if
	end repeat
	
	if URLList ≠ {} then
		set the clipboard to (URLList as string)
	else
		display alert "No items selected."
	end if
end tell
```

---

_[View the full topic](https://discourse.devontechnologies.com/t/tips-insert-video-into-markdown-notes/58717)._
