Quickstart
This guide will help you get started with the n8n Substack node quickly.
For n8n Users
Prerequisites
- n8n instance (self-hosted or cloud)
- Substack account with API access
- Substack API key
Installation
n8n Cloud
- Go to Settings > Community Nodes
- Click Install a community node
- Enter
n8n-nodes-substack - Click Install
Self-hosted n8n
npm install n8n-nodes-substack
Then restart your n8n instance.
Credential Setup
- Add the Substack node to your workflow
- Create new credentials with:
- Publication Address: Your Substack domain (e.g.,
myblog.substack.com) - API Key: Your Substack API key
Basic Usage
Create a Note
- Add Substack node to workflow
- Select Note as resource
- Select Create as operation
- Fill in Title and Body
- Execute the workflow
Retrieve Posts
- Add Substack node to workflow
- Select Post as resource
- Select Get Many as operation
- Optionally set Limit and Offset for pagination
- Execute the workflow
Example Workflows
Simple Note Creation:
{
"nodes": [
{
"name": "Create Note",
"type": "n8n-nodes-substack.substack",
"parameters": {
"resource": "note",
"operation": "create",
"title": "Hello World",
"body": "My first automated note!"
}
}
]
}
Get Recent Posts:
{
"nodes": [
{
"name": "Get Posts",
"type": "n8n-nodes-substack.substack",
"parameters": {
"resource": "post",
"operation": "getAll",
"limit": 10
}
}
]
}
For Developers Using the API Library
Note: The following section is for developers who want to use the underlying substack-api library directly in their own applications or Function nodes.
Installation
npm install substack-api
Basic Setup
import { Substack } from 'substack-api';
const client = new Substack({
hostname: 'example.substack.com',
apiKey: process.env.SUBSTACK_API_KEY!
});
Quick Examples
// Get posts
const posts = await client.getPosts({ limit: 10 });
// Publish a note
const response = await client.publishNote('Hello from the API!');
// Search posts
const results = await client.searchPosts({
query: 'typescript',
limit: 5
});