forge-cms

n8n node for creating blog posts via ForgeCMS API

Package Information

Downloads: 1 weekly / 12 monthly
Latest Version: 1.0.0
Author: kefa mgaya

Documentation

n8n ForgeCMS Node

A custom n8n node for creating blog posts via ForgeCMS API. This node allows you to programmatically create blog posts on your portfolio site using n8n workflows.

Features

  • Create blog posts with all standard fields (title, slug, content, etc.)
  • Support for optional fields (excerpt, cover image, tags, category, SEO metadata)
  • Bearer token authentication
  • Full TypeScript support

Installation

Local Development

  1. Install dependencies:

    npm install
    
  2. Build the node:

    npm run build
    
  3. Link the node to your local n8n installation:

    # In this directory
    npm link
    
    # In your n8n installation's nodes directory
    npm link n8n-nodes-forge-cms
    
  4. Restart n8n to load the new node.

Install from npm

  1. In n8n:

    • Go to SettingsCommunity Nodes
    • Click Install a community node
    • Enter: n8n-nodes-forge-cms
    • Click Install
  2. Or via command line (for self-hosted):

    npm install n8n-nodes-forge-cms
    

Publishing to npm

To publish this node to npm for others to use:

  1. Update package.json with your author information and repository URL

  2. Build the node:

    npm run build
    
  3. Login to npm:

    npm login
    
  4. Publish:

    npm publish
    
  5. Verify:

    npm view n8n-nodes-forge-cms
    

See DEPLOYMENT.md for detailed deployment instructions.

Configuration

Credentials

Before using the node, you need to set up credentials:

  1. API URL: The full URL to your blog API endpoint (e.g., https://your-domain.com/api/blogs/n8n)
  2. Secret Key: Your Bearer token secret key (must match N8N_WEBHOOK_SECRET or CRON_SECRET environment variable)

Node Fields

Required Fields

  • Title: The title of the blog post
  • Slug: Unique URL slug (must be unique)
  • Content: Main content (Markdown/HTML)

Optional Fields

  • Excerpt: Short summary for previews
  • Cover Image URL: URL to featured image
  • Published: Boolean to publish immediately (defaults to false)
  • Tags: Array of tags (e.g., ["Next.js", "Tutorial"])
  • Category: Category name (e.g., "Development")
  • Meta Title: SEO title
  • Meta Description: SEO description
  • Author Email: Email of existing user to attribute post to

Usage Example

  1. Add the ForgeCMS node to your workflow
  2. Configure credentials (API URL and Secret Key)
  3. Fill in the required fields (Title, Slug, Content)
  4. Optionally add excerpt, cover image, tags, category, etc.
  5. Set Published to true if you want to publish immediately
  6. Execute the workflow

API Endpoint Requirements

The node expects your API endpoint to:

  • Accept POST requests
  • Use Bearer token authentication
  • Accept JSON payload matching the Prisma Blog model
  • Return appropriate error codes (401, 400, 409, 500)

See base.md for full API documentation.

Error Handling

The node handles the following error responses:

  • 401 Unauthorized: Missing or incorrect Authorization header
  • 409 Conflict: Blog with provided slug already exists
  • 400 Bad Request: Validation failed (missing required fields, invalid types)
  • 500 Internal Server Error: Database or server error

Development

# Build
npm run build

# Watch mode
npm run dev

# Lint
npm run lint

# Format
npm run format

License

MIT

Discussion