Skip to content

Instantly share code, notes, and snippets.

@webtroter
Last active August 10, 2024 16:13
Show Gist options
  • Save webtroter/8b6a17015265822f50015a277f1b3150 to your computer and use it in GitHub Desktop.
Save webtroter/8b6a17015265822f50015a277f1b3150 to your computer and use it in GitHub Desktop.
Obsidian Tasker Project

Obsidian alt-Sync Tasker Project

Pre-Requisites

  • FolderSync. In a functionnal state, with your accounts and folder-pair. One folder pair per Vault.
    • I'm also filtering OUT workspace-mobile.json and workspace.json
  • Tasker knowledge. This is not a tutorial. This is also probably not the best tasker setup.
  • Obsidian. Each Vault must already be known by Obsidian.

Install

Setup / Configuration

Obsidian

Open your vaults at least once. So they are known to Obsidian.

We use obsidian://open?vault=MyVault to open vaults.

Tasker

Import the project XML, I think.

Tasks 00

  • Copy the task and rename it.
  • Edit the action 1. Variable Set so the variable is set to the name of your Vault.
  • Repeat for each of your vault.

Task "02_Sync Obsidian"

Task 02_Sync Obsidian MUST be updated for each of your vaults.

  • Copy the actions 3. Else If and 4. FolderSync Pro.
  • Adjust the condition on the X. Else If to the name of your vault.
  • Re-Configure the Y. FolderSync Pro to sync your Vault/Folder-Pair.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<TaskerData sr="" dvi="1" tv="6.3.13">
<Profile sr="prof5" ve="2">
<cdate>1700451739418</cdate>
<edate>1704914568042</edate>
<flags>8</flags>
<id>5</id>
<mid1>6</mid1>
<nme>Sync Obsidian</nme>
<App sr="con0" ve="2">
<cls0>md.obsidian.MainActivity</cls0>
<flags>2</flags>
<label0>Obsidian</label0>
<pkg0>md.obsidian</pkg0>
</App>
</Profile>
<Project sr="proj0" ve="2">
<cdate>1700453370133</cdate>
<name>Obsidian</name>
<pids>5</pids>
<tids>21,6,18,23,14,24</tids>
</Project>
<Task sr="task14">
<cdate>1704911165711</cdate>
<edate>1706031170742</edate>
<id>14</id>
<nme>00_Investing</nme>
<pri>7</pri>
<Action sr="act0" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%ObsidianTargetVault</Str>
<Str sr="arg1" ve="3">Investing</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="1"/>
</Action>
<Action sr="act1" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">%ObsidianTargetVault Obsidian Vault</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="1"/>
</Action>
<Action sr="act2" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">Starting flow</Str>
<Str sr="arg10" ve="3"/>
<Str sr="arg11" ve="3">Obsidian Sync Tasks</Str>
<Str sr="arg12" ve="3"/>
<Img sr="arg2" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<Int sr="arg8" val="0"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act3" ve="7">
<code>130</code>
<se>false</se>
<Str sr="arg0" ve="3">01_Main</Str>
<Int sr="arg1">
<var>%priority</var>
</Int>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">%ObsidianTargetVault</Str>
<Int sr="arg8" val="0"/>
<Int sr="arg9" val="1"/>
</Action>
<Img sr="icn" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
</Task>
<Task sr="task18">
<cdate>1704911165711</cdate>
<edate>1721255153674</edate>
<id>18</id>
<nme>02_Open Target Vault</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">Starting Opening Obsidian</Str>
<Str sr="arg10" ve="3"/>
<Str sr="arg11" ve="3">Obsidian Sync Tasks</Str>
<Str sr="arg12" ve="3"/>
<Img sr="arg2" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<Int sr="arg8" val="0"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act1" ve="7">
<code>547</code>
<label>Set URL Variable</label>
<Str sr="arg0" ve="3">%ObsidianOpenURL</Str>
<Str sr="arg1" ve="3">obsidian://open?vault=%ObsidianTargetVault</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="1"/>
</Action>
<Action sr="act2" ve="7">
<code>104</code>
<Str sr="arg0" ve="3">%ObsidianOpenURL</Str>
<App sr="arg1">
<appClass>md.obsidian.MainActivity</appClass>
<appPkg>md.obsidian</appPkg>
<label>Obsidian</label>
</App>
<Int sr="arg2" val="0"/>
<Str sr="arg3" ve="3"/>
</Action>
<Action sr="act3" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%err</lhs>
<op>13</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="5"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act5" ve="7">
<code>779</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act6" ve="7">
<code>43</code>
</Action>
<Action sr="act7" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">Error opening URL</Str>
<Str sr="arg10" ve="3"/>
<Str sr="arg11" ve="3">Obsidian Sync Tasks</Str>
<Str sr="arg12" ve="3"/>
<Img sr="arg2" ve="2"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<Int sr="arg8" val="0"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act8" ve="7">
<code>38</code>
</Action>
<Img sr="icn" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
</Task>
<Task sr="task21">
<cdate>1704911165711</cdate>
<edate>1723248787020</edate>
<id>21</id>
<nme>01_Main</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>130</code>
<se>false</se>
<Str sr="arg0" ve="3">02_Sync Obsidian</Str>
<Int sr="arg1">
<var>%priority</var>
</Int>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">%ObsidianTargetVault</Str>
<Int sr="arg8" val="0"/>
<Int sr="arg9" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>37</code>
<label>If Error</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%err</lhs>
<op>12</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act2" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">Sync Error</Str>
<Str sr="arg10" ve="3"/>
<Str sr="arg11" ve="3">Obsidian Sync Tasks</Str>
<Str sr="arg12" ve="3"/>
<Img sr="arg2" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="1"/>
<Int sr="arg5" val="4"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<Int sr="arg8" val="0"/>
<Str sr="arg9" ve="3"/>
<ListElementItem sr="item0">
<label>Open Obsidian Anyway</label>
<Action sr="action" ve="7">
<code>130</code>
<Str sr="arg0" ve="3">02_Open Target Vault</Str>
<Int sr="arg1">
<var>%priority</var>
</Int>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">%ObsidianTargetVault</Str>
<Int sr="arg8" val="0"/>
<Int sr="arg9" val="1"/>
</Action>
<Img sr="icon" ve="2">
<nme>mw_communication_call_missed_outgoing</nme>
</Img>
</ListElementItem>
</Action>
<Action sr="act3" ve="7">
<code>43</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%err</lhs>
<op>13</op>
<rhs></rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">Sync successful</Str>
<Str sr="arg10" ve="3"/>
<Str sr="arg11" ve="3">Obsidian Sync Tasks</Str>
<Str sr="arg12" ve="3"/>
<Img sr="arg2" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="1"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<Int sr="arg8" val="0"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act5" ve="7">
<code>130</code>
<Str sr="arg0" ve="3">02_Open Target Vault</Str>
<Int sr="arg1">
<var>%priority</var>
</Int>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">%ObsidianTargetVault</Str>
<Int sr="arg8" val="0"/>
<Int sr="arg9" val="1"/>
</Action>
<Action sr="act6" ve="7">
<code>38</code>
</Action>
</Task>
<Task sr="task23">
<cdate>1704911165711</cdate>
<edate>1723248780752</edate>
<id>23</id>
<nme>00_MyVault</nme>
<pri>7</pri>
<Action sr="act0" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%ObsidianTargetVault</Str>
<Str sr="arg1" ve="3">MyVault</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="1"/>
</Action>
<Action sr="act1" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">%ObsidianTargetVault Obsidian Vault</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="1"/>
</Action>
<Action sr="act2" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">Starting flow</Str>
<Str sr="arg10" ve="3"/>
<Str sr="arg11" ve="3">Obsidian Sync Tasks</Str>
<Str sr="arg12" ve="3"/>
<Img sr="arg2" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<Int sr="arg8" val="0"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act3" ve="7">
<code>130</code>
<se>false</se>
<Str sr="arg0" ve="3">01_Main</Str>
<Int sr="arg1">
<var>%priority</var>
</Int>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">%ObsidianTargetVault</Str>
<Int sr="arg8" val="0"/>
<Int sr="arg9" val="1"/>
</Action>
<Img sr="icn" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
</Task>
<Task sr="task24">
<cdate>1704911165711</cdate>
<edate>1723248783816</edate>
<id>24</id>
<nme>00_Grocy</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%ObsidianTargetVault</Str>
<Str sr="arg1" ve="3">Grocy</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="1"/>
</Action>
<Action sr="act1" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">%ObsidianTargetVault Obsidian Vault</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="1"/>
</Action>
<Action sr="act2" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">Starting flow</Str>
<Str sr="arg10" ve="3"/>
<Str sr="arg11" ve="3">Obsidian Sync Tasks</Str>
<Str sr="arg12" ve="3"/>
<Img sr="arg2" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<Int sr="arg8" val="0"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act3" ve="7">
<code>130</code>
<se>false</se>
<Str sr="arg0" ve="3">01_Main</Str>
<Int sr="arg1">
<var>%priority</var>
</Int>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">%ObsidianTargetVault</Str>
<Int sr="arg8" val="0"/>
<Int sr="arg9" val="1"/>
</Action>
<Img sr="icn" ve="2">
<cls>md.obsidian.MainActivity</cls>
<pkg>md.obsidian</pkg>
</Img>
</Task>
<Task sr="task6">
<cdate>1700451751118</cdate>
<edate>1706030923117</edate>
<id>6</id>
<nme>02_Sync Obsidian</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>37</code>
<label>Error</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ObsidianTargetVault</lhs>
<op>13</op>
<rhs>MyVault</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act1" ve="7">
<code>523</code>
<Str sr="arg0" ve="3">%NotifyObsidianTitle</Str>
<Str sr="arg1" ve="3">Error Sync Task</Str>
<Str sr="arg10" ve="3"/>
<Str sr="arg11" ve="3">Obsidian Sync Tasks</Str>
<Str sr="arg12" ve="3"/>
<Img sr="arg2" ve="2"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<Int sr="arg8" val="0"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act2" ve="7">
<code>43</code>
<label>Grocy</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ObsidianTargetVault</lhs>
<op>0</op>
<rhs>Grocy</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act3" ve="7">
<code>1911640985</code>
<se>false</se>
<Bundle sr="arg0">
<Vals sr="val">
<com.twofortyfouram.locale.intent.extra.BLURB>Grocy Vault Obsidian;;;SYNC;;;1;;;13</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<com.yourcompany.yourapp.extra.STRING_MESSAGE>Grocy Vault Obsidian;;;SYNC;;;1;;;13</com.yourcompany.yourapp.extra.STRING_MESSAGE>
<com.yourcompany.yourapp.extra.STRING_MESSAGE-type>java.lang.String</com.yourcompany.yourapp.extra.STRING_MESSAGE-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">dk.tacit.android.foldersync.full</Str>
<Str sr="arg2" ve="3">dk.tacit.android.foldersync.locale.ui.EditActivity</Str>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="1"/>
</Action>
<Action sr="act4" ve="7">
<code>43</code>
<label>Grocy</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ObsidianTargetVault</lhs>
<op>0</op>
<rhs>Investing</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act5" ve="7">
<code>1911640985</code>
<se>false</se>
<Bundle sr="arg0">
<Vals sr="val">
<com.twofortyfouram.locale.intent.extra.BLURB>Investing Vault Obsidian;;;SYNC;;;1;;;14</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<com.yourcompany.yourapp.extra.STRING_MESSAGE>Investing Vault Obsidian;;;SYNC;;;1;;;14</com.yourcompany.yourapp.extra.STRING_MESSAGE>
<com.yourcompany.yourapp.extra.STRING_MESSAGE-type>java.lang.String</com.yourcompany.yourapp.extra.STRING_MESSAGE-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">dk.tacit.android.foldersync.full</Str>
<Str sr="arg2" ve="3">dk.tacit.android.foldersync.locale.ui.EditActivity</Str>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="1"/>
</Action>
<Action sr="act6" ve="7">
<code>43</code>
<label>MyVault</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%ObsidianTargetVault</lhs>
<op>0</op>
<rhs>MyVault</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act7" ve="7">
<code>1911640985</code>
<se>false</se>
<Bundle sr="arg0">
<Vals sr="val">
<com.twofortyfouram.locale.intent.extra.BLURB>MyVault Obsidian;;;SYNC;;;1;;;9</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<com.yourcompany.yourapp.extra.STRING_MESSAGE>MyVault Obsidian;;;SYNC;;;1;;;9</com.yourcompany.yourapp.extra.STRING_MESSAGE>
<com.yourcompany.yourapp.extra.STRING_MESSAGE-type>java.lang.String</com.yourcompany.yourapp.extra.STRING_MESSAGE-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">dk.tacit.android.foldersync.full</Str>
<Str sr="arg2" ve="3">dk.tacit.android.foldersync.locale.ui.EditActivity</Str>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="1"/>
</Action>
<Action sr="act8" ve="7">
<code>38</code>
</Action>
<Img sr="icn" ve="2">
<cls>dk.tacit.android.foldersync.activity.MainActivity</cls>
<pkg>dk.tacit.android.foldersync.full</pkg>
</Img>
</Task>
</TaskerData>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment