
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
n8n-nodes-zai
Advanced tools
n8n community node for Z.ai API — AI chat completions with GLM language models, streaming support, built-in web search, and image generation with CogView-4 and GLM-Image
n8n community node for integrating Z.ai (GLM) models into your workflows. Provides AI chat completions with streaming support and image generation using GLM-Image and CogView-4 models.
n8n is a fair-code licensed workflow automation platform.
| Node | Description |
|---|---|
| Z.ai Chat | AI chat completions with GLM language models (streaming, web search, safety settings) |
| Z.ai Image | Generate images from text prompts using GLM-Image and CogView-4 models |
Both nodes share the same Zai API credential.
npm install n8n-nodes-zai
n8n-nodes-zaiOr follow the installation guide in the n8n documentation.
To use these nodes, you need a Z.ai API key:
Note: The Z.ai API provides free tiers for Flash models, making it easy to get started without costs.
AI chat completions using Z.ai's GLM language models. Designed to work with n8n's AI Agent and Basic LLM Chain nodes.
Model: Select which GLM model to use (default: GLM-4.7)
Built-in Tools:
Options:
Generate images from text prompts using Z.ai's image generation models.
Model: Select which image model to use (default: GLM-Image)
Prompt: Text description of the image to generate (required)
Size: Resolution presets differ per model:
| GLM-Image | CogView-4 |
|---|---|
| 1280 x 1280 (default) | 1024 x 1024 (default) |
| 1568 x 1056 | 768 x 1344 |
| 1056 x 1568 | 864 x 1152 |
| 1472 x 1088 | 1344 x 768 |
| 1088 x 1472 | 1152 x 864 |
| 1728 x 960 | 1440 x 720 |
| 960 x 1728 | 720 x 1440 |
| Custom | Custom |
Custom Dimensions:
Options:
Each generated image is returned as binary data (viewable in n8n) with the following metadata:
| Field | Description |
|---|---|
model | Model used for generation |
prompt | Text prompt submitted |
size | Image resolution |
created | Unix timestamp of creation |
url | Temporary image URL (expires after 30 days) |
contentFilter | Content safety information |
fileName | Output file name |
Connect the Z.ai Chat Model node to an AI Agent or Basic LLM Chain in n8n. Select a model, configure options, and let the agent handle conversations.
Use GLM-4.5-Flash or GLM-4.7-Flash for free AI-powered text generation.
Use CodeGeeX, GLM-4.7, or GLM-5-Code for code generation, debugging, and explanation.
Enable the Web Search built-in tool on the Chat Model node to give the model access to current information. Configure search context size and restrict to specific domains.
Use the Z.ai Image node with a text prompt to generate images. Output is binary data that can be passed to downstream nodes for saving, emailing, or further processing.
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any issues or have questions:
Ali Shan (aliishann806@gmail.com)
FAQs
n8n community node for Z.ai API — AI chat completions with GLM language models, streaming support, built-in web search, and image generation with CogView-4 and GLM-Image
The npm package n8n-nodes-zai receives a total of 60 weekly downloads. As such, n8n-nodes-zai popularity was classified as not popular.
We found that n8n-nodes-zai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.