Home

Appendix

Application Icon   Placeholders

One of the most powerful features of DEVONthink is the ability to insert data dynamically. A placeholder is a bit of code DEVONthink interprets when used in these scenarios, replacing it with a specific value. You may have an imprint with a Name placeholder defined in the title. When the imprint is used on a PDF, the placeholder is converted to the name of the file!

To extend the possibilities even further, you can combine static text and multiple placeholders to achieve truly custom results. You can use these in a variety of ways: smart rules and batch processing, Reminder alarms, custom imprints on images and PDFs, in WikiLink templates, and more.

Below is a list of placeholders currently available. Following each description is the raw placeholder that can be used when creating templates in external applications or using the import template AppleScript command:

Note: Please be aware not all placeholders can be used in all situations. For example, you can't use the Location placeholder in a document template as the document doesn't have a location until after it's created. Testing is strongly encouraged.

Generic Info:

  • Icon
    Name: The name or title of the document. (%recordName%)
  • Icon
    Proposed Name: A suggested name derived from a document's title or from the first line of the document if no title is present. (%recordProposedName%)
  • Icon
    Name Without Date: Returns the filename after parsing out any detected dates. (%recordNameWithoutDate%)
  • Icon
    Aliases: Any aliases applied to the document. (%recordAliases%)
  • Icon
    Finder Comment: Any Finder comments applied to the document. (%recordComment%)
  • Icon
    File Name: The filename in the file system. (%recordFilename%)
  • Icon
    File Extension: The extension of the document's filename. (%recordPathExtension%)
  • Icon
    Kind: The kind of the file, e.g., group or rich text document. (%recordKind%)
  • Icon
    URL: The URL in the Info pane. (%recordURL%)
  • Icon
    Item Link: The unique URL of the document. (%recordLink%)
  • Icon
    Location: The location in the database; e.g., /Inbox/Research. (%recordLocation%)
  • Icon
    Tags: Tags applied to the document. (%recordTags%)
  • Icon
    #Tags: Tags applied to the document but returned as hashtags. (%recordHashTags%)

Counters:

  • Icon
    Index: An incrementing number relative to the number of items being processed, e.g., by a smart rule or imprint. (%recordIndex%)
  • Icon
    Counter: Similar to the Index, this number is zero-padded. (%recordCounter%)
  • Icon
    Bates Number: Inserts a Bates number. (%recordBatesNumber%)
  • Icon
    Page Count: The total number of pages in the document. (%recordPageCount%)

Item Locations:

  • Icon
    Group Name: The name of the group containing the document, e.g., /001/a/b/myfile.txt would report b as the group name. (%groupName%)
  • Icon
    Top Group Name: The name of the top level group in the root of the database, e.g., /001/a/b/myfile.txt would report 001 as the top group name. (%topGroupName%)
  • Icon
    Database Name: The name of the database containing the document. (%databaseName%)
  • Icon
    Database Path: The filesystem path of the database. (%databasePath%)

Document Attributes:

  • Icon
    Original Name: The persistent original name of a renamed document. Typically used in audit-proof databases. (%record_originalname%)
  • Icon
    Attachments: The number of attachments in a document, e.g., a rich text document or email. (%record_attachments%)
  • Icon
    PDF Annotations: The number of annotations in the active document. (%record_annotationcount%)
  • Icon
    Incoming Item Links: The number of documents containing item links to the active document. (%record_incomingItemLinkCount%)
  • Icon
    Outgoing Item Links: The number of documents linked to in the active document. (%record_outgoingItemLinkCount%)

Geographic Info:

  • Icon
    Language: An abbreviation of language detected in the document's indexed contents. (%record_language%)
  • Icon
    Country: The country in the geolocation data for a document. (%record_country%)
  • Icon
    Postal Code: The postal code derived from the geolocation data for a document. (%record_zipcode%)
  • Icon
    Administrative Area: This is state, province, or region in the geolocation data for a document. (%record_area%)
  • Icon
    Locality: The city in the geolocation data for a document. (%record_locality%)

Formatting:

  • Icon
    Tab: A tab character. (%tab%)
  • Icon
    Line Break: A line break (return) character for multi-line text. (%newline%)

Detected Values: The following placeholders get their values from the name or content of a matched document. For example, the Document String is the result of a Scan Name or Scan Text smart action.

  • Icon
    Document Amount: This is an monetary amount detected in the name or content of documents, typically receipts or invoices. (%documentAmount%)
  • Icon
    Document String: This is a string detected in the name or content of documents. (%documentString%)
  • Icon
    Digital Object Identifier: The unique digital object identifier of the active document, if available. (%digitalObjectIdentifier%)
  • Icon
    International Standard Book Number (ISBN): The detected ISBN number of a document. (%internationalStandardBookNumber%)

Date Placeholders: There are several types of date-specific placeholders to choose from. You can choose from several built-in formats, e.g., the short date, or create your own with individual date component placeholders. Due to the repetition of date placeholders, the raw value of every individual placeholder isn't listed here. However, below are the date component raw values. Note some formats will appear relative to your geographic location, e.g., Jan 1, 2001 for the medium date would be common in the US.

Calendar Components:

  • Icon
    01/01/2001: The short date format. (%shortDate%)
  • Icon
    Jan 1, 2001: The medium date format. (%date%).
  • Icon
    2001/01/01: The ISO date format. (%sortableDate%)
  • Icon
    Saturday, Jan 1, 2001: The long date format. (%longDate%)
  • Icon
    01: The zero-padded number of the date. (%day%)
  • Icon
    Saturday: The name of the day. (%weekday%)
  • Icon
    01: The zero-padded number of the month. (%month%)
  • Icon
    January: The name of the month. (%monthname%)
  • Icon
    2001: The full year. (%year%)
  • Icon
    01: The short year. (%shortYear%)

Time Components:

  • Icon
    Time: The current time shown in 12 or 24 hour format, depending on your system settings, e.g., 11:59:59 AM. (%time%)
  • Icon
    Hour: The hour of the time. (%hour%)
  • Icon
    Minute: The minutes of the time. (%minute%)
  • Icon
    Second: The seconds of the time. (%second%)

Listed below are the supported date types with their raw prefix provided. The placeholders in the previous list relate to the current date, so entering (%month%) would give you the current month. To use other kinds of dates, e.g., Newest Document Date, use the raw value, then add the date component from the list above with the first letter capitalized. For example, getting the month of the newest document date would be: %newestDocumentDate% and month yielding newestDocumentDateMonth.

  • Icon
    Current Date: Today's date. There is no prefix to the raw placeholders for current date.
  • Icon
    Addition Date: The date the item added to the database. recordAddition…
  • Icon
    Creation Date: The date the item was created. recordCreation…
  • Icon
    Modification Date: The date the items was last modified. recordModification…
  • Icon
    Date: This is a date detected in the document's contents, e.g., in a receipt. For PDFs only the first four pages are used. documentDate…
  • Icon
    Newest/Oldest Document Date: The newest or oldest date detected in the document. For PDFs, only the first four pages are used. newestDocumentDate… and oldestDocumentDate…

On a side note, you can string together multiple date and time component placeholders, e.g., to create a Zettelkasten timestamp string like 20010101115959.

Clipboard:

  • Icon
    Clipboard: Inserts plain text content from the clipboard. (%clipboard%)
  • Icon
    Clipboard Styled: Inserts rich text content from the clipboard. (%styledClipboard%)
  • Icon
    Clipboard Link: Inserts a link from rich text content on the clipboard. (%clipboardLink%)

Computer Properties:

  • Icon
    Predefined Author: The Author specified in DEVONthink's settings. (%author%)
  • Icon
    Username: The shortname of the current macOS account. (%username%)
  • Icon
    Full Username: The longname of the current macOS account. (%fullUsername%)
  • Icon
    Organization: The company name, if defined by the (Me) contact card in macOS Contacts. (%organization%)
  • Icon
    Email Address: The primary email address, as defined by the (Me) contact card in macOS Contacts. (%emailAddress%)
  • Icon
    Host: The hostname of the machine. (%host%)

Properties: Some files have specific properties, e.g., the author of an email. These are displayed in the Info > Properties inspector. Here are the supported properties and their placeholders, including the raw value.

  • Icon
    Author: The name of the sender of an email. (%kMDItemAuthors%)
  • Icon
    From: The email address of the sender of an email. (%kMDItemAuthorEmailAddresses%)
  • Icon
    Recipient: The name of a recipient of an email. (%kMDItemRecipients%)
  • Icon
    To: The email address of a recipient of an email. (%kMDItemRecipientEmailAddresses%)
  • Icon
    Title: The title of a file. The title may be distinct from its name, e.g., a song title for an MP3 file. (%kMDItemTitle%)
  • Icon
    Comment: The RTF-specific comments for a file. (%kMDItemComment%)
  • Icon
    Headline: A headline applied to some files. Rare. (%kMDItemHeadline%)
  • Icon
    Subject: The subject line from an email. (%kMDItemSubject%)
  • Icon
    Description: The description found on some files, typically images. (%kMDItemDescription%)
  • Icon
    Keywords: Keywords typically applied to PDF, rich text, or images. (%kMDItemKeywords%)
  • Icon
    Organization: The company specified in imported links or vCards from the Contacts application. (%kMDItemOrganizations%)
  • Icon
    Copyright: Copyright information in the metadata of a file. (%kMDItemCopyright%)
  • Icon
    Album: The album information from media metadata, e.g., MP3 files. (%kMDItemAlbum%)
  • Icon
    Composer: The composer information from media metadata, e.g., MP3 files. (%kMDItemComposer%)
  • Icon
    Creator: The process or application used to create a file. (%kMDItemCreator%)
  • Icon
    Producer: The producer of a file, usually applied to media files. (%kMDItemProducer%)
  • Icon
    E-mail: Email addresses detected in a document. (%kMDItemEmailAddresses%)
  • Icon
    Contributor: People or organizations who contributed to the document. (%kMDItemContributors%)
  • Icon
    Publisher: The organization who published the document. (%kMDItemPublishers%)
  • Icon
    Editor: People or organizations involved in editing a document. (%kMDItemEditors%)

Custom Metadata: This menu lists any custom metadata attributes you've defined in the Data settings. In order to use raw placeholders, add the md prefix to the identifier of the custom attribute shown in the settings. For example, mddoi for the Digital Object Identifier attribute.

Smart Action Placeholders

These placeholders are used for automation in smart rules and batch processing.

  • Icon
    User Input: The response returned from a User Input smart action.
  • Icon
    Script Output: The output from the Script with Input/Output smart action. This only supports these classes: string, URL, or number.

Chat Suggestions: These placeholders are specific to smart actions so are only available in smart rules and batch processing. The values for the placeholders come from your AI provider. The AI engine will examine a document and return the value for the placeholder, e.g., the amount on a receipt. Many of these are described above: Title, Filename, Tags, Rating, Authors, Company, Address, Geolocation, and Date. However, there are some specific placeholders for AI:

PRO
  • Icon
    Amount: This may be a monetary value similar to the price but could also be quantities, e.g., from a shipping manifest.
  • Icon
    Price: The monetary value on a document.
  • Icon
    Query Response: Uses the reponse returned from a Chat - Query smart action.
  • Icon
    Suggested Date: Uses an AI-derived date from the contents of the document.
  • Icon
    Summary: Returns a summary of the current document.