Download the PHP package kayedspace/laravel-n8n without Composer

On this page you can find all versions of the php package kayedspace/laravel-n8n. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-n8n

Laravel N8N: A Fluent Client for n8n Automation Workflows

A complete, expressive, and fluent Laravel client for the n8n public REST API and Webhooks Triggering, empowering Laravel developers to interact seamlessly with n8n webhooks, workflows, executions, credentials, tags, users, variables, projects, source control operations and more.

Table of Contents

๐Ÿ“ฆ Installation

Install via Composer:

Service providers and facades are auto-discovered by Laravel.

โš™๏ธ Configuration

Publish and customize the configuration file:

Set environment variables in .env:

๐Ÿš€ Quick Start

โšก Webhooks

The Webhooks client enables triggering n8n workflow webhooks with support for multiple HTTP methods, authentication, async processing, and signature verification.

Basic Usage

Basic auth is applied by default if N8N_WEBHOOK_USERNAME and N8N_WEBHOOK_PASSWORD are set in .env.

Async Webhook Triggering

Queue webhook triggers for background processing:

Webhook Signature Verification

Secure incoming n8n webhooks with HMAC verification:

๐Ÿ—๏ธ Workflow Builder

Build n8n workflows programmatically using a fluent, expressive DSL:

๐Ÿ“š API Resources

Below is an exhaustive reference covering every resource and method provided.

๐Ÿ•ต Audit

Method HTTP Method & Path Description
generate(array $additionalOptions = []) POST /audit Generate a full audit report based on optional categories or filters

Description: This endpoint performs a security audit of your n8n instance and returns diagnostics grouped by category. It must be invoked by an account with owner privileges.

๐Ÿ”‘ Credentials

Method Signature HTTP Method & Path Description
create(array $payload) POST /credentials Create a credential using the appropriate type schema.
list(array $filters = []) GET /credentials List stored credentials with optional pagination.
all(array $filters = []) GET /credentials Auto-paginate and retrieve all credentials.
listIterator(array $filters = []) GET /credentials Memory-efficient generator for iterating credentials.
get(string $id) GET /credentials/{id} Retrieve details of a specific credential by ID.
delete(string $id) DELETE /credentials/{id} Delete a credential permanently.
schema(string $typeName) GET /credentials/schema/{typeName} Get the schema definition for a credential type.
transfer(string $id, string $destinationProjectId) PUT /credentials/{id}/transfer Move a credential to another project using its ID.

Examples:

โฏ๏ธ Executions

Method Signature HTTP Method & Path Description
list(array $filters = []) GET /executions Retrieve a paginated list of workflow executions. Supports filters such as status, workflowId, projectId, includeData, limit, cursor.
all(array $filters = []) GET /executions Auto-paginate and retrieve all executions matching filters.
listIterator(array $filters = []) GET /executions Memory-efficient generator for iterating through all executions.
get(int $id, bool $includeData = false) GET /executions/{id} Retrieve detailed information for a specific execution. Optionally include execution data.
wait(int $id, int $timeout = 60, int $interval = 2) GET /executions/{id} Poll an execution until completion or timeout. Throws ExecutionFailedException on failure.
delete(int $id) DELETE /executions/{id} Delete an execution record by ID.
deleteMany(array $ids) DELETE /executions/{id} Delete multiple executions. Returns results array with success/error for each ID.

Examples:

๐Ÿšง Projects

Method Signature HTTP Method & Path Description
create(array $payload) POST /projects Create a new project with name, description, etc.
list(array $filters = []) GET /projects Retrieve a paginated list of projects.
all(array $filters = []) GET /projects Auto-paginate and retrieve all projects.
listIterator(array $filters = []) GET /projects Memory-efficient generator for iterating through all projects.
update(string $projectId, array $payload) PUT /projects/{projectId} Update project name or metadata. Returns 204 No Content on success.
delete(string $projectId) DELETE /projects/{projectId} Delete a project by ID. Returns 204 No Content on success.
addUsers(string $projectId, array $relations) POST /projects/{projectId}/users Add users to a project with specified roles via the relations array.
changeUserRole(string $projectId, string $userId, string $role) PATCH /projects/{projectId}/users/{userId} Change the role of an existing user within a project.
removeUser(string $projectId, string $userId) DELETE /projects/{projectId}/users/{userId} Remove a user from a project.

Examples:

๐Ÿ“ Source Control

Method Signature HTTP Method & Path Description
pull(array $payload) POST /source-control/pull Trigger a pull operation from the connected Git source for all projects.

Example:

Requires source control integration to be configured in the n8n instance.

๐Ÿท๏ธ Tags

Method Signature HTTP Method & Path Description
create(array $payload) POST /tags Create a new tag with the given name or properties.
list(array $filters = []) GET /tags List all tags with optional pagination using limit/cursor.
all(array $filters = []) GET /tags Auto-paginate and retrieve all tags.
listIterator(array $filters = []) GET /tags Memory-efficient generator for iterating through all tags.
get(string $id) GET /tags/{id} Retrieve a single tag by its ID.
update(string $id, array $payload) PUT /tags/{id} Update the name or properties of a specific tag.
delete(string $id) DELETE /tags/{id} Delete a tag permanently by its ID.
createMany(array $tags) POST /tags Create multiple tags. Returns results with success/error.
deleteMany(array $ids) DELETE /tags/{id} Delete multiple tags. Returns results with success/error.

Examples:

๐Ÿ™ Users

Method Signature HTTP Method & Path Description
list(array $filters = []) GET /users List users with optional filters: limit, cursor, includeRole, projectId.
all(array $filters = []) GET /users Auto-paginate and retrieve all users.
listIterator(array $filters = []) GET /users Memory-efficient generator for iterating through all users.
create(array $userPayloads) POST /users Create (invite) one or more users by providing user objects.
get(string $idOrEmail, bool $includeRole = false) GET /users/{idOrEmail} Get a user by ID or email. Optionally include role.
delete(string $idOrEmail) DELETE /users/{idOrEmail} Delete a user by ID or email.
changeRole(string $idOrEmail, string $newRoleName) PATCH /users/{idOrEmail}/role Change the user's role to the new role name.

Examples:

๐Ÿ”  Variables

Method Signature HTTP Method & Path Description
create(array $payload) POST /variables Create a new variable with a key-value pair.
list(array $filters = []) GET /variables List variables with optional pagination using limit and cursor.
all(array $filters = []) GET /variables Auto-paginate and retrieve all variables.
listIterator(array $filters = []) GET /variables Memory-efficient generator for iterating through all variables.
update(string $id, array $payload) PUT /variables/{id} Update the value of an existing variable.
delete(string $id) DELETE /variables/{id} Permanently delete a variable.
createMany(array $variables) POST /variables Create multiple variables. Returns results with success/error.
deleteMany(array $ids) DELETE /variables/{id} Delete multiple variables. Returns results with success/error.

Examples:

๐Ÿ”„ Workflows

Method Signature HTTP Method & Path Description
create(array $payload) POST /workflows Create a new workflow using a flow definition.
list(array $filters = []) GET /workflows List workflows with optional filters: active, tags, projectId, etc.
all(array $filters = []) GET /workflows Auto-paginate and retrieve all workflows matching filters.
listIterator(array $filters = []) GET /workflows Memory-efficient generator for iterating through all workflows.
get(string $id, bool $excludePinnedData = false) GET /workflows/{id} Retrieve a specific workflow; optionally exclude pinned node data.
update(string $id, array $payload) PUT /workflows/{id} Update the workflow definition.
delete(string $id) DELETE /workflows/{id} Delete the specified workflow.
activate(string $id) POST /workflows/{id}/activate Activate the workflow.
deactivate(string $id) POST /workflows/{id}/deactivate Deactivate the workflow.
activateMany(array $ids) POST /workflows/{id}/activate Activate multiple workflows. Returns results with success/error per ID.
deactivateMany(array $ids) POST /workflows/{id}/deactivate Deactivate multiple workflows. Returns results with success/error per ID.
deleteMany(array $ids) DELETE /workflows/{id} Delete multiple workflows. Returns results with success/error per ID.
export(string $id) GET /workflows/{id} Export workflow definition (for backup/migration).
import(array $workflow) POST /workflows Import a workflow definition.
transfer(string $id, string $destinationProjectId) PUT /workflows/{id}/transfer Move a workflow to a different project.
tags(string $id) GET /workflows/{id}/tags Get all tags associated with the workflow.
updateTags(string $id, array $tagIds) PUT /workflows/{id}/tags Update the list of tag IDs for a workflow.

Examples:

๐Ÿ”ง Advanced Features

๐Ÿ“Š Events System

Every mutating request (create/update/delete/transfer/role-change, etc.) dispatches a strongly-typed Laravel event so you can observe n8n activity in real time. Cached reads still trigger the ApiRequestCompleted event, so metrics and listeners remain consistent even when responses are served from cache.

Available events

Resource Events Fired
API Client ApiRequestCompleted, RateLimitEncountered
Workflows WorkflowCreated, WorkflowUpdated, WorkflowDeleted, WorkflowActivated, WorkflowDeactivated, WorkflowTransferred, WorkflowTagsUpdated
Executions ExecutionCompleted, ExecutionFailed, ExecutionDeleted
Credentials CredentialCreated, CredentialDeleted, CredentialTransferred
Projects ProjectCreated, ProjectUpdated, ProjectDeleted, ProjectUsersAdded, ProjectUserRoleChanged, ProjectUserRemoved
Users UserCreated, UserDeleted, UserRoleChanged
Variables VariableCreated, VariableUpdated, VariableDeleted
Tags TagCreated, TagUpdated, TagDeleted
Webhooks WebhookTriggered (sync and queued)

Register listeners just like any other Laravel event:

Events can be enabled or disabled in config:

๐Ÿ’พ Response Caching

Improve performance by caching API responses:

Cache is automatically invalidated on create/update/delete operations.

๐Ÿ“ˆ Metrics

Enable lightweight request metrics that are incremented during every API call (including cache hits when caching is enabled):

Metrics are grouped per hour and include total requests, counts per HTTP method, status code, and average duration. Consume them from your chosen cache store to drive dashboards or alerts.

๐Ÿ“ Logging

Comprehensive request/response logging for debugging and monitoring:

Logs include:

๐Ÿ”Œ Client Modifiers

Customize HTTP client behavior by adding modifiers to the request pipeline:

Client modifiers receive the PendingRequest instance and must return a modified PendingRequest.

๐Ÿ”ง Macros

Extend API resource classes with custom methods using Laravel's Macroable trait:

All API resource classes support macros.

โš ๏ธ Exception Handling

The package provides domain-specific exceptions with detailed context:

Exception hierarchy:

All exceptions provide:

๐Ÿฅ Health Checks

Monitor your n8n instance connectivity and health:

CLI command also available:

๐Ÿงช Testing

Comprehensive testing utilities for your n8n integrations:

N8nFake

Mock n8n API responses in your tests:

Test Data Factories

Generate realistic test data:

๐ŸŽจ CLI Commands

Manage n8n directly from your terminal:

๐Ÿค Contributing

Contributions are welcome! If you have a feature request, bug report, or improvement:

  1. Fork the repository

  2. Create a topic branch: Choose the prefix that matches the purpose of your work:

    • feature/your-description โ€“ new functionality
    • bugfix/your-description โ€“ fix for an existing issue
    • hotfix/your-description โ€“ urgent production fix
  3. Run Laravel Pint to ensure code style is consistentcomposer pint
  4. Add or update tests and make sure they pass composer test
  5. Commit your changesgit commit -am "Add: my awesome addition"
  6. Push to your branch git push origin feature/my-awesome-addition
  7. Open a pull request

Please adhere to laravel pint and include tests where applicable.

๐Ÿ›  Support

If you encounter any issues or have questions:

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.


All versions of laravel-n8n with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/support Version >=10
illuminate/http Version >=10
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kayedspace/laravel-n8n contains the following files

Loading the files please wait ...