Saving to specific groups using data jar and shortcuts

Been using Devonthink for awhile and excited for dttg3 and am hoping to take advantage of more of its power.

I’m happy so far, but one feature I fully expected to see in v3 is the ability to save a file to a specific group instead of the databases at the time of saving.

Previously I used url schemes, data jar and shortcuts to workaround this issue by storing all of the uuid’s of the various groups I was working with in a data jar store that all my devonthink shortcuts could access. This means I don’t have to edit all my shortcuts when I add a new group or database that I want to save to, just have to add it once to Data Jar.

I’m hoping to fully move way from url schemes and am wondering how I can utilize the data jar keys with the new parameterized shortcuts in dttg3 to choose groups at the time of capture.

Hopefully that made sense, thanks in advance.

You could use the Ask Each Time option with the Create Item action, like so…

1 Like

That is very helpful - thanks

Can you suggest a workflow for saving an email in iOS to DTTG?

The best I can figure out is to choose “Forward”, then “Print”, then in the print dialogue do a long-press on the document to bring up the Share sheet, then choose DTTG.

This works to save an email as a PDFin DTTG (or elsewhere) but it is a bit convoluted.

Is there a simpler workflow which can be implemented using Shortcuts or otherwise?

Apple Mail doesn’t support the Share menu for emails.
On an IPad you can drag and drop emails in split screen.

You could setup a mail rule in macOS and forward mail to a database. Would that be something?

@BLUEFROG I know dragging and dropping an email from iOS mail to DTTG populates the URL in the DTTG record with a link to ‘jump,back’ to the original in Mail.

Would it be possible to add a similar link in the above solution with a mail rule on macOS? That way mails can be added to DT automatically on macOS, processed in a synced database in DTTG without dragging an dropping and if necessary replied to in the Mail client on iOS by clicking the link to open the original.

This is a modification of the Apple Mail script available in the script menu in Mail…

Add message(s) to DEVONthink Message (6.0 KB)

And here’s a modified Mail rule script…
Mail Rule - Add messages to DEVONthink - (4.1 KB)

Given there are more than one set of mail rules and mail scripts, perhaps we could make this a preference in Preferences > Mail and pass the message ID to a handler if set in the prefs, @cgrunenberg?


I’ll try it out as soon as I can, as that would significantly enhance my mail workflow.

As my receive/send ratio is definitely above one, such a link would allow for DTTG3 to be my primary mobile mail ‘client’ to review incoming mail (with the caveat that the mail rule in macOS should work of course, so I’ll set a badge for Mail to be sure) and only sending e-mails would require iOS Mail as an intermediate step.

Thanks! Hope I get things working.

Addition: for those confused about my suggestion. This is the workflow I’m planning to undertake:

incoming/outgoing mail
iOS Mail client
Mail left in client to allow for link below

incoming/outgoing mail
macOS Mail client
mail rule (-> DT)
DT database <—> sync store <—-> DTTG3 - click link to answer - open mail in iOS Mail

PS: I just updated the Mail rule script again to make writing the URL a bit more reliable, so download it again if you already grabbed it.

1 Like

Thanks! I tried that and it could be a good solution but I’m not certain on which groups show up there and why as not all my groups appear in that prompt.

And assuming they did all show up, I have quite a few groups to sort through to find the right one when typically what I want to do is quickly save, file it away and move on, not have an added step to search for a group.

The ability to display a specifically chosen subset of groups is very helpful in this regard.

You can control which groups show up depending on how you arrange parent groups / subgroups.

After a month of delay I finally got around to test the script you created within minutes (minutes vs. a month, hmmm :sleeping:) to add e-mail with a link to the original message and can confirm it works. Thanks @BLUEFROG!

To summarize:

E-mail that is received on both an iOS and macOS device is added to DT with a mail rule in macOS Mail and the DT database is subsequently synced to a sync store. When I sync that iOS device device with the sync store I can see (as expected) the e-mail in DTTG.

When I click the (i) symbol and open the URL, the link opens Mail on iOS and takes me to the original mail, to which I can respond for example in iOS Mail.

I agree that @cgrunenberg might include this behavior either as default or as an option, as I think many more people could benefit from this script.

No worries and you’re welcome. Glad it worked for you :slight_smile: