Automation Support for Notion, Obsidian, and Heptabase
Notion: Mature API Ecosystem
Notion exposes REST endpoints for creating and modifying pages:
POST https://api.notion.com/v1/pages- Create new page entries in specified databasesPATCH https://api.notion.com/v1/blocks/{block_id}/children- Append content blocks to existing pages
Access requires creating an Integration, obtaining an OAuth Token or internal integration secret, and granting content insertion permissions on target pages or databases. Requests without proper permissions return HTTP 403 errors.
Markdown to Block Structure Conversion
Notion's API accepts JSON-formatted block structures, not raw Markdown. Markdown content must be parsed into Notion's block representation before writing via API.
Using the Notion Python SDK to create a database page with text content:
notion.pages.create(**{
"parent": {"database_id": DATABASE_ID},
"properties": {
"title": {"title": [{"type": "text", "text": {"content": title}}]},
"Tags": {"type": "multi_select", "multi_select": [{"name": tag}]},
"Created": {"date": {"start": date}}
},
"children": [
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [{"type": "text", "text": {"content": content}}]
}
}
]
})
The parent field specifies the target database ID, properties sets page attributes (title, tags, date), and children contains note content. Notion enforces a 100-block limit per request, requiring segmentation for longer articles.
Third-Party Integration Tools
Community-developed tools wrap Notion's API for AI automation:
Auto-GPT Plugin provides autonomous agents with commands to create, append, and query Notion pages/databases. Configuration requires providing integration tokens and database IDs in environment settings. Once enabled, agents automatically save search results or generated notes to specified databases.
Claude MCP Integration (e.g., Notion MCP Server) acts as a bridge between Claude and Notion. After providing API tokens, registering MCP as a tool in Claude Code or Claude Desktop allows Claude to execute instructions like "create a new Notion database entry" or "update page content." The underlying operations still call Notion APIs.
Obsidian: Local Automation Through Plugins
Obsidian provides no official cloud APIs. The Obsidian Sync service offers no public interfaces. Automation relies on local plugins and scripts.
Direct File System Writing
Obsidian stores notes as Markdown (.md) files in local Vault folders. The simplest approach: directly create or modify .md files on the file system.
# Example: Python script directly writing Obsidian notes
vault_path = "/path/to/obsidian/vault"
note_path = os.path.join(vault_path, f"{note_title}.md")
with open(note_path, 'w', encoding='utf-8') as f:
f.write(f"# {note_title}\n\n{content}")
When Obsidian monitors the Vault, newly added or modified .md files load in real-time. This method requires no plugin or integration, only disk write permissions.
Advanced URI Plugin
Obsidian's native obsidian:// protocol supports basic operations. The community-developed Advanced URI plugin extends this protocol to handle rich operations via URL calls:
# Example URI for creating or updating notes
obsidian://advanced-uri?vault=MyVault&filepath=new-note.md&content=...&mode=append
Advanced URI converts URL parameters into Obsidian file operations. Requires the Vault to be open and the plugin installed.
Local REST API Plugin
For broader automation, the Obsidian Local REST API plugin starts a local HTTPS server (default ports 27123/27124) with REST endpoints:
# Create new note
POST https://localhost:27123/notes/new-note-path
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"content": "# Title\n\nNote content..."
}
The plugin supports executing commands, creating journals, and other operations, turning Obsidian into a programmable platform. Standard HTTP interfaces make it suitable for integration with programming languages and AI agents.
AI Integration Tools
Auto-GPT Obsidian Plugin allows Auto-GPT agents to read Vault structure and content, then create or modify notes programmatically (using the obsidiantools library). Features include auto-generating knowledge cards, completing metadata, and creating memory cards.
Claude MCP Integration wraps Obsidian's local REST API (e.g., MCP Obsidian Server). Current implementations focus on reading and analysis—searching note content, reading full text, browsing file structures. Since the underlying REST API also supports write operations, Claude agents could theoretically create or update notes through appropriate tool instructions.
Heptabase: Import-Based Workflows
Heptabase provides no public API. According to an August 2024 AMA, the team plans API support eventually but not until at least 2025. Current strategy implements case-by-case integrations with other applications before releasing general APIs.
Markdown Import
Heptabase accepts Markdown file imports from Obsidian, Notion, Roam Research, and Logseq. Each .md file converts to a card within Heptabase, preserving text formatting, links, and tags. Wiki links convert to Heptabase's link syntax.
Import workflow:
- Package an Obsidian vault as .zip and select it via Heptabase's Import function (bottom left), specifying "Obsidian"
- Or select individual .md files directly in the application
Heptabase syncs data to cloud and maintains local backups, with export support for Markdown and PDF. These are manual import/export operations for migration and backup, not programmable update pipelines.
GUI Script Simulation
Without APIs, only unconventional workarounds exist. Community users share AppleScript + Raycast scripts that simulate user input to append logs to Heptabase's today page:
# AppleScript example: Adding logs to Heptabase
tell application "Heptabase"
activate
key code 36 # Enter key
type text "## " & (current date as string) & "\n\n"
type text "New log content..."
end tell
These scripts call Heptabase application windows via AppleScript and insert strings at the end of cards, triggering template expansion for timestamped entries. This approach works for specific, narrow use cases but requires scripts tuned to Heptabase's client interface and breaks when interfaces change.
Bridged Workflows
Maintain content sync through an intermediate platform:
- Use Obsidian plugins to auto-generate notes
- Export as Markdown on a schedule
- Import into Heptabase
This achieves batch updates only, not fine-grained real-time synchronization.
Platform Comparison
| Platform | Automation Method | Setup Requirements | Content Format |
|---|---|---|---|
| Notion | Official REST API Third-party SDKs and scripts |
API token Content insertion permissions |
Database entries Rich text, properties Markdown → block conversion required |
| Obsidian | Local plugins Direct file system writes Advanced URI plugin Local REST API |
Local Vault running Plugin installation and configuration REST API key setup |
Markdown files Wiki links YAML metadata |
| Heptabase | Manual Markdown import GUI script simulation (limited) |
Import: manual operation Scripts: desktop simulation |
Card-based notes Markdown import support Links and tags preserved during conversion |
Implementation Approach
For Notion: Use the official SDK combined with Claude MCP. Create an integration token, set up MCP server configuration, register as a tool in Claude Code, then test automatic content creation.
For Obsidian: Install the Local REST API plugin, set API keys and ports, then configure agent interface calls. File system direct writes serve as a fallback. Both approaches support Markdown content writing.
For Heptabase: Generate content in Obsidian or Notion first, export to Markdown periodically, then batch-import into Heptabase. Use GUI scripts only for narrow, specific tasks.
Result
Notion's official API and integration ecosystem enable straightforward automation for AI agents. Obsidian's community plugins provide local automation options; setup work is required, but once complete, integration with AI workflows is practical. Heptabase lacks automation tooling; users must wait for official API support or adopt indirect workflows for partial automation.
Choose Notion or Obsidian for automation-heavy workflows. Select the path that matches your infrastructure and data residency needs.