I’d like to create a simple document on a daily basis in a particular group:
(* tell application id "DNtp"
set sel to (selection as list)
my performSmartRule(sel)
end tell *)
on performSmartRule(theRecords)
tell application id "DNtp"
set theDate to date string of (current date)
set theName to "Notizen " & theDate
set theID to "6C86E6E5-DC88-45F5-9815-290BDE60E35C"
set theGroup to get record with uuid theID
set theMD to "# " & theName & return & return & return & return
set theRecord to create record with {name:theName, type:markdown, content:theMD} in theGroup
end tell
end performSmartRule
Running the script “manually” works as expected, but via smart rule it doesn’t execute and is impossible to debug. At least for a dummy. Any suggestions?