little confused.
all I want is for my emails in outlook (all of them) to be automatically indexed in DT. Indexed and not imported as to not have the same email take space on the disk twice.
so I can use “tags” and search capabilities of DT etc…
there is a script that I can choose to IMPORT each email separately. not very good.
Does the new DT v3 have this ??!
No, this is not possible, in DEVONthink 2 or 3. Importing emails always copies the emails into the database.
this is understood. thats why I said that I would prefer to INDEX not import.
(as far as I know outlook is not keeping the emails as “eml” file)
but still, what is the way ? how do i automatically transfer the emails with DT and outlook?
every incoming email or every 5 min sync , but something automatic ?
This isn’t possible currently.
maybe some people managed to run an import script to DT using the RULE mechanism of outlook?
or some other automated way to run applescript on every new email in outlook INBOX ?
Sure, it’s possible but we aren’t aware of any such scripts. Perhaps someone has made one and will offer to share it here.
I managed to create a script and it works. so maybe other people will need this.
Question:
is it possible for DT to import one of the outlook folders automaticly without me pushing File/import/email etc…
Question:
can DT also delete the original email in the outlook folder after the import ?
I have two options for importing the emails from outlook to DT.
1 - DT import email utility. which is manual it seams
2 - create applescript
I actually created an applescript to automaticly import email in outlook folder.
apparently ourlook 2019 for mac doesnt have a RUN APPLE SCRIPT in the rules menu.
so I cant create a rule that runs this script. so it must be run periodicly. and I have created a rule that puts a copy of any new email to a dedicated folder in mailbox. so it works ok. and I can use the script for filtering and adding tags etc.
-- this string is used when the message subject is empty
property pNoSubjectString : "(no subject)"
-- Some initial variables
set today to (current date)
set cutoff to 1 * days
set shortCutoff to 3 * hours
tell application "Microsoft Outlook"
try
set myInbox to folder "Inbox" of default account
set DEVONfolder to mail folder "DEVON" of myInbox
set theMessages to messages of DEVONfolder
# A couple of counters used for logging changes
set countMoved to 0
-- set countDeleted to 0
tell application id "DNtp"
if not (exists current database) then error "No database is in use."
set theGroup to preferred import destination
end tell
repeat with theMessage in theMessages
try
set theSubject to subject of theMessage
set theSender to sender of theMessage
set theSender to (address of theSender) as string
set theSource to source of theMessage
set theDateReceived to time received of theMessage
set theDateSent to time sent of theMessage
-- set messageTime to time received of theMessage
set messageAge to today - theDateReceived
-- set theSender to sender of theMessage
-- set fromAddress to address of theSender
set isinvite to is meeting of theMessage
# Start of mail specific rules
# This moves to devonthink if age is less than cutoff
if isinvite is not true then
if theSubject is equal to "" then set theSubject to pNoSubjectString
set theCategories to {}
set theList to (category of theMessage)
repeat with theCategory in theList
set theCategories to theCategories & (name of theCategory)
end repeat
set isFlagged to true
if todo flag of theMessage is (not flagged) then set isFlagged to false
set isUnread to is read of theMessage
tell application id "DNtp"
set theRecord to create record with {name:theSubject & ".eml", type:unknown, creation date:theDateSent, modification date:theDateReceived, URL:theSender, source:(theSource as string)} in theGroup
if theCategories is not {} then
set theTags to tags of theRecord
set theTags to theTags & theCategories
set tags of theRecord to theTags
-- add tags logic:
end if
if isFlagged then set state of theRecord to true
if isUnread then set unread of theRecord to true
end tell
set countMoved to countMoved + 1
end if
# # This deletes a CI notification if it is more than 3 hours old or has been read
# if fromAddress is "semaphore+notifications@renderedtext.com" then
# if messageAge > shortCutoff or (is read) of theMessage is true then
# delete theMessage
# set countDeleted to countDeleted + 1
# end if
# end if
# # This archives a New Relic alert if it's more than 2 days old
# if name of theSender contains "New Relic Alert" then
# if messageAge > cutoff then
# move theMessage to folder "Notifications" of archive
# set countMoved to countMoved + 1
# end if
# end if
# and so on for every rule
# End of mail specific rules
on error errorMsg
log "Error: " & errorMsg
end try
--Delete the transfered message
-- permanently delete theMessages
end repeat
on error error_message number error_number
if the error_number is not -128 then display alert "Outlook" message error_message as warning
end try
-- log "Outlook cleanup ran at " & today & " - " & countMoved & " moved, " & countDeleted & " deleted"
end tell
tell application "Microsoft Outlook"
try
set myInbox to folder "Inbox" of default account
set DEVONfolder to mail folder "DEVON" of myInbox
set theMessages to messages of DEVONfolder
repeat with theMessage in theMessages
--Delete the transfered message
permanently delete theMessage
end repeat
on error error_message number error_number
if the error_number is not -128 then display alert "Outlook" message error_message as warning
end try
end tell