Connect Claude Code with n8n
This workflow enables you to integrate Claude AI code execution capabilities directly into your n8n automation workflows.
Overview
The workflow uses an n8n chat trigger to receive user input, executes Claude commands via SSH on your remote server, and returns the output. This allows you to leverage Claude's AI capabilities within your automation pipelines.
Features
- Chat Trigger: Receives user input through n8n's chat interface
- SSH Execution: Executes Claude commands on your remote server
- Output Processing: Captures and formats command output for use in subsequent workflow steps
Setup Instructions
For detailed setup instructions, configuration steps, and troubleshooting, please refer to the complete tutorial:
https://ay-automate.notion.site/Connect-Claude-code-with-n8n-2c8e32d29d498037b0cae75e0e294cdc
Requirements
- n8n instance with chat trigger support
- SSH access to a remote server
- Claude CLI installed on the remote server
- Proper SSH credentials configured in n8n
Workflow Structure
- Chat Trigger: Receives user input
- SSH Execute: Runs Claude command on remote server
- Set Fields: Processes and formats the output
Notes
- Make sure to configure your working directory path in the SSH node
- Ensure Claude CLI is properly installed and accessible on your remote server
- SSH credentials must be configured in n8n before using this workflow
For more details and step-by-step instructions, visit: https://ay-automate.notion.site/Connect-Claude-code-with-n8n-2c8e32d29d498037b0cae75e0e294cdc