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-agentiffai

v0.0.2

Published

Custom n8n nodes for Agentiff.AI workflows - webhook handling, SSE events, LLM gateway, PII redaction, and Gmail API integration

Readme

n8n-nodes-agentiff

Custom n8n community nodes for Agentiff.AI workflows. Reduces boilerplate in webhook-triggered, SSE-streamed, LLM-powered n8n workflows from ~15 nodes to ~5.

Nodes

| Node | Purpose | |------|---------| | Agentiff Webhook | Trigger with auto-extraction of execution_id, api_token, inputs, credentials, and prompts from the standard Agentiff payload | | Agentiff SSE Event | Send real-time progress/status/data/error/complete events to Agentiff clients | | Agentiff LLM | Call the Agentiff LLM Gateway (OpenAI-compatible) with built-in JSON extraction | | Agentiff PII Redact | Detect and redact 15 types of PII (emails, phones, SSNs, API keys, etc.) from text fields | | Agentiff Gmail API | Gmail operations (list, get, send, delete) using injected OAuth access tokens |

Installation

Docker (Recommended)

environment:
  - N8N_COMMUNITY_PACKAGES=n8n-nodes-agentiff

Manual

cd ~/.n8n/nodes
npm install n8n-nodes-agentiff
# Restart n8n

Community Nodes UI

  1. Settings > Community Nodes > Install
  2. Enter: n8n-nodes-agentiff

Credentials

Create an Agentiff.AI API credential with:

  • API Token: Your Agentiff.AI API token
  • Base URL: https://api.agentiff.ai (or staging URL)

Node Documentation

Agentiff Webhook

Webhook trigger that auto-extracts the standard Agentiff payload structure.

Standard payload (sent by the Agentiff platform):

{
  "execution_id": "exec_abc123",
  "api_token": "sk-...",
  "inputs": { "max_results": 10, "query": "invoice" },
  "credentials": { "gmail": { "access_token": "ya29..." } },
  "prompts": { "system": "...", "user": "..." }
}

Output (with Auto-Extract enabled):

{
  "execution_id": "exec_abc123",
  "api_token": "sk-...",
  "max_results": 10,
  "query": "invoice",
  "_agentiff": {
    "execution_id": "exec_abc123",
    "api_token": "sk-...",
    "base_url": "https://api.agentiff.ai",
    "inputs": { "max_results": 10, "query": "invoice" },
    "credentials": { "gmail": { "access_token": "ya29..." } },
    "prompts": { "system": "...", "user": "..." }
  },
  "body": { /* original body */ }
}

The _agentiff context object is automatically consumed by downstream Agentiff nodes (SSE Event, LLM).

Parameters:

  • Path: Webhook URL path
  • Response Mode: onReceived, lastNode, or responseNode
  • Auto-Extract Standard Fields: Extract and flatten standard payload (default: true)
  • Extract Parameters: Additional custom parameters with type conversion and validation

Agentiff SSE Event

Send Server-Sent Events to stream progress updates to Agentiff clients.

Parameters:

  • Execution ID: Auto-reads from _agentiff context or execution_id field
  • Event Type: progress, status, data, error, complete, or custom
  • Event Data: JSON payload

Automatically resolves base_url and api_token from _agentiff context injected by Agentiff Webhook.


Agentiff LLM

Call the Agentiff LLM Gateway (OpenAI-compatible /chat/completions) with built-in response parsing. Replaces the common pattern of HTTP Request + Code node for JSON extraction.

Parameters:

  • API Token Source: From Agentiff Context (default) / From Credentials / Custom Expression
  • Gateway URL: Defaults to credential base URL. Set ={{ $env.LLM_GATEWAY_URL }} for env-based config.
  • Model: gpt-4o-mini, gpt-4o, gpt-4-turbo, gpt-3.5-turbo, Claude 3.5 Sonnet, Claude 3 Haiku, Grok, or Custom
  • System Prompt: Optional system prompt (supports expressions)
  • User Prompt: Required user prompt
  • Response Mode:
    • Text Content: Returns choices[0].message.content as string
    • JSON Extraction (default): Extracts JSON from response with 3-strategy fallback
    • Full Response: Returns complete API response object

JSON extraction strategy (in json mode):

  1. Try full content as JSON
  2. Try to find JSON array [{...}]
  3. Try to find JSON object {...}
  4. Falls back to raw text with json_extracted: false

Output (json mode):

{
  "content": "raw LLM text",
  "parsed": { /* extracted JSON object/array */ },
  "json_extracted": true,
  "model": "gpt-4o-mini",
  "usage": { "prompt_tokens": 150, "completion_tokens": 200 }
}

Options: Temperature (0.3), Max Tokens (2000), Top P, Timeout (60s)


Agentiff PII Redact

Detect and redact personally identifiable information from text fields. Supports 15 PII patterns.

Parameters:

  • Fields to Scan: Comma-separated field names, supports dot notation (e.g., content, user.email, nested.field)
  • PII Types: Multi-select of patterns to detect:

| Type | Redaction | Severity | |------|-----------|----------| | Email Addresses | [EMAIL_REDACTED] | HIGH | | Phone Numbers (US) | [PHONE_REDACTED] | HIGH | | Phone Numbers (Intl) | [PHONE_REDACTED] | HIGH | | Social Security Numbers | [SSN_REDACTED] | CRITICAL | | Credit Card Numbers | [CC_REDACTED] | CRITICAL | | IP Addresses | [IP_REDACTED] | MEDIUM | | API Keys | [API_KEY_REDACTED] | CRITICAL | | AWS Keys | [AWS_KEY_REDACTED] | CRITICAL | | OpenAI Keys | [OPENAI_KEY_REDACTED] | CRITICAL | | Stripe Keys | [STRIPE_KEY_REDACTED] | CRITICAL | | JWT Tokens | [JWT_REDACTED] | HIGH | | Bearer Tokens | [BEARER_REDACTED] | HIGH | | Passwords | [PASSWORD_REDACTED] | CRITICAL | | IBAN Numbers | [IBAN_REDACTED] | HIGH | | Physical Addresses | [ADDRESS_REDACTED] | MEDIUM |

Options:

  • Include Findings Summary: Adds pii_redaction object with counts (default: true)
  • Passthrough Unscanned Fields: Include unscanned fields in output (default: true)

Agentiff Gmail API

Gmail operations using automatically injected OAuth access tokens.

Operations: List Messages, Get Message, Send Message, Delete Message

Access Token Source:

  • From Previous Node: Auto-reads access_token from upstream (e.g., from Agentiff Webhook's _agentiff.credentials)
  • Custom Expression: Provide a custom expression

See INSTALLATION.md for detailed Gmail API setup.

Development

npm install
npm run build     # TypeScript + icons
npm run dev       # Watch mode
npm run lint      # ESLint with n8n rules

Local Testing

npm link
cd ~/.n8n/custom && npm link n8n-nodes-agentiff
# Restart n8n

License

MIT