npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-content-agent

v0.4.0

Published

n8n Community Node for publishing reviewed articles through a local Content Agent API

Downloads

49

Readme

n8n-nodes-content-agent

This n8n Community Node sends reviewed article content to a self-hosted Content Agent API. n8n owns the source, translation, LLM editing, review, and schedule. The Python service owns Toutiao login state, SQLite idempotency, immutable revisions, Doocs rendering, image placement, browser publishing, and result verification.

Install in self-hosted n8n

Before an npm registry release, build a local tarball:

cd n8n-nodes-content-agent
npm install
npm test
npm pack

Install n8n-nodes-content-agent-0.4.0.tgz inside the same image or persistent nodes directory used by the n8n main and worker processes. A custom image can use this pattern, with the n8n version pinned to the version already deployed:

FROM n8nio/n8n:<PINNED_VERSION>
USER root
COPY n8n-nodes-content-agent-0.4.0.tgz /tmp/
RUN mkdir -p /home/node/.n8n/nodes \
 && cd /home/node/.n8n/nodes \
 && npm init -y \
 && npm install /tmp/n8n-nodes-content-agent-0.4.0.tgz \
 && chown -R node:node /home/node/.n8n
USER node

Restart every n8n main/worker process after installation. Once the package is published to npm, it can instead be installed by package name from n8n's Community Nodes settings.

Start Content Agent API

On the machine that owns the persistent Chromium profile:

export CONTENT_AGENT_API_TOKEN="$(openssl rand -hex 32)"
content-agent --config /absolute/path/config.publish.yaml serve \
  --host 127.0.0.1 --port 8766

Store the token in the service environment for permanent use. When n8n runs on another machine, listen on a private interface reachable from n8n and restrict the firewall to the n8n source. Do not publish this API directly on the Internet. For n8n.72602.space, 127.0.0.1 refers to the n8n container, not the current Content Agent host; use a private 72602-to-publisher route or deploy Content Agent and its persistent profile beside n8n.

The API exposes authenticated GET /health and POST /v1/toutiao/publish. Images are base64 in transit, decoded into private temporary files by Python, copied into Content Agent artifacts, and deleted after each request.

Configure n8n

Create a Content Agent API credential:

  • Base URL: the private URL visible from the n8n process, for example http://content-agent.internal:8766.
  • Access Token: the exact value of CONTENT_AGENT_API_TOKEN.
  • Command Timeout: normally 900 seconds.

Add a Toutiao Publisher node after the review step. Supply:

  • Request ID: unique execution/item identifier for tracing.
  • Idempotency Key: stable for one reviewed revision; never use a timestamp.
  • External Revision ID: the upstream review revision.
  • Title: final reviewed title containing 2-30 characters.
  • Body Markdown: use {{image:cover}} for named placement.
  • Images: map each image ID to an incoming n8n binary property.
  • Metadata JSON: optional flat object whose values are strings.

Run Prepare Only first. It validates the complete request and creates an approved immutable artifact without opening Chromium. After inspecting the result, switch the node to Publish. Output is the original item JSON plus a contentAgent object containing status, revision, published URL, idempotent replay information, or a stable error code.

Do not run the legacy Content Agent scheduler at the same time. n8n is the scheduler owner for this integration; the Python project lock rejects an overlapping publish.

Import examples/prepare-only.json for a small workflow that creates a test item and a PNG binary property before calling this node.