Most Laravel apps end up with a pile of small automations: send a welcome notification when a user registers, call a webhook when an order is paid, log something when a record changes. Each one usually means a developer writing a listener or a job. Laravel AutoBuilder takes a different approach. It adds a drag-and-drop workflow editor, inspired by Node-RED, n8n and Zapier, directly inside your Laravel app, so staff can wire triggers, conditions and actions together without a code change for every rule.
The package was featured on Laravel News on 27 November 2026, and it has been moving fast: version 1.8.0 (26 November) added folders and a cache for active flows, 1.9.0 (27 November) added replaying a failed run from the failed node, and 1.9.1 (28 November) fixed how triggers register in console processes. This tutorial shows how to install it, build a first flow, write a custom action and avoid the common setup mistakes.
Requirements
According to the package’s composer.json and README, you need:
- PHP 8.4 or newer
- Laravel 12 or 13
- Node.js 18+ only if you want to work on the editor itself
The package is MIT-licensed and written by Jean-Marc Strauven (Grazulex).
Installation
Install the package, publish the editor assets and migrations, then migrate:
composer require grazulex/laravel-autobuilder
php artisan vendor:publish --tag=autobuilder-assets
php artisan vendor:publish --tag=autobuilder-migrations
php artisan migrate
The editor is now available at /autobuilder. Publish the config file as well, because you will want to look at the route middleware and brick discovery settings:
php artisan vendor:publish --tag=autobuilder-config
Lock down who can open the editor
The routes use the web and auth middleware by default, so any logged-in user could reach the editor. The README documents an access-autobuilder gate. Laravel News notes the middleware only checks that gate if you define it, so define it:
// app/Providers/AppServiceProvider.php
use App\Models\User;
use Illuminate\Support\Facades\Gate;
public function boot(): void
{
Gate::define('access-autobuilder', function (User $user) {
return $user->is_admin; // or a role / permission check
});
}
Treat this as mandatory. An automation editor can create, update and delete models and call external URLs, so it should be limited to trusted staff.
How flows are built: bricks
AutoBuilder calls every node a brick. There are four kinds:
- Triggers start a flow:
OnModelCreated,OnModelUpdated,OnModelDeleted,OnWebhook,OnSchedule, andOnLogin/OnLogout. - Conditions decide which branch runs:
FieldEquals,FieldContains,UserHasRole(Spatie-compatible),TimeIsBetween,SwitchCase,ThrottleandRandomChancefor simple A/B splits. - Actions do the work:
SendNotification,CreateModel,UpdateModel,DeleteModel,CallWebhook,SetVariable,LogMessage,TransformData,CacheAction,SubFlow,DelayandLoopEach. - Gates combine condition results:
AndGate,OrGateandAtLeastGate(minimum count, percentage, majority, or all/any).
The editor itself is built with Vue Flow, so you connect bricks by dragging lines between them.
Your first flow: welcome log on signup
Start with something harmless so you can see the data flowing:
- Open
/autobuilderand create a new flow. - Add an On Model Created trigger and choose your
Usermodel. - Add a Log Message action and connect the trigger to it.
- Set the message to
Welcome, {{ model.name }}. Your account is ready. - Validate the flow, then activate it.
Register a test user and check storage/logs/laravel.log. You should see the welcome line.
Templating gotcha: match the trigger’s payload key
The README’s quick example uses {{ user.name }}, but Laravel News tested the Model Created trigger and found it puts the record’s attributes under model. So use {{ model.name }} with that trigger. In general, the key in a template must match whatever the trigger puts into the payload, which you can confirm in the execution history.
Templates support dot notation and filters. The README lists upper, lower, ucfirst, json, date, datetime and count:
Name: {{ model.name | upper }}
Items in order: {{ order.items | count }}
Writing a custom action
Built-in bricks cover common cases, but the real value is adding bricks that speak your domain. A custom action extends Grazulex\AutoBuilder\Bricks\Action and returns a FlowContext from handle(). This example, adapted from the Laravel News walkthrough, normalises an email address so later nodes see the clean value:
<?php
namespace App\AutoBuilder\Bricks;
use Grazulex\AutoBuilder\Bricks\Action;
use Grazulex\AutoBuilder\Flow\FlowContext;
class NormaliseContactEmail extends Action
{
public function name(): string
{
return 'Normalise Contact Email';
}
public function description(): string
{
return 'Trim and lowercase the contact email address.';
}
public function icon(): string
{
return 'mail';
}
public function fields(): array
{
return [];
}
public function handle(FlowContext $context): FlowContext
{
$email = (string) $context->get('contact.email', '');
return $context->set('contact.email', strtolower(trim($email)));
}
}
FlowContext::get() checks flow variables before the original payload, so any node after this one reads the normalised value.
Where to put custom bricks
AutoBuilder discovers bricks from the paths in the bricks section of config/autobuilder.php. The README shows app_path('AutoBuilder/Bricks') with the App\AutoBuilder\Bricks namespace, while the Laravel News article placed its action under app/AutoBuilder/Actions. Check your published config and put classes where bricks.paths points (or add your folder to that array) so the namespace and path agree.
Testing a flow without waiting for an event
You don’t have to register users to test. The editor has a Test dialog that accepts a JSON payload, and you can run a saved flow from Artisan:
php artisan autobuilder:run 'Contact signup automation' \
--payload='{"contact":{"email":" [email protected] ","subscribed":"yes"}}'
Execution history shows each run’s payload, variables and logs, which makes it easy to debug branching logic. Since 1.9.0 you can also replay a failed run from the node that failed instead of starting the whole flow again.
Production notes
A few details from the README and recent release notes matter once flows run for real:
- Sync vs async. Each flow can run immediately or on the queue. Queued flows need a working queue connection and worker. Version 1.9.0 fixed a bug where sync flows fired by event triggers (model, login, logout, event, failed job) were silently skipped, so upgrade if you are on an older version.
- Restart workers after edits. Queue workers read the list of active flows once at startup. Run
php artisan queue:restartafter activating, deactivating or editing a flow. - Active flows cache. Since 1.8.0 the active-flow list is cached and invalidated automatically when flows change through Eloquent. If you change flows with raw SQL or an import, run
php artisan autobuilder:clear-cache. With several app servers, use a shared cache store such as Redis. - Console triggers. Triggers also register in console processes (queue workers, Artisan, the scheduler). Set
AUTOBUILDER_TRIGGERS_CONSOLE=falseto turn that off. Version 1.9.1 fixed registration in console processes and made sure flows run only once. - Scheduled flows need Laravel’s scheduler running.
- Webhooks validate an
X-Webhook-Secretheader, so keep that secret out of your repository.
When AutoBuilder is a good fit
It shines for internal tools and admin panels where operations staff keep asking for “when X happens, do Y” rules. It is less suited to long-running business processes that need durable state, retries over days and external signals; a dedicated workflow engine is a better match there. Remember the README describes this as the first public release and asks for testers, so pin the version and test upgrades.
Takeaway
Laravel AutoBuilder gives your Laravel 12 or 13 app a visual automation editor with one Composer install and a few Artisan commands. Define the access-autobuilder gate, start with a harmless log action, write custom bricks for your domain logic, and remember to restart queue workers after editing flows. Full documentation lives in the project wiki, and the release notes track the fast-moving fixes.
