n8n-nodes-viahuman
v1.0.0
Published
n8n node for ViaHuman - Add mobile approval gates/triggers to your workflows
Maintainers
Readme
n8n-nodes-viahuman
This is an n8n community node that lets you add custom mobile approval gates or triggers to your n8n workflows using ViaHuman.
n8n is a fair-code licensed workflow automation platform.
ViaHuman is a mobile-first approval gateway that lets you add human-in-the-loop approvals to any automation workflow.
Table of Contents
Installation
Follow the installation guide in the n8n community nodes documentation.
Manual Installation
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-viahumanin Enter npm package name - Agree to the risks and click Install
After installation, restart n8n to see the ViaHuman node.
Using npm
npm install n8n-nodes-viahumanCredentials
You need an ViaHuman API key to use this node:
- Sign up at viahuman.xyz
- Go to Dashboard → API Keys
- Create a new API key
- Copy the key (starts with
vh_live_orvh_test_)
In n8n:
- Go to Credentials → New
- Search for "ViaHuman API"
- Paste your API key
- Save
Operations
The ViaHuman node supports the following operations:
Create Approval
Create a new approval request and optionally wait for a response.
Parameters:
- Title (required): Title of the approval request
- Description: Detailed description
- Context: JSON object with additional data to display
- Input Type: Type of user input required
- None (Simple approve/reject)
- Text Input
- Number Input
- Select Options
- Image Upload
- Actions: Comma-separated action buttons (e.g.,
approve,reject,edit) - Timeout: How long to wait before timing out (in seconds)
- Wait for Response: Whether to pause workflow until user responds
- Polling Interval: How often to check for response (in seconds)
Input Type Configurations:
Text Input:
- Placeholder text
- Multiline (true/false)
- Max length
- Default value
- Required (true/false)
Number Input:
- Label
- Minimum value
- Maximum value
- Step increment
- Currency code
- Default value
- Required (true/false)
Select Options:
- Label
- Options (value, label, description)
- Required (true/false)
Image Upload:
- Required (true/false)
Get Approval
Get the current status of an approval request.
Parameters:
- Approval ID (required): The ID of the approval request
Cancel Approval
Cancel a pending approval request.
Parameters:
- Approval ID (required): The ID of the approval request
Usage Examples
Example 1: Simple Approve/Reject
Use Case: AI generates an email response, needs human approval before sending.
[Gmail Trigger: New Email]
↓
[OpenAI: Generate Response]
↓
[ViaHuman Node]
- Title: "Review AI-generated email"
- Description: "Customer inquiry about refund"
- Input Type: None
- Actions: approve,reject
- Wait for Response: true
↓
[IF Node: Check approval.response_action]
↓ (if approved)
[Gmail: Send Reply]Example 2: Text Input (Editable Content)
Use Case: AI generates social media post, user can edit before publishing.
[Schedule Trigger: Daily 9 AM]
↓
[RSS: Get Latest Blog Post]
↓
[OpenAI: Generate Social Post]
↓
[ViaHuman Node]
- Title: "Review social media post"
- Description: "Generated from blog article"
- Input Type: Text Input
- Placeholder: "Edit the post..."
- Multiline: true
- Max Length: 280
- Default Value: {{ $json.generated_post }}
- Actions: approve,edit,reject
- Wait for Response: true
↓
[Twitter: Post Tweet]
- Text: {{ $json.response_input || $json.generated_post }}Example 3: Number Input (Budget Approval)
Use Case: AI analyzes customer request, suggests quote, needs approval.
[Webhook: New Quote Request]
↓
[OpenAI: Analyze Requirements]
↓
[Calculate Base Price]
↓
[ViaHuman Node]
- Title: "Approve project quote"
- Description: "Website redesign for {{ $json.customer }}"
- Context: {
"customer": "{{ $json.customer }}",
"estimated_hours": "{{ $json.hours }}",
"ai_recommendation": "{{ $json.recommended_price }}"
}
- Input Type: Number Input
- Label: "Final quote amount"
- Min: 5000
- Max: 50000
- Step: 500
- Currency: USD
- Default Value: {{ $json.recommended_price }}
- Actions: approve,adjust,reject
- Wait for Response: true
↓
[HubSpot: Create Quote]
- Amount: {{ $json.response_input }}Example 4: Select Options (Deployment Environment)
Use Case: Code passed tests, choose which environment to deploy to.
[GitHub Webhook: PR Merged]
↓
[Run Tests]
↓
[Build Docker Image]
↓
[ViaHuman Node]
- Title: "Choose deployment environment"
- Description: "PR #{{ $json.pr_number }} - {{ $json.pr_title }}"
- Context: {
"pr_number": "{{ $json.pr_number }}",
"author": "{{ $json.author }}",
"tests_passed": true
}
- Input Type: Select Options
- Options:
[
{ value: "staging", label: "Staging", description: "Test environment" },
{ value: "production", label: "Production", description: "Live site" },
{ value: "canary", label: "Canary", description: "10% traffic" }
]
- Actions: deploy,skip
- Wait for Response: true
↓
[Deploy to {{ $json.response_input }}]Example 5: Image Upload
Use Case: Approve expense by uploading receipt photo.
[Webhook: Expense Claim]
↓
[ViaHuman Node]
- Title: "Approve expense claim"
- Description: "{{ $json.employee }} - {{ $json.category }}"
- Context: {
"employee": "{{ $json.employee }}",
"amount": "{{ $json.amount }}",
"category": "{{ $json.category }}"
}
- Input Type: Image Upload
- Required: true
- Actions: approve,reject
- Wait for Response: true
↓
[QuickBooks: Create Expense]
- Receipt URL: {{ $json.response_input }}Response Data
When an approval is completed, the node returns:
{
"id": "apr_xxxxxxxxxx",
"status": "approved",
"response_action": "approve",
"response_input": "User's input (if any)",
"response_comment": "Optional comment",
"responded_at": "2024-12-13T12:34:56Z",
"created_at": "2024-12-13T12:00:00Z",
"expires_at": "2024-12-13T13:00:00Z",
"title": "Review AI-generated email",
"description": "Customer inquiry about refund",
"context": { ... }
}You can use this data in subsequent nodes:
{{ $json.response_action }}- Which action was taken{{ $json.response_input }}- User's input (text, number, selection, or image URL){{ $json.response_comment }}- Optional comment{{ $json.status }}- Final status (approved, rejected, timeout)
Tips & Best Practices
1. Set Appropriate Timeouts
// For quick decisions (email review)
timeout_seconds: 1800 // 30 minutes
// For budget approvals
timeout_seconds: 14400 // 4 hours
// For end-of-day reviews
timeout_seconds: 86400 // 24 hours2. Provide Rich Context
Help users make informed decisions:
{
"context": {
"customer_email": "[email protected]",
"customer_name": "John Smith",
"order_value": "$1,250",
"customer_since": "2023-01-15",
"total_orders": 12,
"ai_confidence": "85%"
}
}3. Use Meaningful Action Names
Instead of just approve,reject, use domain-specific actions:
// Lead qualification
actions: "book_demo,send_email,add_to_nurture,disqualify"
// Content review
actions: "publish,schedule,edit,reject"
// Deployment
actions: "deploy,rollback,skip"4. Branch Based on Response
[ViaHuman Node]
↓
[IF Node]
- If {{ $json.response_action }} === "approve"
→ [Path A: Approve workflow]
- If {{ $json.response_action }} === "reject"
→ [Path B: Rejection workflow]
- If {{ $json.response_action }} === "edit"
→ [Path C: Revision workflow]5. Handle Timeouts
[ViaHuman Node]
↓
[IF Node]
- If {{ $json.status }} === "timeout"
→ [Send Slack Alert]
→ [Assign to Manager]Compatibility
Tested with:
- n8n version 1.0.0+
- Node.js 18.x+
Resources
Support
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Made with ❤️ for the n8n viahuman
