Skip to content

[Advanced Feature] n8n Integration for Workflow Automation #43

@dineshpinto

Description

@dineshpinto
  • Description: Integrate Flare AI Kit with n8n, a leading workflow automation tool. This will empower users to build powerful, event-driven applications using a low-code/no-code interface. By exposing the SDK's functionalities through a simple API, we can connect on-chain data, TEE operations, and AI-driven tasks to hundreds of other web services and triggers available in the n8n ecosystem.
    The core of this integration will be a lightweight FastAPI wrapper service that exposes key functions from the Flare AI Kit as HTTP endpoints. n8n workflows will then call these endpoints to perform specialized tasks.
  • Acceptance Criteria:
    • A FastAPI service is created that wraps the Flare AI Kit, providing a stable API interface.
    • The API exposes key SDK functionalities, such as:
      • Fetching FTSO price data.
      • Performing a semantic search via the RAG retriever.
      • Performing consensus learning.
      • Posting a message to X (Twitter) or Telegram.
      • Submitting a basic on-chain transaction.
      • Any other functionality you deem necessary
    • The FastAPI wrapper service is containerized using Docker for easy deployment and scalability.
    • At least one custom n8n node (e.g., for FTSO price retrieval) is developed to provide a user-friendly interface within the n8n editor.
    • Comprehensive documentation is created, detailing:
      • How to run the FastAPI service.
      • How to install and use the custom n8n nodes.
      • An example workflow demonstrating the integration.
  • Key Files/Modules Involved (Tentative):
    • integrations/n8n/fastapi_service/main.py (New file for the API wrapper)
    • integrations/n8n/fastapi_service/Dockerfile (New file for containerizing the service)
    • integrations/n8n/custom_nodes/FlareAiKit/FlareFtsoPrice.node.ts (Example custom n8n node)
    • integrations/n8n/README.md (Setup and usage documentation)
  • Tasks / Implementation Steps:
    • API Design: Define the API endpoints, request bodies (Pydantic models), and response formats for the FastAPI service.
    • FastAPI Service Implementation: Build the wrapper service that initializes the Flare AI Kit and exposes its functionalities through the defined API endpoints.
    • Containerization: Create a Dockerfile for the FastAPI service to ensure a consistent and isolated runtime environment.
    • Custom n8n Node Development: Develop the first custom n8n node in TypeScript to provide a good dev experience for calling a service endpoint.
    • Workflow Creation: Build and export an example workflow.json file that demonstrates how to chain together the custom nodes to perform a meaningful task (e.g., fetch a price and post it to social media).
    • Documentation: Write a detailed README.md for the integrations/n8n directory, guiding users through the entire setup process.
    • Testing: Implement basic tests for the API endpoints and ensure the custom n8n node functions correctly within an n8n instance.

Metadata

Metadata

Assignees

Labels

advanced-featureonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions