Add n8n workflow templates and change webhook port to 8888
Port 8000 was already in use on the host. Updated uvicorn to listen on 8888. Added 6 importable n8n workflow JSON files for Jimi push data forwarding (OBD, faults, alarms, GPS, heartbeats, trips). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
004fed7ab9
commit
2f3879aa2a
7 changed files with 549 additions and 3 deletions
|
|
@ -40,16 +40,16 @@ services:
|
|||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
command: sh -c "python run_migrations.py && uvicorn webhook_receiver_rev:app --host 0.0.0.0 --port 8000 --workers 2"
|
||||
command: sh -c "python run_migrations.py && uvicorn webhook_receiver_rev:app --host 0.0.0.0 --port 8888 --workers 2"
|
||||
restart: always
|
||||
depends_on:
|
||||
timescale_db:
|
||||
condition: service_healthy
|
||||
env_file: .env
|
||||
# No host port binding — Coolify's Traefik proxy routes traffic internally.
|
||||
# Set the webhook domain in Coolify UI pointing to this service on port 8000.
|
||||
# Set the webhook domain in Coolify UI pointing to this service on port 8888.
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8888/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
|
|
|||
91
n8n-workflows/jimi_pushalarm.json
Normal file
91
n8n-workflows/jimi_pushalarm.json
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"name": "Jimi Alarm Push",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "pushalarm",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "webhook-pushalarm",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [260, 300],
|
||||
"webhookId": "pushalarm"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ JSON.stringify({\"code\": 0, \"msg\": \"success\"}) }}",
|
||||
"options": {}
|
||||
},
|
||||
"id": "respond-pushalarm",
|
||||
"name": "Respond to Jimi",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [480, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://tshook.rahamafresh.com/pushalarm",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "token",
|
||||
"value": "={{ $('Webhook').item.json.body.token }}"
|
||||
},
|
||||
{
|
||||
"name": "data_list",
|
||||
"value": "={{ $('Webhook').item.json.body.data_list }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"timeout": 30000
|
||||
}
|
||||
},
|
||||
"id": "http-pushalarm",
|
||||
"name": "Forward to Webhook Receiver",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [700, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Jimi",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Respond to Jimi": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Forward to Webhook Receiver",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Jimi Tracksolid"
|
||||
}
|
||||
]
|
||||
}
|
||||
91
n8n-workflows/jimi_pushfaultinfo.json
Normal file
91
n8n-workflows/jimi_pushfaultinfo.json
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"name": "Jimi Fault Code Push",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "pushfaultinfo",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "webhook-pushfaultinfo",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [260, 300],
|
||||
"webhookId": "pushfaultinfo"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ JSON.stringify({\"code\": 0, \"msg\": \"success\"}) }}",
|
||||
"options": {}
|
||||
},
|
||||
"id": "respond-pushfaultinfo",
|
||||
"name": "Respond to Jimi",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [480, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://tshook.rahamafresh.com/pushfaultinfo",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "token",
|
||||
"value": "={{ $('Webhook').item.json.body.token }}"
|
||||
},
|
||||
{
|
||||
"name": "data_list",
|
||||
"value": "={{ $('Webhook').item.json.body.data_list }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"timeout": 30000
|
||||
}
|
||||
},
|
||||
"id": "http-pushfaultinfo",
|
||||
"name": "Forward to Webhook Receiver",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [700, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Jimi",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Respond to Jimi": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Forward to Webhook Receiver",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Jimi Tracksolid"
|
||||
}
|
||||
]
|
||||
}
|
||||
91
n8n-workflows/jimi_pushgps.json
Normal file
91
n8n-workflows/jimi_pushgps.json
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"name": "Jimi GPS Push",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "pushgps",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "webhook-pushgps",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [260, 300],
|
||||
"webhookId": "pushgps"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ JSON.stringify({\"code\": 0, \"msg\": \"success\"}) }}",
|
||||
"options": {}
|
||||
},
|
||||
"id": "respond-pushgps",
|
||||
"name": "Respond to Jimi",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [480, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://tshook.rahamafresh.com/pushgps",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "token",
|
||||
"value": "={{ $('Webhook').item.json.body.token }}"
|
||||
},
|
||||
{
|
||||
"name": "data_list",
|
||||
"value": "={{ $('Webhook').item.json.body.data_list }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"timeout": 30000
|
||||
}
|
||||
},
|
||||
"id": "http-pushgps",
|
||||
"name": "Forward to Webhook Receiver",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [700, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Jimi",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Respond to Jimi": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Forward to Webhook Receiver",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Jimi Tracksolid"
|
||||
}
|
||||
]
|
||||
}
|
||||
91
n8n-workflows/jimi_pushhb.json
Normal file
91
n8n-workflows/jimi_pushhb.json
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"name": "Jimi Heartbeat Push",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "pushhb",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "webhook-pushhb",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [260, 300],
|
||||
"webhookId": "pushhb"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ JSON.stringify({\"code\": 0, \"msg\": \"success\"}) }}",
|
||||
"options": {}
|
||||
},
|
||||
"id": "respond-pushhb",
|
||||
"name": "Respond to Jimi",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [480, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://tshook.rahamafresh.com/pushhb",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "token",
|
||||
"value": "={{ $('Webhook').item.json.body.token }}"
|
||||
},
|
||||
{
|
||||
"name": "data_list",
|
||||
"value": "={{ $('Webhook').item.json.body.data_list }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"timeout": 30000
|
||||
}
|
||||
},
|
||||
"id": "http-pushhb",
|
||||
"name": "Forward to Webhook Receiver",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [700, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Jimi",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Respond to Jimi": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Forward to Webhook Receiver",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Jimi Tracksolid"
|
||||
}
|
||||
]
|
||||
}
|
||||
91
n8n-workflows/jimi_pushobd.json
Normal file
91
n8n-workflows/jimi_pushobd.json
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"name": "Jimi OBD Push",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "pushobd",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "webhook-pushobd",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [260, 300],
|
||||
"webhookId": "pushobd"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ JSON.stringify({\"code\": 0, \"msg\": \"success\"}) }}",
|
||||
"options": {}
|
||||
},
|
||||
"id": "respond-pushobd",
|
||||
"name": "Respond to Jimi",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [480, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://tshook.rahamafresh.com/pushobd",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "token",
|
||||
"value": "={{ $('Webhook').item.json.body.token }}"
|
||||
},
|
||||
{
|
||||
"name": "data_list",
|
||||
"value": "={{ $('Webhook').item.json.body.data_list }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"timeout": 30000
|
||||
}
|
||||
},
|
||||
"id": "http-pushobd",
|
||||
"name": "Forward to Webhook Receiver",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [700, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Jimi",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Respond to Jimi": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Forward to Webhook Receiver",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Jimi Tracksolid"
|
||||
}
|
||||
]
|
||||
}
|
||||
91
n8n-workflows/jimi_pushtripreport.json
Normal file
91
n8n-workflows/jimi_pushtripreport.json
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"name": "Jimi Trip Report Push",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "pushtripreport",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "webhook-pushtripreport",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [260, 300],
|
||||
"webhookId": "pushtripreport"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ JSON.stringify({\"code\": 0, \"msg\": \"success\"}) }}",
|
||||
"options": {}
|
||||
},
|
||||
"id": "respond-pushtripreport",
|
||||
"name": "Respond to Jimi",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [480, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"method": "POST",
|
||||
"url": "https://tshook.rahamafresh.com/pushtripreport",
|
||||
"sendBody": true,
|
||||
"contentType": "form-urlencoded",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "token",
|
||||
"value": "={{ $('Webhook').item.json.body.token }}"
|
||||
},
|
||||
{
|
||||
"name": "data_list",
|
||||
"value": "={{ $('Webhook').item.json.body.data_list }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"timeout": 30000
|
||||
}
|
||||
},
|
||||
"id": "http-pushtripreport",
|
||||
"name": "Forward to Webhook Receiver",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [700, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Jimi",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Respond to Jimi": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Forward to Webhook Receiver",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Jimi Tracksolid"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue