PHPackages                             intelfric/n8n-php-automation - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. intelfric/n8n-php-automation

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

intelfric/n8n-php-automation
============================

A visual automation engine for Laravel, similar to n8n, Zapier, or Huginn

v1.0.0(5mo ago)11MITPHPPHP ^8.2CI failing

Since Nov 13Pushed 5mo agoCompare

[ Source](https://github.com/INTELFRIC/n8n-php-automation)[ Packagist](https://packagist.org/packages/intelfric/n8n-php-automation)[ Docs](https://github.com/INTELFRIC/n8n-php-automation)[ RSS](/packages/intelfric-n8n-php-automation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Laravel Automation Core
=======================

[](#laravel-automation-core)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0e7d674086e9ea3aa236a84e3a1f1348fa53a49949746b32b12d5ccaee205dfb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e74656c667269632f6e386e2d7068702d6175746f6d6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/intelfric/n8n-php-automation)[![Total Downloads](https://camo.githubusercontent.com/e360bd0e4cc55161151671139159df5f799cf4a1b22d59ae934312ed988494ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e74656c667269632f6e386e2d7068702d6175746f6d6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/intelfric/n8n-php-automation)

A powerful **visual automation engine** for Laravel, similar to **n8n**, **Zapier**, or **Huginn**. Create, connect, and execute workflows made of modular nodes (triggers, actions, conditions) directly within your Laravel projects.

Features
--------

[](#features)

- 🧩 **Modular Architecture**: Build workflows with reusable, composable nodes
- ⚡ **Flow Execution Engine**: Automatically resolves node dependencies and execution order
- 📊 **Execution Logging**: Track all flow executions with detailed logs
- 🔌 **Built-in Nodes**: HTTP requests, emails, delays, conditions, database queries
- 🎨 **Extensible**: Easy to create and register custom nodes
- 🚀 **RESTful API**: Full API for managing flows, nodes, and connections
- 📝 **Event System**: Hook into flow lifecycle with Laravel events
- ⚙️ **Queue Support**: Run flows asynchronously (optional)

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

[](#requirements)

- PHP 8.2 or higher
- Laravel 10.x, 11.x, or 12.x

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

[](#installation)

Install the package via Composer:

```
composer require intelfric/n8n-php-automation
```

Publish the configuration file:

```
php artisan vendor:publish --tag=automation-config
```

Publish and run the migrations:

```
php artisan vendor:publish --tag=automation-migrations
php artisan migrate
```

Quick Start
-----------

[](#quick-start)

### 1. Create a Flow

[](#1-create-a-flow)

```
use DrMsigwa\Automation\Models\Flow;
use DrMsigwa\Automation\Nodes\HttpRequestNode;
use DrMsigwa\Automation\Nodes\EmailNode;

// Create a new flow
$flow = Flow::create([
    'name' => 'Send Weather Alert',
    'description' => 'Fetch weather data and send email alert',
    'status' => 'active',
]);

// Add nodes to the flow
$httpNode = $flow->nodes()->create([
    'type' => HttpRequestNode::class,
    'name' => 'Fetch Weather',
    'config' => [
        'method' => 'GET',
        'url' => 'https://api.weather.com/current',
    ],
]);

$emailNode = $flow->nodes()->create([
    'type' => EmailNode::class,
    'name' => 'Send Alert',
    'config' => [
        'to' => 'user@example.com',
        'subject' => 'Weather Update',
        'body' => 'Current weather: {{http_body}}',
    ],
]);

// Connect nodes
$flow->connections()->create([
    'source_node_id' => $httpNode->id,
    'target_node_id' => $emailNode->id,
]);
```

### 2. Execute the Flow

[](#2-execute-the-flow)

```
use DrMsigwa\Automation\Engine\FlowRunner;

$runner = new FlowRunner($flow);
$result = $runner->run(['city' => 'New York']);

dd($result);
```

Or via Artisan command:

```
php artisan automation:run 1
php artisan automation:run 1 --data='{"city":"New York"}'
```

### 3. Use the API

[](#3-use-the-api)

The package provides RESTful API endpoints:

```
# List all flows
GET /api/automation/flows

# Get a specific flow
GET /api/automation/flows/{id}

# Create a flow
POST /api/automation/flows

# Execute a flow
POST /api/automation/flows/{id}/execute

# Get available nodes
GET /api/automation/available-nodes
```

Built-in Nodes
--------------

[](#built-in-nodes)

### HTTP Request Node

[](#http-request-node)

Makes HTTP requests to external APIs.

```
[
    'type' => HttpRequestNode::class,
    'config' => [
        'method' => 'POST',
        'url' => 'https://api.example.com/data',
        'headers' => ['Authorization' => 'Bearer token'],
        'body' => ['key' => 'value'],
        'timeout' => 30,
    ],
]
```

### Email Node

[](#email-node)

Sends emails using Laravel's Mail system.

```
[
    'type' => EmailNode::class,
    'config' => [
        'to' => 'recipient@example.com',
        'subject' => 'Hello World',
        'body' => 'Email content here',
        'from' => 'sender@example.com', // optional
    ],
]
```

### Delay Node

[](#delay-node)

Adds delays between tasks.

```
[
    'type' => DelayNode::class,
    'config' => [
        'seconds' => 5,
    ],
]
```

### Condition Node

[](#condition-node)

Evaluates conditional logic.

```
[
    'type' => ConditionNode::class,
    'config' => [
        'left' => '{{http_status}}',
        'operator' => '==',
        'right' => 200,
    ],
]
```

**Supported operators**: `==`, `===`, `!=`, `!==`, `>`, `>=`, `
