Description
n8n-nodes-gravity
Official n8n nodes for Gravity AI – Build AI workflows with ease.
Features
- 🤖 Multiple AI Models – Claude (via AWS Bedrock), OpenAI GPT-4, and more
- 📡 Real-time Communication – Seamless integration with Gravity's event-driven architecture
- 🔄 Streaming Support – Handle streaming responses from AI models
- 🎯 Type-Safe – Full TypeScript support with comprehensive type definitions
- 🔧 Easy Setup – Simple credential configuration
Installation
Community Nodes (Recommended)
- In n8n, go to Settings > Community Nodes
- Select Install
- Enter
https://github.com/gravityai-dev/n8n-nodes-gravity - Click Install
Manual Installation
npm install -g @gravityai-dev/n8n-nodes-gravity
Then restart n8n.
Quick Start
1. Configure Credentials
Add your Gravity API credentials:
- Go to Credentials > New
- Select Gravity API
- Enter your server URL and API key
- Save
2. Create Your First Workflow
- Add a Gravity Input node to receive messages
- Process with Gravity Claude or Gravity OpenAI
- Send responses with Gravity Output
Available Nodes
🎯 Gravity Input
Entry point for Gravity messages in your workflows.
Outputs:
chatId– Unique chat identifierconversationId– Conversation thread IDuserId– User identifiermessage– Incoming message textmetadata– Additional context
🤖 Gravity Claude
Process messages with Claude AI via AWS Bedrock.
Inputs:
message– Text to processsystemPrompt– System instructionsmodel– Claude model versiontemperature– Response creativity (0-1)maxTokens– Maximum response length
Outputs:
response– Claude's responseusage– Token usage statistics
🧠 Gravity OpenAI
Process messages with OpenAI's GPT models.
Inputs:
message– Text to processsystemPrompt– System instructionsmodel– GPT model versiontemperature– Response creativity (0-1)
Outputs:
response– GPT's responseusage– Token usage statistics
📤 Gravity Output
Send responses back to Gravity.
Message Types:
text– Simple text responsejson– Structured datamdx– Rich markdown componentsimage– Image responsestool– Tool/function outputsaction– Suggested actions
📊 Gravity Update
Send progress updates during processing.
Inputs:
message– Status messageprogress– Progress percentage (0-100)state– Current state
🔍 Gravity Embed
Generate embeddings for semantic search.
Inputs:
text– Text to embedmodel– Embedding model
Outputs:
embedding– Vector representationdimensions– Vector size
Example Workflows
Basic Chat Assistant
[Gravity Input] → [Gravity Claude] → [Gravity Output]
Multi-Model Comparison
[Gravity Input] → [Split]
├→ [Gravity Claude] → [Merge]
└→ [Gravity OpenAI] → [Merge] → [Gravity Output]
Document Processing
[Gravity Input] → [Extract Text] → [Gravity Embed] → [Vector Store] → [Gravity Output]
AWS Bedrock Setup
To use Gravity Claude nodes:
- Create AWS credentials in n8n
- Ensure your AWS account has Bedrock access
- Enable Claude models in your region
Best Practices
- Error Handling: Always add error outputs to handle failures gracefully
- Progress Updates: Use Gravity Update nodes for long-running processes
- Metadata: Include relevant metadata in responses for better tracking
- Streaming: Enable streaming for better user experience with long responses
Support
- 📧 Email: support@gravityai.dev
- 💬 Discord: Join our community
- 📚 Docs: Full documentation
- 🐛 Issues: GitHub Issues
License
MIT – See LICENSE file for details
Built with ❤️ by the Gravity AI Team