# OmniFocus Templates with (or without) Relative Dates | Shortcuts Library

> Store templates inside OmniFocus, replacing variables and adjusting relative dates

## What this shortcut does

This shortcut creates new projects or action groups in OmniFocus from templates you keep as projects inside OmniFocus. You can store templates anywhere (for example, in a “Templates” folder). Variables are written as <<VARIABLE>> in task names, notes, tags, or anywhere else; when detected, the shortcut will prompt you for replacements, and if none are found it will not prompt. If your template contains defer or due dates, the shortcut asks for a predicate date, which is a “ground zero” date. All template dates are shifted relative to this date while preserving their spacing, but if you do not want them processed you can accept the default option and the dates remain unchanged; if there are no defer or due dates, no prompt appears. Templates should be built as if the predicate date is January 1, 2045 at 12:00 AM, since this anchor date is reliably recognized by Shortcuts. For example, a task due on the predicate date itself should be set to 01/01/2045, one due a week later should be set to 01/08/2045, and one due three days before should be set to 12/29/2044. When you supply a real predicate date, the shortcut calculates the difference from 01/01/2045 and applies that offset to every date so that relative spacing is preserved. The workflow is: run the shortcut, choose a template project from your OmniFocus list, copy it as TaskPaper when shown in OmniFocus, then return to Shortcuts. The shortcut processes any variables and/or predicate dates, then asks where to insert the new material: Inbox (as an action group), an existing project (as an action group), a folder (as a project), or the top-level Projects folder (as a project). The original template remains unchanged and ready for reuse.

## Compatibility

iPhone, iPad

## Required apps

OmniFocus 4

[View this page](https://shortcutlibrary.app/shortcuts/omnifocus-templates-with-or-without-relative-dates)

[Download Shortcuts Library on the App Store](https://apps.apple.com/app/id6759494377)
