Templates / Control AI agent tool access with Port RBAC and Slack mentions

Control AI agent tool access with Port RBAC and Slack mentions

Needs changes

by Port IO ✓ · 55 views · created 2025-12-23 · Internal Wiki, AI Chatbot

Needs changes. This template uses 2 thing(s) that n8n 3.0 removes: LangChain Code (legacy), AI Agent v1 (old agent modes). 2 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 17 nodes and runs on Slack events. Along the way it connects OpenAI Chat Model, Slack, Wikipedia and PagerDuty and 1 more. It also calls api.port.io over HTTP.

How it runs

Trigger: On Slack events.

  1. Get user's slack profile (Slack): get profile (user)
  2. Get Port access token (HTTP Request): calls api.port.io (POST)
  3. Get Regions from Port (HTTP Request): calls api.port.io
  4. Get user permission from Port (HTTP Request): calls an HTTP API
  5. Unknown user (If): checks a condition and branches into true / false
  6. Send a message (Slack): uses Slack
  7. Set input (Edit Fields (Set)): sets 4 fields: name, granted_roles, allowed_tools…
  8. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Check permissions); memory: Chat Memory
  9. Send output message (Slack): uses Slack

Services it uses

OpenAI Chat ModelSlackWikipediaPagerDutyAWS S3

HTTP calls to: api.port.io

Before you upgrade to n8n 3.0

2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:

  • LangChain Code (legacy) in Check permissions: no direct replacement.
  • AI Agent v1 (old agent modes) in AI Agent (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
  • Also check Slack Trigger requires a signing secret on the Slack API credential.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
LangChain Code (legacy)
Check permissions
No direct replacement
AI Agent v1 (old agent modes)
AI Agent (v1.8)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rarely used nodes in this template: n8n-nodes-base.pagerDutyTool, n8n-nodes-base.awsS3Tool

Nodes used (13)

From the author

RBAC for AI agents with n8n and Port This workflow implements role-based access control for AI agent tools using Port as the single source of truth for permissions. Different users get access to different tools based on their roles, without needing a separate…

Excerpt from Port IO's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.