Prepend some text in a markdown note

I would like to prepend some text in a markdown file via SmartRule with AppleScript, but my dummy approach doesn’t work:

on performSmartRule(theRecords)
tell application id "DNtp"
	repeat with theRecord in theRecords
		set theNote to content of theRecord
		set the content of theRecord to "# Example Text" & theNote
	end repeat
end tell
end performSmartRule

Any hints?

Use plain text instead of content.

1 Like