I have a Lotus Notes client running on my Mac, no alternative for the time being as the server has no imap option. I really miss the ability to add emails to DTP with a single click. Any workarounds or scripts that anybody know of?
It is scriptable somewhat, but I am unable to judge the usefulness of what your proscribed action reveals, unfortunately. I have told my self many a time that I should really spend a few hours to learn Apple Script, but so far no luck…
The list that comes up in Script Editor is way too long to copy here, anyway. What happens when I drop a Notes message onto the Sorter is that a link becomes a first (and only) line of text in a text file in DTP. This link works; it opens the email in Lotus Notes in a separate window if you mark it, right-click it and choose ‘Open URL’. But there is no searchable text transferred.
I would certainly prefer to work in Apple Mail, but as mentioned, that is not an option here.
Notes is scriptable ad nauseam with LotusScript and Java, not via AppleScript, though.
I think the best way to automate it would be to use the Notes Formula language and create an RTF with the content of the email and some pseudo fields, like “From:: abc”, “To:: dfg” etc., export the pdf to the file system and let DT import any RTF that appears in that folder. Problem is that you need a) good command of Notes Formula language, b) of Applescript and c) probably the right to alter your Notes e-Mail application.
An approach that does not involve scripting: Try to add any imap Account in your Notes email settings (you might not be allowed to do that), copy the email from your corporate email app and paste it into your imap database. It might not work due to copy restrictions imposed by your Notes administrators. Use Apple Mail to access the email and to import it into DT.
Thanks for that!
I did get some results I sent to Christian, though. It looked as if Script Editor came up with a lot. For now, I print my emails using the pdf to Devonthink script and thus get at least the info into DTP. And I must say: Notes is the worst, sluggish software I have seen for some time. It gives Entourage serious competition in the “worst Mac adaptation” contest.
Notes 8.5 has some AppleScript support. I have some scripts for creating OmniFocus actions from Notes emails.
I’m currently testing DTPO with Notes 8.5. One thing I found was dragging an email from my notes inbox (or other lists) to DT produced different results than dragging the Tab to DT. I found this gives me a mailto: style link but has the benefit of capturing the body of the email as text.
My problem with Notes links in OmniFocus is my aggressive archiving. Once a Notes mail is archived, the link no longer works.
What I’m doing now is ⌘⇧S in Notes to save the file. I select format eml and save it to DT global inbox. This seems to have the highest fidelity of text and images. From there I get the DT link to the document and put it into the OmniFocus action. The beauty of this is that the DT link remains constant when the document is moved to other databases or groups.
In an ideal world, I’d have an AppleScript that could snag the Lotus Notes rtf, save it to a specific group in DT, grab the new DT link and create the OF action from it.
Here’s my AppleScript to create a notes link in the clipboard from a currently selected email. The magic doesn’t work on a selection in the inbox view, probably any Notes list view. It does not work with team room documents but works with most emails.
set ahlib to (load script "~/Library/Scripts/ApplicationHelperLib.scpt")
if not ahlib's appIsRunning("Notes") then
ahlib's growlAppUnavailable("Notes")
return
end if
tell application "Notes"
set ws to make new uiworkspace
set db to database of currentuidatabase
set uidoc to currentdocument of ws
set theUIView to currentview of ws
if theUIView is 0 then
set doc to document of uidoc
else
set docs to documents of theUIView
if count of docs = 0 then
return
end if
set doc to docs getfirstdocument
end if
set Subject to getitemvalue of doc itemname "Subject"
set theURL to "notes:///" & (replicaid of db) & "/0/" & (universalid of doc)
end tell
set the clipboard to theURL
There’s some missing function around the start and completion of this but the real magic is the Notes stuff. The OmniFocus forums have some great examples and tools for AppleScripting OmniFocus.
Here’s my AppleScript to take a current selection in DT and create an OmniFocus action in the inbox. The workflow is select the document in DT, use Quicksilver to find the DT2OF script, and run it.
set ahlib to (load script "~/Library/Scripts/ApplicationHelperLib.scpt")
if not ahlib's appIsRunning("DEVONthink Pro") then
ahlib's growlAppUnavailable("DEVONthink Pro")
return
end if
tell application id "DNtp"
set these_items to the selection
if these_items is {} then
display dialog "No DEVONThink items selected." buttons {"OK"}
return
end if
set itemCount to count of these_items
set Subject to the name of item 1 of these_items
if (itemCount > 1) then
set Subject to Subject & ", et. al."
end if
set RecordLink to the reference URL of item 1 of these_items
repeat with this_item in rest of these_items
set RecordLink to RecordLink & ", " & return & the reference URL of this_item
end repeat
end tell
set oflib to (load script "~/Library/Scripts/OmniFocusLib.scptd")
oflib's addToOFInbox(Subject, RecordLink)