n8n Integration
Use HTTP Request nodes to send notifications and receive responses from your n8n workflows.
Simple Notification
Add an HTTP Request node with:
| Setting | Value |
|---|---|
| Method | POST |
| URL | https://ping-api-production.up.railway.app/v1/send/YOUR_TOKEN |
| Body Content Type | JSON |
Body:
JSON
{
"title": "Workflow Complete",
"body": "{{ $json.summary }}",
"priority": "normal"
}Preview
Workflow Complete
just now{{ $json.summary }}
Dynamic Content
Use n8n expressions to include workflow data:
JSON
{
"title": "New Lead: {{ $json.name }}",
"body": "Email: {{ $json.email }}\nCompany: {{ $json.company }}",
"actions": [
{"type": "url", "label": "View Lead", "value": "{{ $json.crm_url }}"}
]
}Preview
New Lead: {{ $json.name }}
just nowEmail: {{ $json.email }} Company: {{ $json.company }}
Bidirectional Workflow (Ping it Back)
Create human-in-the-loop workflows where n8n waits for your mobile response.
Workflow Structure
Trigger → Send Ping → Loop (Poll for Response) → Branch on Result
Step 1: Send Notification with Buttons
HTTP Request node:
| Setting | Value |
|---|---|
| Method | POST |
| URL | https://ping-api-production.up.railway.app/v1/send/YOUR_TOKEN |
Body:
JSON
{
"title": "Approve Purchase Order",
"body": "{{ $json.vendor }} - ${{ $json.amount }}",
"priority": "high",
"actions": [
{"type": "button", "label": "Approve", "key": "approve", "style": "primary"},
{"type": "button", "label": "Reject", "key": "reject", "style": "destructive"}
]
}Preview
Approve Purchase Order
just now{{ $json.vendor }} - ${{ $json.amount }}
Step 2: Loop Node (Poll for Response)
Add a Loop node that polls until a response is received:
| Setting | Value |
|---|---|
| Loop Type | While |
| Condition | {{ $json.status === 'pending' }} |
| Max Iterations | 100 |
| Delay | 3000ms |
Inside the loop, add an HTTP Request:
| Setting | Value |
|---|---|
| Method | GET |
| URL | https://ping-api-production.up.railway.app/v1/callback/YOUR_TOKEN/{{ $('Send Ping').item.json.id }} |
Step 3: Branch on Response
Add an IF node:
| Condition | {{ $json.result.triggered_by === 'approve' }} |
|---|
Then route to "Approved" or "Rejected" branches.
Use Cases
- Purchase order approvals - Route to payment processing or rejection
- Access request workflows - Grant or deny permissions
- Content moderation - Publish or flag content
- Escalation confirmations - Acknowledge alerts
Error Notifications
Add an Error Trigger workflow to notify on failures:
- Create a new workflow with Error Trigger
- Add HTTP Request node to send notification
- Include error details in the body:
JSON
{
"title": "Workflow Failed",
"body": "{{ $json.workflow.name }}: {{ $json.execution.error.message }}",
"priority": "high",
"actions": [
{"type": "url", "label": "View Execution", "value": "{{ $json.execution.url }}"}
]
}Preview
Workflow Failed
just now{{ $json.workflow.name }}: {{ $json.execution.error.message }}