Action

Send to Obsidian

Posted by agiletortoise, Last update 20 days ago

Add the current draft to the root folder of an Obsidian vault as a new file, using the first line of the draft as the file name.

By default, this action will send to a vault named “Obsidian”. To change the vault used, edit the template of the first “Define Template Tag” step in the action to be the name of a valid vault in your Obsidian installation.

To target different vaults, duplicate the action and change the vault name in the first action step.

This example utilizes Obsidian’s URL scheme support. More details on available options in their documentation.

Note that Drafts can also write to files using files action, if you wish to implement actions which write directly to a file in a folder used as an Obsidian vault.

Steps

  • defineTemplateTag

    name
    vaultName
    template
    Obsidian
  • defineTemplateTag

    name
    fileName
    template
    [[safe_title]]
  • defineTemplateTag

    name
    content
    template
    [[draft]]
  • url

    template
    obsidian://new?vault=[[vaultName]]&name=[[fileName]]&content=[[content]]
    useSafari
    false
    encodeTags
    true

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.