Hi there,
I’m currently using the Apple Script that fetches my mails from the “Mail”-App.
Unfortunately, all mails go into the global inbox of Devothink.
Is there a possibility to change that into e.g. the database “E-Mails”?
Thanks in advance!
Hi there,
I’m currently using the Apple Script that fetches my mails from the “Mail”-App.
Unfortunately, all mails go into the global inbox of Devothink.
Is there a possibility to change that into e.g. the database “E-Mails”?
Thanks in advance!
That’s of course possible but which script do you actually use? E.g. the source code would be useful.
I’m currently using this one:
-- Mail Rule - Add messages to DEVONthink
-- Created by Christian Grunenberg on Mon Apr 19 2004.
-- Copyright (c) 2004-2020. All rights reserved.
-- this string is used when the message subject is empty
property pNoSubjectString : "(no subject)"
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with theMessage in theMessages
try
tell theMessage
set {theDateReceived, theDateSent, theSender, theSubject, theSource, theReadFlag} to {the date received, the date sent, the sender, subject, the source, the read status}
end tell
if theSubject is equal to "" then set theSubject to pNoSubjectString
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), unread:(not theReadFlag)} in incoming group
perform smart rule trigger import event record theRecord
end tell
end try
end repeat
end tell
end perform mail action with messages
end using terms from
Change
create record with
… in incoming group
to
create record with
… in (incoming group of database "DatabaseName")
… or
create record with … in incoming group -- with no database specified
create record with … in inbox
-- Both commands target the Global Inbox
… or
create record with … in (root of database "DatabaseName")
… or
set theGroup to display group selector
create record with … in theGroup
… or
set theGroup to (get record with uuid "x-devonthink-item://…") -- Pasting the item link of the group
create record with … in theGroup
Thanks a lot, worked fine for me!
You’re welcome
Which option did you choose?
I chose that one:
create record with … in (root of database "DatabaseName")
Gotcha. Well, I hope the other options are clear to you as well
Yap, more or less
The „Root“-option is fine for me.