Skip to content

Vault Sync Systems — Obsidian KB Automation

Created 2026-04-05
Updated 2026-04-05
Status partially-live
Tags websiteinfrastructureobsidianautomationvault-sync

Documentation of the automated pipelines that push data from the Baseworks websites into the Obsidian knowledge base vault. These systems run without manual intervention and keep KB content current.


The general pattern for all vault sync systems:

  1. WordPress plugin (mu-plugin) — installed on the relevant site, exposes a WP-CLI command that reads Formidable Forms entries and generates Obsidian-compatible markdown files
  2. Shell script on the VPS — runs on a cron schedule, SSHes to the web server, executes the WP-CLI command, rsyncs the output to the vault, commits and pushes to GitHub if anything changed
  3. Vault — receives the files automatically; all machines pull the latest on session start

All vault paths are relative to the knowledge base root (/srv/baseworks/knowledge-base/ on the VPS, ~/Obsidian/baseworks-kb-shared-brain/ on local machines).


System 1 — Event Participation Questionnaire Sync

Section titled “System 1 — Event Participation Questionnaire Sync”

Status: Live

Exports participant questionnaire responses from Formidable Forms into structured markdown files in the vault, one file per respondent.

ComponentLocationDetails
mu-pluginbaseworks.comwp-content/mu-plugins/bw-questionnaire-export-cli.php — also in changelog repo at sites/baseworks.com/mu-plugins/bw-questionnaire-export-cli.php
Formidable formbaseworks.com — Form ID 40Event Participation Questionnaire — 17 fields covering physical background, goals, conditions
Profile tabpractice.baseworks.com — Form ID 74bw-profile-background-tab.php renders the questionnaire at /members/me/background/
Vault output path02-areas/method-admin/audience/event-participants/One .md file per respondent, named firstname-lastname-YYMMDD.md
VPS cron script/home/patrick/scripts/questionnaire-export.shLog: /home/patrick/scripts/questionnaire-export.log
ScheduleEvery 4 hours (6× daily)Cron: 0 4,8,12,16,20,0 * * *
Terminal window
wp bw-export questionnaire # normal run (skips unchanged entries)
wp bw-export questionnaire --dry-run # preview without writing
wp bw-export questionnaire --force # overwrite all existing files
wp bw-export questionnaire --entry-user=<id> # single user
---
type: event-participant
respondent: Full Name
event: Spring 2026 Study Group Montreal
date: YYYY-MM-DD
sex:
age:
athletic-level:
athletic-level-label:
occupation-interests:
active-in:
backgrounds:
mindfulness-practices:
reported-issues:
conditions:
utm-source:
---
  • Each participant file links back to their study group entry
  • The index.md in event-participants/ is updated automatically when new entries are added
  • Used by Claude when drafting participant-facing communications or generating session context
  • Admin exclusion on the questionnaire prompt banner (bw-questionnaire-prompt.php) is currently disabled for testing — needs to be re-enabled before next cohort
  • [bw_dashboard_teaser] shortcode placement on the practice.baseworks.com dashboard is pending (Patrick’s task)

Status: Not yet built — manual CSV import only

See Segment Feedback Automation Plan for the development plan.

Segment feedback is imported manually via CSV export from Formidable Forms and a Python script. Instructions: CSV Import Instructions.

Vault path: 02-areas/method-admin/audience/segment-feedback/


System 3 — Forum Content Sync (BuddyBoss → Vault)

Section titled “System 3 — Forum Content Sync (BuddyBoss → Vault)”

Status: Live (deployed 2026-04-07)

Pulls forums, topics (with inline replies), groups, and activity feed posts from practice.baseworks.com via BuddyBoss REST API and writes them as structured markdown into the vault.

Direct HTTP API calls to practice.baseworks.com are blocked by Cloudflare bot challenge from the VPS. This system works around that by SSHing to baseworks-web and using wp eval to dispatch REST requests internally via PHP — no external HTTP calls needed.

ComponentLocationDetails
Python sync script/home/patrick/scripts/forum-content-sync.pyAlso in vault at scripts/forum-content-sync.py
Shell wrapper/home/patrick/scripts/forum-content-sync.shLockfile, git pull, run Python, git commit/push
ScheduleEvery 2 hours at :30Cron: 30 1,3,5,7,9,11,13,15,17,19,21,23 * * *
Log/home/patrick/scripts/forum-content-sync.log
Vault output paths02-areas/practice-platform/community-forums-groups/forums/, topics/, groups/, activity/ subdirectories
State file_sync-state.json (gitignored)Tracks last-sync timestamps per content type
API authApplication Password for user patrick (ID 8)Name: vault-forum-sync
EndpointPurpose
/buddyboss/v1/forumsForum entities
/buddyboss/v1/topicsDiscussion topics
/buddyboss/v1/replyReplies (fetched per-topic, inline in topic files)
/buddyboss/v1/groupsGroup metadata
/buddyboss/v1/activityActivity feed posts (monthly digests)
  • Topics: Compares reply-count in frontmatter vs API — only re-fetches topics with new replies
  • Forums/Groups: Full fetch every run (few entities), writes only if content hash changed
  • Activity: Fetches all, filters content-bearing types client-side, generates monthly digests

5 groups, 5 forums (one per group), 32 topics, 28 replies, 7 activity items

See Forum Content Ingestion Plan for frontmatter schemas, body formats, and future phases.