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.
Download kayedspace/laravel-n8n
More information about kayedspace/laravel-n8n
Files in kayedspace/laravel-n8n
Package laravel-n8n
Short Description A complete, expressive, and fluent Laravel client for the n8n public REST API and Webhooks Triggering.
License MIT
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
- ⚙️ Configuration
- 🚀 Quick Start
- ⚡ Webhooks Trigger
- 📚 Full API Resource Reference
- 🕵 Audit
- 🔑 Credentials
- ⏯️ Executions
- 🚧 Projects
- 📝 Source Control
- 🏷️ Tags
- 🙍 Users
- 🔠 Variables
- 🔄 Workflows
- 🤝 Contributing
- 🛠 Support
- 📄 License
📦 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 Trigger
The Webhooks class enables sending HTTP requests to n8n workflow webhook trigger URLs, supporting multiple HTTP verbs ( GET, POST, etc.) and basic authentication (if configured).
basic auth is applied by default if
N8N_WEBHOOK_USERNAME
,N8N8_WEBHOOK_PASSOWRD
are set in the .env file.
Example:
📚 Full API Resource Reference
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(int $limit = 100, ?string $cursor = null) |
GET /credentials |
List stored credentials with optional pagination. |
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. |
Example:
⏯️ 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 . |
get(int $id, bool $includeData = false) |
GET /executions/{id} |
Retrieve detailed information for a specific execution. Optionally include execution data. |
delete(int $id) |
DELETE /executions/{id} |
Delete an execution record by ID. |
Example:
🚧 Projects
Method Signature | HTTP Method & Path | Description |
---|---|---|
create(array $payload) |
POST /projects |
Create a new project with name, description, etc. |
list(int $limit = 100, ?string $cursor = null) |
GET /projects |
Retrieve a paginated list of 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. |
Example Usage:
📝 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(int $limit = 100, ?string $cursor = null) |
GET /tags |
List all tags with optional pagination using limit/cursor. |
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. |
Example:
🙍 Users
Method Signature | HTTP Method & Path | Description |
---|---|---|
list(array $filters = []) |
GET /users |
List users with optional filters: limit , cursor , includeRole , projectId . |
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. |
Example:
🔠 Variables
Method Signature | HTTP Method & Path | Description |
---|---|---|
create(array $payload) |
POST /variables |
Create a new variable with a key-value pair. |
list(int $limit = 100, ?string $cursor = null) |
GET /variables |
List variables with optional pagination using limit and cursor. |
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. |
Example:
🔄 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. |
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. |
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. |
Example:
🤝 Contributing
Contributions are welcome! If you have a feature request, bug report, or improvement:
-
Fork the repository
-
Create a topic branch: Choose the prefix that matches the purpose of your work:
feature/your-description
– new functionalitybugfix/your-description
– fix for an existing issuehotfix/your-description
– urgent production fix
- Run Laravel Pint to ensure code style is consistent
composer pint
- Add or update tests and make sure they pass
composer test
- Commit your changes
git commit -am "Add: my awesome addition"
- Push to your branch
git push origin feature/my-awesome-addition
- Open a pull request
Please adhere to laravel pint and include tests where applicable.
🛠 Support
If you encounter any issues or have questions:
- Open an issue in the GitHub repository
- Use Discussions for non-bug topics or feature proposals
- Pull requests are always welcome for fixes and improvements
📄 License
This package is open-sourced software licensed under the MIT license.