Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.Hi, I need more information about how to use the new feature Human Input node. There are 2 Delivery Method,
2. Additional context or commentsNo response |
Replies: 2 comments 1 reply
|
Hi! Here's the info you need about the Human Input Node: 1. API for Approve/RejectYes, you can programmatically approve or reject requests via API. Submit the form using: POST {
"inputs": {
"field_name": "value"
},
"action": "action_id"
}The 2. Email SMTP ConfigurationEmail delivery requires configuring SMTP via environment variables (not in the UI). Add these to your MAIL_TYPE=smtp
MAIL_DEFAULT_SEND_FROM=your-email@example.com
SMTP_SERVER=smtp.your-provider.com
SMTP_PORT=465
SMTP_USERNAME=your-username
SMTP_PASSWORD=your-password
SMTP_USE_TLS=trueSee the full list in docker/.env.example. Note: If you're self-hosting, ensure you have a Celery worker listening on the To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
Human Input Node requires both API setup and SMTP configuration. 1. API Approval/Rejection: Yes, you can call API to approve/reject: # Get pending human input
GET /api/workflows/{workflow_run_id}
# Approve
POST /api/workflows/{workflow_run_id}/human-input
{
"action": "approve",
"inputs": {"comment": "Approved by API"}
}
# Reject
POST /api/workflows/{workflow_run_id}/human-input
{
"action": "reject",
"reason": "Not meeting criteria"
}2. SMTP Configuration: Configure in docker-compose.yml or .env: # docker-compose.yml
services:
api:
environment:
- MAIL_TYPE=smtp
- SMTP_SERVER=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USERNAME=your-email@gmail.com
- SMTP_PASSWORD=your-app-password
- SMTP_USE_TLS=true
- MAIL_DEFAULT_SEND_FROM=your-email@gmail.comOr in .env file: MAIL_TYPE=smtp
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_USE_TLS=true
MAIL_DEFAULT_SEND_FROM=your-email@gmail.comFor Gmail:
After config: docker-compose restart api workerWe deploy Dify with human-in-the-loop workflows at Revolution AI — SMTP config is required for email delivery. |
Hi! Here's the info you need about the Human Input Node:
1. API for Approve/Reject
Yes, you can programmatically approve or reject requests via API. Submit the form using:
POST
/api/form/human_input/<form_token>{ "inputs": { "field_name": "value" }, "action": "action_id" }The
actionfield corresponds to the action ID (e.g., approve/reject) configured in your node. You can get the form token and pause details fromGET /console/api/workflow/<workflow_run_id>/pause-details.2. Email SMTP Configuration
Email delivery requires configuring SMTP via environment variables (not in the UI). Add these to your
.envfile or Docker environment: