{"id":30593366,"url":"https://github.com/techwithty/n8n","last_synced_at":"2025-08-29T18:13:40.739Z","repository":{"id":309975061,"uuid":"1038252230","full_name":"TechWithTy/n8n","owner":"TechWithTy","description":"n8n Python SDK: async HTTPX client and APIs for all major n8n resources with a FastAPI-ready integration and a complete pytest test suite.","archived":false,"fork":false,"pushed_at":"2025-08-14T21:50:58.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-14T23:25:59.622Z","etag":null,"topics":["api","async","audit","automation","credentials","executions","fastapi","httpx","n8n","projects","pytest","python","sdk","tags","testing","users","variables","workflows"],"latest_commit_sha":null,"homepage":"https://www.cybershoptech.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TechWithTy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-14T21:46:56.000Z","updated_at":"2025-08-14T21:51:02.000Z","dependencies_parsed_at":"2025-08-14T23:26:02.314Z","dependency_job_id":"5d837f31-1e97-4fda-99fc-7a9af24f041f","html_url":"https://github.com/TechWithTy/n8n","commit_stats":null,"previous_names":["techwithty/n8n"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/TechWithTy/n8n","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fn8n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fn8n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fn8n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fn8n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TechWithTy","download_url":"https://codeload.github.com/TechWithTy/n8n/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fn8n/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272735313,"owners_count":24984283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","async","audit","automation","credentials","executions","fastapi","httpx","n8n","projects","pytest","python","sdk","tags","testing","users","variables","workflows"],"created_at":"2025-08-29T18:13:40.210Z","updated_at":"2025-08-29T18:13:40.725Z","avatar_url":"https://github.com/TechWithTy.png","language":"Python","readme":"# n8n Integration Module\n\n## Overview\n\nThis module provides a backend integration with the n8n automation tool, exposing its REST API through a structured and maintainable interface. It acts as a proxy, forwarding requests to a live n8n instance while leveraging FastAPI for routing, Pydantic for schema validation, and an asynchronous HTTP client for non-blocking API calls.\n\n## Features\n\nThe integration currently supports the following n8n API resources:\n\n- **Workflows**: List, retrieve, create, update, and delete workflows.\n- **Executions**: List, retrieve, and delete workflow executions.\n- **Credentials**: Full CRUD functionality for credentials.\n- **Users**: List and retrieve users.\n- **Tags**: Full CRUD functionality for tags.\n- **Audit**: Generate security and risk audit reports.\n- **Source Control**: Pull changes from a remote Git repository.\n- **Variables**: Full CRUD functionality for instance variables.\n- **Projects**: List all projects.\n- **Webhooks**: Manage test and production webhooks (Note: webhook management is partially implemented).\n\n## Configuration\n\nTo enable the integration, you must configure the following environment variables in your `.env` file:\n\n- `N8N_BASE_URL`: The base URL of your n8n instance (e.g., `https://n8n.example.com/api/v1`).\n- `N8N_API_KEY`: Your n8n API key for authentication.\n\n```sh\nN8N_BASE_URL=https://your-n8n-instance.com/api/v1\nN8N_API_KEY=your-api-key-here\n```\n\n## Architecture\n\nThe module is organized into four main sub-packages:\n\n- `api/`: Contains the FastAPI routers that define the API endpoints. Each resource has its own router file (e.g., `workflows.py`, `users.py`).\n- `schemas/`: Contains the Pydantic models that define the data structures for API requests and responses. These models ensure data validation and serialization.\n- `services/`: Contains the business logic for interacting with the n8n API. Each service class encapsulates the HTTP calls for a specific resource.\n- `client.py`: Provides a shared, asynchronous HTTP client (`N8nClient`) for making requests to the n8n API. It handles authentication and base URL configuration.\n\nThis layered architecture promotes separation of concerns, making the integration easier to test, maintain, and extend.\n\n## Usage\n\nOnce the application is running, the n8n API endpoints are available under the `/api/n8n/` prefix. For example, to retrieve a list of all workflows, you can make a GET request to:\n\n```\nGET /api/n8n/workflows/\n```\n\nRefer to the OpenAPI documentation at `/docs` for a complete and interactive list of all available endpoints, their parameters, and response models.\n\n## Testing\n\nA comprehensive test suite is included, covering all services and API endpoints to ensure correctness and reliability. The tests can be found in the `_tests` directory and run using `pytest`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwithty%2Fn8n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechwithty%2Fn8n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwithty%2Fn8n/lists"}