How kayedspace/laravel-n8n works
Laravel N8N is a Laravel client for managing n8n resources and triggering workflow webhooks. A typical workflow starts in a Laravel application through the facade, which exposes API resource clients for operations against n8n; webhook calls can run synchronously or be queued. The package also offers a workflow-building DSL, incoming-webhook signature verification, health checks, and CLI commands. The shared request layer provides configuration, response handling, caching, logging, metrics, and events. Some capabilities are documented but their implementation files are absent from the supplied tree; those links are omitted or marked uncertain.
Main entry points: Client/N8nClient.php Client factory · Facades/N8nClient.php Client facade · Webhooks.php Webhook client · Workflows.php Workflows
Components 23
Laravel entry points
- Client facade
src/Facades/N8nClient.php - Client factory
src/Client/N8nClient.php
n8n API resources
- Workflows
src/Client/Api/Workflows.php - Executions
src/Client/Api/Executions.php - Projects
src/Client/Api/Projects.php - Audit
src/Client/Api/Audit.php - Source control
src/Client/Api/SourceControl.php - Tags
src/Client/Api/Tags.php - Users
src/Client/Api/Users.php - Variables
src/Client/Api/Variables.php - Credentials
Request runtime
- API client base
src/Client/Api/AbstractApi.php - Request runtime
src/Client/BaseClient.php - Pagination
src/Concerns/HasPagination.php - Resource events
src/Events/N8nEvent.php
Webhook handling
- Webhook client
src/Client/Webhook/Webhooks.php - Queued trigger job
src/Jobs/TriggerN8nWebhook.php - Signature middleware
src/Http/Middleware/VerifyN8nWebhook.php
Workflow tools
- Workflow builder
src/Support/WorkflowBuilder.php - Health checks
src/Support/HealthCheck.php - CLI commands
src/Console
Other components
- Laravel application
- n8n instance
Connections 30
- Laravel application → Client facade: calls
- Client facade → Client factory: resolves
src/Facades/N8nClient.php - Client factory → Workflows: creates
src/Client/N8nClient.php - Client factory → Executions: creates
src/Client/N8nClient.php - Client factory → Projects: creates
src/Client/N8nClient.php - Client factory → Audit: creates
src/Client/N8nClient.php - Client factory → Source control: creates
src/Client/N8nClient.php - Client factory → Tags: creates
src/Client/N8nClient.php - Client factory → Users: creates
src/Client/N8nClient.php - Client factory → Variables: creates
src/Client/N8nClient.php - Client factory → Webhook client: creates
src/Client/N8nClient.php - Client facade → Credentials: exposes
src/Facades/N8nClient.php - Workflows → API client base: requests through
src/Client/Api/Workflows.php - Executions → API client base: requests through
src/Client/Api/Executions.php - Projects → API client base: requests through
src/Client/Api/Projects.php - API client base → Request runtime: executes via
src/Client/Api/AbstractApi.php - API client base → n8n instance: sends API requests
src/Client/Api/AbstractApi.php - Workflows → Resource events: dispatches events
src/Client/Api/Workflows.php - Workflows → Pagination: uses
src/Client/Api/Workflows.php - Executions → Pagination: uses
src/Client/Api/Executions.php - Laravel application → Webhook client: triggers
- Webhook client → n8n instance: sends webhook
src/Client/Webhook/Webhooks.php - Webhook client → Queued trigger job: queues
src/Client/Webhook/Webhooks.php - Queued trigger job → Webhook client: runs synchronously
src/Jobs/TriggerN8nWebhook.php - n8n instance → Signature middleware: sends signed request
- Signature middleware → Webhook client: verifies signature
src/Http/Middleware/VerifyN8nWebhook.php - Workflow builder → Client facade: uses client
src/Support/WorkflowBuilder.php - Health checks → Client facade: checks instance
src/Support/HealthCheck.php - CLI commands → Client facade: runs operations
src/Console/HealthCheckCommand.php - n8n instance → Workflows: workflow operations