n8n_client 0.1.0 copy "n8n_client: ^0.1.0" to clipboard
n8n_client: ^0.1.0 copied to clipboard

A Dart client for interacting with the n8n Public API, built by Spinex IO.

example/example.dart

// example/example.dart

import 'package:n8n_client/n8n_client.dart';

void main() async {
  final client = N8NClient(
    baseUrl: 'https://your-n8n-instance.com/api/v1',
    apiKey: 'your-api-key-here',
  );

  try {
    // Example: Retrieve all workflows
    final workflowsResponse = await client.workflows.getWorkflows(limit: 10);
    print('Workflows: ${workflowsResponse.data}');

    // Example: Create a new variable
    final newVariable = {
      'key': 'ENV_MODE',
      'value': 'production',
    };
    final variableResponse = await client.variables.createVariable(newVariable);
    print('Created Variable: ${variableResponse.data}');
  } catch (e) {
    print('Error: $e');
  }
}
1
likes
130
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart client for interacting with the n8n Public API, built by Spinex IO.

Documentation

API reference

License

MIT (license)

Dependencies

dio

More

Packages that depend on n8n_client