PHPackages                             mrkindy/n8n-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mrkindy/n8n-laravel

ActiveLibrary[API Development](/categories/api)

mrkindy/n8n-laravel
===================

Laravel package for integrating with n8n API using clean architecture patterns

v1.0.0(8mo ago)461MITPHPPHP ^8.1

Since Aug 18Pushed 8mo agoCompare

[ Source](https://github.com/mrkindy/n8n-laravel)[ Packagist](https://packagist.org/packages/mrkindy/n8n-laravel)[ RSS](/packages/mrkindy-n8n-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (5)Used By (0)

Laravel n8n Package
===================

[](#laravel-n8n-package)

A comprehensive Laravel package for integrating with the n8n API using clean architecture patterns. This package provides a facade-based interface with support for multiple execution strategies, request builders, and event observability.

Features
--------

[](#features)

- **Facade** - Simple static interface (`N8N::workflows()`)
- **Adapter** - Clean abstraction of n8n API communication
- **Strategy** - Multiple execution strategies (sync, async, queued)
- **Builder** - Fluent API for constructing complex payloads
- **Observer** - Event hooks for request lifecycle
- **Clean Architecture** - SOLID principles and separation of concerns
- **Type Safety** - Full PHP 8.1+ type hints and strict typing
- **Event System** - Laravel events for request monitoring
- **Comprehensive Testing** - Pest framework with full test coverage

Installation
------------

[](#installation)

```
composer require mrkindy/n8n-laravel
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="MrKindy\N8NLaravel\N8NServiceProvider" --tag="n8n-config"
```

### Environment Configuration

[](#environment-configuration)

Add these variables to your `.env` file:

```
N8N_BASE_URL=http://localhost:5678
N8N_API_KEY=your-api-key-here
N8N_DEFAULT_STRATEGY=sync
N8N_HTTP_TIMEOUT=30
N8N_HTTP_RETRY_TIMES=3
N8N_HTTP_RETRY_SLEEP=1000
N8N_HTTP_VERIFY_SSL=true
N8N_EVENTS_ENABLED=true
N8N_LOGGING_ENABLED=true
N8N_LOGGING_LEVEL=info
N8N_LOGGING_CHANNEL=default
N8N_QUEUE_CONNECTION=default
N8N_QUEUE_NAME=n8n
```

Usage
-----

[](#usage)

For detailed usage instructions, please refer to [DOCUMENTATION.md](DOCUMENTATION.md).

Testing
-------

[](#testing)

The package uses the Pest testing framework. Run tests with:

```
vendor/bin/pest
```

### Test Structure

[](#test-structure)

```
tests/
├── Pest.php                    # Pest configuration
├── TestCase.php                # Base test case
├── Feature/
│   ├── FacadeTest.php         # Facade functionality tests
│   ├── BuilderTest.php        # Builder tests
│   ├── ObserverTest.php       # Observer tests
│   └── StrategyTest.php       # Strategy tests
└── Unit/
    ├── AdapterTest.php        # Adapter unit tests
    └── ServiceTest.php        # Individual service tests

```

### Writing Tests

[](#writing-tests)

```
use MrKindy\N8NLaravel\Facades\N8N;

it('can create a workflow', function () {
    Http::fake([
        'localhost:5678/api/v1/workflows' => Http::response([
            'id' => 'workflow-123',
            'name' => 'Test Workflow'
        ])
    ]);

    $result = N8N::workflows()->create([
        'name' => 'Test Workflow',
        'nodes' => []
    ]);

    expect($result)->toHaveKey('id', 'workflow-123');
});
```

Configuration Reference
-----------------------

[](#configuration-reference)

### HTTP Client Options

[](#http-client-options)

```
'http' => [
    'timeout' => 30,                    // Request timeout in seconds
    'retry' => [
        'times' => 3,                   // Number of retry attempts
        'sleep' => 1000,                // Sleep between retries (ms)
    ],
    'verify' => true,                   // SSL certificate verification
],
```

### Queue Configuration

[](#queue-configuration)

```
'queue' => [
    'connection' => 'redis',            // Queue connection
    'queue' => 'n8n-operations',       // Queue name
],
```

### Logging Configuration

[](#logging-configuration)

```
'logging' => [
    'enabled' => true,                  // Enable request logging
    'level' => 'info',                  // Log level
    'channel' => 'n8n',                // Log channel
],
```

API Coverage
------------

[](#api-coverage)

This package provides full coverage of the n8n Public API v1.1.1:

### Workflows

[](#workflows)

- ✅ List workflows
- ✅ Get workflow
- ✅ Create workflow
- ✅ Update workflow
- ✅ Delete workflow
- ✅ Activate workflow
- ✅ Deactivate workflow
- ✅ Transfer workflow
- ✅ Get workflow tags
- ✅ Update workflow tags

### Credentials

[](#credentials)

- ✅ Create credential
- ✅ Delete credential
- ✅ Get credential schema
- ✅ Transfer credential

### Executions

[](#executions)

- ✅ List executions
- ✅ Get execution
- ✅ Delete execution

### Users (Enterprise)

[](#users-enterprise)

- ✅ List users
- ✅ Get user
- ✅ Create users
- ✅ Delete user
- ✅ Change user role

### Tags

[](#tags)

- ✅ List tags
- ✅ Get tag
- ✅ Create tag
- ✅ Update tag
- ✅ Delete tag

### Variables

[](#variables)

- ✅ List variables
- ✅ Create variable
- ✅ Update variable
- ✅ Delete variable

### Projects (Enterprise)

[](#projects-enterprise)

- ✅ List projects
- ✅ Create project
- ✅ Delete project
- ✅ Add users to project

### Audit

[](#audit)

- ✅ Generate audit

### Source Control

[](#source-control)

- ✅ Pull changes

Contributing
------------

[](#contributing)

1. Fork the repository
2. Create a feature branch
3. Write tests for your changes
4. Ensure all tests pass: `vendor/bin/pest`
5. Follow PSR-12 coding standards
6. Submit a pull request

### Development Setup

[](#development-setup)

```
git clone https://github.com/mrkindy/n8n-laravel.git
cd n8n-laravel
composer install
cp .env.example .env
# Configure your n8n instance details in .env
vendor/bin/pest
```

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10.0+ or 11.0+
- n8n instance with API access

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE.md).

Support
-------

[](#support)

- [Documentation](https://docs.n8n.io/api/)
- [Issues](https://github.com/mrkindy/n8n-laravel/issues)
- [Discussions](https://github.com/mrkindy/n8n-laravel/discussions)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

---

Built with ❤️ for the Laravel and n8n communities.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance59

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

266d ago

Major Versions

v0.1.2-alpha → v1.0.02025-08-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5fd85e534ea2f57176af791158952e47f137990cf3a4d1c072a5feb7aa24dbc?d=identicon)[mrkindy](/maintainers/mrkindy)

---

Top Contributors

[![mrkindy](https://avatars.githubusercontent.com/u/744360?v=4)](https://github.com/mrkindy "mrkindy (7 commits)")

---

Tags

apilaravelautomationworkflown8n

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/mrkindy-n8n-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/mrkindy-n8n-laravel/health.svg)](https://phpackages.com/packages/mrkindy-n8n-laravel)
```

###  Alternatives

[tailflow/laravel-orion

Orion for Laravel allows you to build a fully featured REST API based on your Eloquent models and relationships with the simplicity of Laravel as you love it.

1.6k627.7k9](/packages/tailflow-laravel-orion)[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[kayedspace/laravel-n8n

A complete, expressive, and fluent Laravel client for the n8n public REST API and Webhooks Triggering.

1376.2k1](/packages/kayedspace-laravel-n8n)[dragon-code/laravel-json-response

Automatically always return a response in JSON format

1118.6k1](/packages/dragon-code-laravel-json-response)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
