Put Obsidian link in task description and use Obsidian metadata

Add a description to tasks

You can add dynamic descriptions to the tasks that are created in Todoist.

In the sync commands, you can configure the description:

Screenshot of Obsidian

Whatever you put there will be used as description for the Todoist tasks. You probably don’t want to have a fixed text here. The most common use-case is to put a link to the corresponding Obsidian document.

To achieve this, enter the following text as Constant Text:

obsidian://open?vault={{ vaultName | url_encode }}&file={{ filePath | url_encode}}

Screenshot of Obsidian

Why does this work? Whatever you use as description will be interpreted as liquid template. There, you can access some information about the document where the tasks come from. See the next section for more information about this.

Use the document’s metadata

These are the variables available in the description template:

  • fileBaseName: The name of the file, without extension. E.g. My to-dos
  • filePath: The path of the file within your vault. E.g. taskbone\My to-dos.md
  • vaultName: The name of your vault. E.g. TestAndDemoVault
  • metadata: Some metadata about the document. Most relevant:
    • metadata.frontmatter: The parsed frontmatter of the document

Using these examples, the format string from above will result in


This is the URL to open the document in Obsidian.

Let’s try another example:

Imported from [Obsidian](obsidian://open?vault={{ vaultName | url_encode }}&file={{ filePath | url_encode}}) at {{ "now" | date: "%Y-%m-%d %H:%M" }}.

Some more things:
{% for property in metadata.frontmatter -%}
{% if property[0] != "position" %}
* {{ property[0] }}: {{ property[1] | json }}
{%- endif -%}
{% endfor %}

If I use this as description and run the command on the following document

Screenshot of Obsidian

The following Todoist task gets created:

Screenshot of Todoist

So, that’s cool.

But… if the frontmatter says project: An important project then why would you want the task in your inbox?

Dynamic project names

The projectName input in the command configuration now supports liquid templates with the same information about the document. If - for example - you always specify the project in the frontmatter of a document, you could use the following Constant Text as projectName:

{{ metadata.frontmatter.project }}

Now, if you have a project-parameter in the frontmatter of your document, this will be used as project for the task.

Screenshot of Todoist

Some other ideas that may work for you:

  • The document title: {{ fileBaseName }}
  • The vault name: {{ vaultName }}
  • The name of the base folder: {{ filePath | split: "/" | first }}

These are just some examples of what you can do. If you have any questions or remarks, get in touch.