Upload files to "ELO"
Verkrijgt statussen van de Franse Douane en verstuurd feedback naar Transpas
This commit is contained in:
1 parent
e950a069ca
commit
fd27956fe5
1 file changed
+773
@@ -0,0 +1,773 @@
|
||||
{
|
||||
"name": "ELO - Callback API - Transpas result processing",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "elo-callback/enveloppe/Reponses",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "74faad43-f245-4999-8b8f-2209a53f9026",
|
||||
"name": "Webhook - ELO Reponses",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1568,
|
||||
-48
|
||||
],
|
||||
"webhookId": "0b1172b7-b25a-4726-a5e5-2e25605f6ba4"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "WITH request_match AS (\n SELECT r.id\n FROM public.elo_envelope_request r\n WHERE\n ($1 IS NOT NULL AND r.correlation_id = $1)\n OR (\n NULLIF($4::text, '') IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,numeroDossier}', '') = NULLIF($4::text, '')\n )\n OR (\n NULLIF($5::text, '') IS NOT NULL\n AND (\n NULLIF(r.elo_reference, '') = NULLIF($5::text, '')\n OR NULLIF(r.result_body #>> '{enveloppe,jeton}', '') = NULLIF($5::text, '')\n )\n )\n OR (\n NULLIF($6::text, '') IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,numeroDossier}', '') = NULLIF($6::text, '')\n )\n ORDER BY\n CASE\n WHEN $1 IS NOT NULL AND r.correlation_id = $1 THEN 0\n WHEN NULLIF($4::text, '') IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,numeroDossier}', '') = NULLIF($4::text, '') THEN 1\n WHEN NULLIF($5::text, '') IS NOT NULL\n AND NULLIF(r.elo_reference, '') = NULLIF($5::text, '') THEN 2\n WHEN NULLIF($5::text, '') IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,jeton}', '') = NULLIF($5::text, '') THEN 3\n WHEN NULLIF($6::text, '') IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,numeroDossier}', '') = NULLIF($6::text, '') THEN 4\n ELSE 9\n END,\n r.id DESC\n LIMIT 1\n),\nupserted AS (\n INSERT INTO public.elo_callback_inbox (\n request_id,\n correlation_id,\n message_code,\n message_id,\n functional_id,\n headers,\n body,\n full_json,\n elo_reference,\n callback_status,\n pdf_base64,\n pdf_filename\n )\n VALUES (\n (SELECT id FROM request_match),\n $1,\n $2,\n $3,\n $4,\n $8::jsonb,\n $9::jsonb,\n $10::jsonb,\n COALESCE(NULLIF($5::text, ''), NULLIF($6::text, '')),\n NULLIF($7::text, ''),\n NULLIF($11::text, ''),\n NULLIF($12::text, '')\n )\n ON CONFLICT (correlation_id, message_code, message_id)\n DO UPDATE SET\n request_id = COALESCE(EXCLUDED.request_id, public.elo_callback_inbox.request_id),\n headers = EXCLUDED.headers,\n body = EXCLUDED.body,\n full_json = EXCLUDED.full_json,\n elo_reference = EXCLUDED.elo_reference,\n callback_status = EXCLUDED.callback_status,\n pdf_base64 = EXCLUDED.pdf_base64,\n pdf_filename = EXCLUDED.pdf_filename,\n updated_at = now()\n RETURNING\n id,\n request_id,\n elo_reference,\n callback_status\n),\nupdated_request AS (\n UPDATE public.elo_envelope_request r\n SET\n status = 'CALLBACK_OK',\n callback_at = now(),\n elo_reference = COALESCE((SELECT elo_reference FROM upserted), r.elo_reference),\n result_status = (SELECT callback_status FROM upserted),\n result_body = $9::jsonb,\n result_available = true,\n updated_at = now()\n WHERE r.id = (SELECT request_id FROM upserted)\n RETURNING r.id\n)\nSELECT\n id,\n request_id,\n elo_reference,\n callback_status\nFROM upserted;",
|
||||
"options": {
|
||||
"queryReplacement": "={{ [\n $json.headers.correlationid || $json.headers.correlationId,\n $json.headers.messagecode || $json.headers.messageCode,\n $json.headers.messageid || $json.headers.messageId,\n $json.headers.functionalid || $json.headers.functionalId,\n $json.body?.enveloppe?.jeton || null,\n $json.body?.enveloppe?.numeroDossier || null,\n $json.body?.enveloppe?.statut || null,\n JSON.stringify($json.headers || {}),\n JSON.stringify($json.body || {}),\n JSON.stringify($json),\n $json.body?.pdf || null,\n $json.body?.enveloppe?.jeton ? ('ELO_' + $json.body.enveloppe.jeton + '_' + ($json.headers.correlationid || $json.headers.correlationId) + '.pdf') : null\n] }}"
|
||||
}
|
||||
},
|
||||
"id": "21137040-58f4-4723-b16e-8580301ed1c4",
|
||||
"name": "PG - Insert Reponses",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"typeVersion": 2.6,
|
||||
"position": [
|
||||
1840,
|
||||
-48
|
||||
],
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "0mT1Cu2z2TS7JEfo",
|
||||
"name": "elo"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ { ok: true, id: $json.id, endpoint: 'Reponses' } }}",
|
||||
"options": {
|
||||
"responseCode": 200
|
||||
}
|
||||
},
|
||||
"id": "c37d91c3-fd52-4ef8-89dd-5411d74ca93d",
|
||||
"name": "Respond - Reponses OK",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.4,
|
||||
"position": [
|
||||
2064,
|
||||
-48
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "elo-callback/enveloppe/Erreur",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "e1b46b05-ba1c-4225-bad8-1ed56de6d552",
|
||||
"name": "Webhook - ELO Erreur",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1568,
|
||||
288
|
||||
],
|
||||
"webhookId": "c493236e-6b22-4a48-9e42-7603ce8ddb4c"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "WITH request_match AS (\n SELECT r.id\n FROM public.elo_envelope_request r\n WHERE\n ($1 IS NOT NULL AND r.correlation_id = $1)\n OR (\n NULLIF($4::text, '') IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,numeroDossier}', '') = NULLIF($4::text, '')\n )\n ORDER BY\n CASE\n WHEN $1 IS NOT NULL AND r.correlation_id = $1 THEN 0\n WHEN NULLIF($4::text, '') IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,numeroDossier}', '') = NULLIF($4::text, '') THEN 1\n ELSE 9\n END,\n r.id DESC\n LIMIT 1\n),\nupserted AS (\n INSERT INTO public.elo_callback_inbox (\n request_id,\n correlation_id,\n message_code,\n message_id,\n functional_id,\n headers,\n body,\n full_json,\n callback_status,\n error_code,\n error_text\n )\n VALUES (\n (SELECT id FROM request_match),\n $1,\n $2,\n $3,\n $4,\n $7::jsonb,\n $8::jsonb,\n $9::jsonb,\n 'ERROR',\n NULLIF($5::text, ''),\n NULLIF($6::text, '')\n )\n ON CONFLICT (correlation_id, message_code, message_id)\n DO UPDATE SET\n request_id = COALESCE(EXCLUDED.request_id, public.elo_callback_inbox.request_id),\n headers = EXCLUDED.headers,\n body = EXCLUDED.body,\n full_json = EXCLUDED.full_json,\n callback_status = EXCLUDED.callback_status,\n error_code = EXCLUDED.error_code,\n error_text = EXCLUDED.error_text,\n updated_at = now()\n RETURNING\n id,\n request_id,\n error_code,\n error_text\n),\nupdated_request AS (\n UPDATE public.elo_envelope_request r\n SET\n status = 'CALLBACK_ERROR',\n callback_at = now(),\n result_status = (SELECT error_code FROM upserted),\n result_body = $8::jsonb,\n result_available = true,\n error_text = (SELECT error_text FROM upserted),\n updated_at = now()\n WHERE r.id = (SELECT request_id FROM upserted)\n RETURNING r.id\n)\nSELECT\n id,\n request_id,\n error_code,\n error_text\nFROM upserted;",
|
||||
"options": {
|
||||
"queryReplacement": "={{ [\n $json.headers.correlationid || $json.headers.correlationId || null,\n $json.headers.messagecode || $json.headers.messageCode || null,\n $json.headers.messageid || $json.headers.messageId || null,\n $json.headers.functionalid || $json.headers.functionalId || null,\n\n $json.body?.informationsErreur?.statut || null,\n $json.body?.informationsErreur?.libelleErreur || null,\n\n JSON.stringify($json.headers || {}),\n JSON.stringify($json.body || {}),\n JSON.stringify($json)\n] }}"
|
||||
}
|
||||
},
|
||||
"id": "fb267a88-942a-44a5-ae4c-a654a7006728",
|
||||
"name": "PG - Insert Erreur",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"typeVersion": 2.6,
|
||||
"position": [
|
||||
1792,
|
||||
288
|
||||
],
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "0mT1Cu2z2TS7JEfo",
|
||||
"name": "elo"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ { ok: true, id: $json.id, endpoint: 'Erreur' } }}",
|
||||
"options": {
|
||||
"responseCode": 200
|
||||
}
|
||||
},
|
||||
"id": "d140bd0b-ec64-4685-8e5b-22487c10b3d3",
|
||||
"name": "Respond - Erreur OK",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.4,
|
||||
"position": [
|
||||
2016,
|
||||
288
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "elo-callback/pending",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "5b5a329f-2962-425a-9e3b-f691cb654c76",
|
||||
"name": "Webhook - Pending",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1568,
|
||||
512
|
||||
],
|
||||
"webhookId": "2250a461-9b44-4d5a-8ad3-30e53832903c"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "const expectedToken = 'D1KYrH24lxP2HZzW8djssqOB';\nconst headers = $json.headers || {};\nconst receivedToken = headers['x-elo-token'] || headers['X-Elo-Token'] || headers['x_elo_token'] || '';\n\nif (receivedToken !== expectedToken) {\n throw new Error('Unauthorized: missing or invalid x-elo-token header');\n}\n\nreturn [{ json: $json }];\n"
|
||||
},
|
||||
"id": "b3de63f2-c548-42f2-93db-325ec883aaa1",
|
||||
"name": "Auth - Pending",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1792,
|
||||
512
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "WITH picked AS (\n SELECT i.id\n FROM public.elo_callback_inbox i\n WHERE i.processed = FALSE\n AND (\n i.locked_at IS NULL\n OR i.locked_at < NOW() - INTERVAL '10 minutes'\n )\n ORDER BY i.created_at\n LIMIT 1\n),\nlocked AS (\n UPDATE public.elo_callback_inbox i\n SET\n locked_at = NOW(),\n updated_at = NOW()\n FROM picked p\n WHERE i.id = p.id\n RETURNING i.*\n),\nmatched_request AS (\n SELECT\n i.id AS callback_id,\n r.id AS request_id,\n CASE\n WHEN i.request_id IS NOT NULL AND r.id = i.request_id THEN 'request_id'\n WHEN i.correlation_id IS NOT NULL AND r.correlation_id = i.correlation_id THEN 'correlation_id'\n WHEN COALESCE(NULLIF(i.body #>> '{enveloppe,numeroDossier}', ''), NULLIF(i.functional_id, '')) IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,numeroDossier}', '') =\n COALESCE(NULLIF(i.body #>> '{enveloppe,numeroDossier}', ''), NULLIF(i.functional_id, ''))\n THEN 'numero_dossier'\n WHEN COALESCE(NULLIF(i.body #>> '{enveloppe,jeton}', ''), NULLIF(i.elo_reference, '')) IS NOT NULL\n AND NULLIF(r.elo_reference, '') =\n COALESCE(NULLIF(i.body #>> '{enveloppe,jeton}', ''), NULLIF(i.elo_reference, ''))\n THEN 'jeton'\n WHEN COALESCE(NULLIF(i.body #>> '{enveloppe,jeton}', ''), NULLIF(i.elo_reference, '')) IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,jeton}', '') =\n COALESCE(NULLIF(i.body #>> '{enveloppe,jeton}', ''), NULLIF(i.elo_reference, ''))\n THEN 'jeton_result_body'\n ELSE 'unknown'\n END AS resolution_source\n FROM locked i\n JOIN public.elo_envelope_request r\n ON (\n (i.request_id IS NOT NULL AND r.id = i.request_id)\n OR (i.correlation_id IS NOT NULL AND r.correlation_id = i.correlation_id)\n OR (\n COALESCE(NULLIF(i.body #>> '{enveloppe,numeroDossier}', ''), NULLIF(i.functional_id, '')) IS NOT NULL\n AND NULLIF(r.result_body #>> '{enveloppe,numeroDossier}', '') =\n COALESCE(NULLIF(i.body #>> '{enveloppe,numeroDossier}', ''), NULLIF(i.functional_id, ''))\n )\n OR (\n COALESCE(NULLIF(i.body #>> '{enveloppe,jeton}', ''), NULLIF(i.elo_reference, '')) IS NOT NULL\n AND (\n NULLIF(r.elo_reference, '') =\n COALESCE(NULLIF(i.body #>> '{enveloppe,jeton}', ''), NULLIF(i.elo_reference, ''))\n OR NULLIF(r.result_body #>> '{enveloppe,jeton}', '') =\n COALESCE(NULLIF(i.body #>> '{enveloppe,jeton}', ''), NULLIF(i.elo_reference, ''))\n )\n )\n )\n),\nbest_request AS (\n SELECT DISTINCT ON (m.callback_id)\n m.callback_id,\n m.request_id,\n m.resolution_source\n FROM matched_request m\n ORDER BY\n m.callback_id,\n CASE m.resolution_source\n WHEN 'request_id' THEN 0\n WHEN 'correlation_id' THEN 1\n WHEN 'numero_dossier' THEN 2\n WHEN 'jeton' THEN 3\n WHEN 'jeton_result_body' THEN 4\n ELSE 9\n END,\n m.request_id DESC\n),\npayload AS (\n SELECT\n i.id AS callback_id,\n COALESCE(br.request_id, i.request_id) AS resolved_request_id,\n br.resolution_source,\n i.request_id AS original_request_id,\n i.correlation_id,\n i.message_code,\n i.message_id,\n i.functional_id,\n i.elo_reference,\n i.callback_status,\n i.pdf_base64,\n i.pdf_filename,\n i.headers,\n i.body,\n i.full_json,\n i.created_at,\n r.crossing_order_nr,\n r.trigger_crossing_status_log_nr,\n r.trip_nr,\n r.trip_id,\n r.truck,\n r.trailer,\n r.transpas_payload,\n r.result_status,\n r.error_text AS request_error_text\n FROM locked i\n LEFT JOIN best_request br\n ON br.callback_id = i.id\n LEFT JOIN public.elo_envelope_request r\n ON r.id = COALESCE(br.request_id, i.request_id)\n)\nSELECT COALESCE(\n (\n SELECT jsonb_build_object(\n 'ok', true,\n 'hasResult', true,\n\n 'id', p.callback_id,\n 'requestId', p.resolved_request_id,\n 'originalRequestId', p.original_request_id,\n 'resolutionSource', COALESCE(p.resolution_source, 'none'),\n\n 'correlationId', p.correlation_id,\n 'messageCode', p.message_code,\n 'messageId', p.message_id,\n 'functionalId', p.functional_id,\n\n 'resultKind',\n CASE\n WHEN p.message_code IN ('ENV_CRE02', 'ENV_MOD02', 'ENV_REC02') THELine truncated
|
||||
"options": {
|
||||
"queryReplacement": "={{ [] }}"
|
||||
}
|
||||
},
|
||||
"id": "bcd2a8a7-7f4d-4852-8249-6112ca70c2be",
|
||||
"name": "PG - Get Pending",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"typeVersion": 2.6,
|
||||
"position": [
|
||||
2016,
|
||||
512
|
||||
],
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "0mT1Cu2z2TS7JEfo",
|
||||
"name": "elo"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ $json }}",
|
||||
"options": {
|
||||
"responseCode": 200
|
||||
}
|
||||
},
|
||||
"id": "930bc318-cd5a-484d-b26d-28de7c396172",
|
||||
"name": "Respond - Pending",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.4,
|
||||
"position": [
|
||||
2464,
|
||||
512
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "elo-callback/ack",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "1ac6c525-d5d6-4328-9c0c-917b4af8e55a",
|
||||
"name": "Webhook - Ack",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1568,
|
||||
736
|
||||
],
|
||||
"webhookId": "582b180c-d1a1-432e-915f-663738ab5f1c"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "const expectedToken = 'D1KYrH24lxP2HZzW8djssqOB';\nconst headers = $json.headers || {};\nconst receivedToken = headers['x-elo-token'] || headers['X-Elo-Token'] || headers['x_elo_token'] || '';\n\nif (receivedToken !== expectedToken) {\n throw new Error('Unauthorized: missing or invalid x-elo-token header');\n}\n\nreturn [{ json: $json }];\n"
|
||||
},
|
||||
"id": "7820c579-590d-4908-ae12-d877c59e75bf",
|
||||
"name": "Auth - Ack",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1792,
|
||||
736
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "WITH cb AS (\n UPDATE public.elo_callback_inbox\n SET\n processed = TRUE,\n processed_at = NOW(),\n locked_at = NULL,\n updated_at = NOW()\n WHERE id = $1::bigint\n RETURNING\n id,\n request_id,\n processed,\n processed_at\n),\nreq AS (\n UPDATE public.elo_envelope_request r\n SET\n status = 'ACKED',\n acked_at = NOW(),\n result_available = FALSE,\n updated_at = NOW()\n FROM cb\n WHERE r.id = cb.request_id\n RETURNING r.id\n)\nSELECT\n cb.id,\n cb.request_id AS \"requestId\",\n cb.processed,\n cb.processed_at AS \"processedAt\"\nFROM cb;",
|
||||
"options": {
|
||||
"queryReplacement": "={{ [ $json.body?.id || $json.id ] }}"
|
||||
}
|
||||
},
|
||||
"id": "338222be-71c3-4929-a86e-60dca031e2ee",
|
||||
"name": "PG - Ack",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"typeVersion": 2.6,
|
||||
"position": [
|
||||
2016,
|
||||
736
|
||||
],
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "0mT1Cu2z2TS7JEfo",
|
||||
"name": "elo"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ { ok: true, result: $json } }}",
|
||||
"options": {
|
||||
"responseCode": 200
|
||||
}
|
||||
},
|
||||
"id": "d315fde9-8542-4529-ab41-b1dbf929ee64",
|
||||
"name": "Respond - Ack",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.4,
|
||||
"position": [
|
||||
2240,
|
||||
736
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "elo-callback/fail",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"id": "c2cac606-7b66-4e91-82f4-3c3ab85c2135",
|
||||
"name": "Webhook - Fail",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1568,
|
||||
960
|
||||
],
|
||||
"webhookId": "64e1d41c-8947-4eda-93d3-8bb03ea0909f"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "const expectedToken = 'D1KYrH24lxP2HZzW8djssqOB';\nconst headers = $json.headers || {};\nconst receivedToken = headers['x-elo-token'] || headers['X-Elo-Token'] || headers['x_elo_token'] || '';\n\nif (receivedToken !== expectedToken) {\n throw new Error('Unauthorized: missing or invalid x-elo-token header');\n}\n\nreturn [{ json: $json }];\n"
|
||||
},
|
||||
"id": "a5a19742-7b71-42aa-93d8-1e5f61a0ba5b",
|
||||
"name": "Auth - Fail",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1792,
|
||||
960
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "WITH target AS (\n SELECT\n i.id,\n i.request_id,\n i.message_code\n FROM public.elo_callback_inbox i\n WHERE i.id = $1::bigint\n),\ncb AS (\n UPDATE public.elo_callback_inbox i\n SET\n processed = CASE\n WHEN t.message_code = 'ENV_NOT01'\n AND $2::text ILIKE 'Kan CrossingOrdernr niet bepalen uit pending callback.%'\n THEN TRUE\n ELSE i.processed\n END,\n processed_at = CASE\n WHEN t.message_code = 'ENV_NOT01'\n AND $2::text ILIKE 'Kan CrossingOrdernr niet bepalen uit pending callback.%'\n THEN NOW()\n ELSE i.processed_at\n END,\n locked_at = NULL,\n updated_at = NOW()\n FROM target t\n WHERE i.id = t.id\n RETURNING\n i.id,\n t.request_id,\n i.processed,\n i.locked_at,\n i.updated_at,\n t.message_code\n),\nreq AS (\n UPDATE public.elo_envelope_request r\n SET\n error_text = LEFT(\n CONCAT(\n COALESCE(NULLIF(r.error_text, '') || ' | ', ''),\n 'Transpas verwerking fout: ',\n $2::text\n ),\n 4000\n ),\n updated_at = NOW()\n FROM cb\n WHERE r.id = cb.request_id\n RETURNING r.id\n)\nSELECT\n cb.id,\n cb.request_id AS \"requestId\",\n cb.processed,\n CASE\n WHEN cb.message_code = 'ENV_NOT01'\n AND $2::text ILIKE 'Kan CrossingOrdernr niet bepalen uit pending callback.%'\n THEN 'ENV_NOT01 kon niet gekoppeld worden; callback is automatisch als verwerkt gemarkeerd'\n ELSE $2::text\n END AS \"processError\",\n cb.updated_at AS \"updatedAt\"\nFROM cb;",
|
||||
"options": {
|
||||
"queryReplacement": "={{ [ $json.body?.id || $json.id, $json.body?.error || $json.error || 'Onbekende fout bij verwerken callback in Transpas' ] }}"
|
||||
}
|
||||
},
|
||||
"id": "87edd638-fdb7-450b-b1ef-3c474e6cfbad",
|
||||
"name": "PG - Fail",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"typeVersion": 2.6,
|
||||
"position": [
|
||||
2016,
|
||||
960
|
||||
],
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "0mT1Cu2z2TS7JEfo",
|
||||
"name": "elo"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ { ok: true, result: $json } }}",
|
||||
"options": {
|
||||
"responseCode": 200
|
||||
}
|
||||
},
|
||||
"id": "ac6bf6cf-2a4c-47a4-85a0-5c452c72b7f2",
|
||||
"name": "Respond - Fail",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.4,
|
||||
"position": [
|
||||
2240,
|
||||
960
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "let result = $json.result ?? { ok: true, hasResult: false };\n\nif (typeof result === 'string') {\n try {\n result = JSON.parse(result);\n } catch (e) {\n result = { ok: false, hasResult: false, error: 'Kon pending result JSON niet parsen' };\n }\n}\n\nreturn [{ json: result }];"
|
||||
},
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
2240,
|
||||
512
|
||||
],
|
||||
"id": "5b3edfd0-5fe9-454e-a5a7-9dbae26f0095",
|
||||
"name": "Format - Pending Response"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "upload",
|
||||
"path": "=/ELO/{{ $('Webhook - ELO Reponses').item.json.headers.correlationid }}.pdf",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.ftp",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
2544,
|
||||
112
|
||||
],
|
||||
"id": "f4a67cbd-3e14-474f-a379-92ab566afefc",
|
||||
"name": "FTP",
|
||||
"credentials": {
|
||||
"ftp": {
|
||||
"id": "oLAZ4OgmkOopMHAq",
|
||||
"name": "FTP De Wit Transport"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "toBinary",
|
||||
"sourceProperty": "=pdf",
|
||||
"options": {
|
||||
"fileName": "={{ $json.ritnummer }} - {{ $json.auto }}.pdf"
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.convertToFile",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
2336,
|
||||
128
|
||||
],
|
||||
"id": "614e7045-233c-4c63-a685-0c4e0b4c50e4",
|
||||
"name": "Convert to File"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict",
|
||||
"version": 3
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "1646d79b-dc4f-4a79-8c0b-c680719f21b8",
|
||||
"leftValue": "={{ !!$json.body?.pdf }}",
|
||||
"rightValue": "",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2.3,
|
||||
"position": [
|
||||
1760,
|
||||
128
|
||||
],
|
||||
"id": "5a9395a2-2c46-41bf-bb2c-722478cadca4",
|
||||
"name": "If1"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "select \n truck as auto,\n trailer as trailer,\n trip_id as ritnummer\nfrom elo_envelope_request\nwhere correlation_id = '{{ $json.headers.correlationid }}'",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"typeVersion": 2.6,
|
||||
"position": [
|
||||
1968,
|
||||
128
|
||||
],
|
||||
"id": "38f52887-a973-4415-bcfa-a6dc133a7c0c",
|
||||
"name": "Execute a SQL query",
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "0mT1Cu2z2TS7JEfo",
|
||||
"name": "elo"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "83f219da-c72b-48b2-8b37-68c1d897e0a0",
|
||||
"name": "pdf",
|
||||
"value": "={{ $('Webhook - ELO Reponses').first().json.body.pdf }}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"includeOtherFields": true,
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [
|
||||
2176,
|
||||
128
|
||||
],
|
||||
"id": "4cdbc2a0-927b-472e-ba39-097ad555718b",
|
||||
"name": "Edit Fields"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "WITH picked AS (\n SELECT i.id\n FROM public.elo_callback_inbox i\n WHERE i.processed = FALSE\n AND (\n i.locked_at IS NULL\n OR i.locked_at < NOW() - INTERVAL '10 minutes'\n )\n ORDER BY i.created_at\n LIMIT 1\n),\nlocked AS (\n UPDATE public.elo_callback_inbox i\n SET\n locked_at = NOW(),\n updated_at = NOW()\n FROM picked p\n WHERE i.id = p.id\n RETURNING i.*\n),\npayload AS (\n SELECT\n i.id AS callback_id,\n i.request_id,\n i.correlation_id,\n i.message_code,\n i.message_id,\n i.functional_id,\n i.elo_reference,\n i.callback_status,\n i.pdf_base64,\n i.pdf_filename,\n i.headers,\n i.body,\n i.full_json,\n i.created_at,\n r.crossing_order_nr,\n r.trigger_crossing_status_log_nr,\n r.trip_nr,\n r.trip_id,\n r.truck,\n r.trailer,\n r.transpas_payload,\n r.result_status,\n r.error_text AS request_error_text\n FROM locked i\n LEFT JOIN public.elo_envelope_request r\n ON r.id = i.request_id\n)\nSELECT COALESCE(\n (\n SELECT jsonb_build_object(\n 'ok', true,\n 'hasResult', true,\n\n 'id', p.callback_id,\n 'requestId', p.request_id,\n 'correlationId', p.correlation_id,\n 'messageCode', p.message_code,\n 'messageId', p.message_id,\n 'functionalId', p.functional_id,\n\n 'resultKind',\n CASE\n WHEN p.message_code IN ('ENV_CRE02', 'ENV_MOD02', 'ENV_REC02') THEN 'OK'\n WHEN p.message_code IN ('ENV_CRE03', 'ENV_MOD03', 'ENV_REC03')\n OR p.body ? 'informationsErreur' THEN 'ERROR'\n ELSE 'UNKNOWN'\n END,\n\n 'eloReference', p.elo_reference,\n 'callbackStatus', p.callback_status,\n\n 'errorCode', NULLIF(p.body #>> '{informationsErreur,statut}', ''),\n 'errorText', COALESCE(\n NULLIF(p.body #>> '{informationsErreur,libelleErreur}', ''),\n p.request_error_text\n ),\n\n 'pdfBase64', p.pdf_base64,\n 'pdfFileName', p.pdf_filename,\n\n 'crossingOrderNr', p.crossing_order_nr,\n 'crossingStatusLogNr', COALESCE(\n p.trigger_crossing_status_log_nr,\n NULLIF(p.transpas_payload->>'crossingStatusLogNr', '')::integer,\n NULLIF(p.transpas_payload #>> '{triggerInfo,crossingStatusLogNr}', '')::integer\n ),\n\n 'tripNr', COALESCE(\n p.trip_nr,\n NULLIF(p.transpas_payload #>> '{trip,tripNr}', '')::integer,\n NULLIF(p.transpas_payload->>'tripNr', '')::integer,\n NULLIF(p.transpas_payload #>> '{triggerInfo,tripNr}', '')::integer\n ),\n 'tripId', COALESCE(\n NULLIF(p.trip_id, ''),\n NULLIF(p.transpas_payload #>> '{trip,tripId}', ''),\n NULLIF(p.transpas_payload->>'tripId', ''),\n NULLIF(p.transpas_payload #>> '{triggerInfo,tripId}', '')\n ),\n\n 'truckId', COALESCE(\n NULLIF(p.truck, ''),\n NULLIF(p.transpas_payload #>> '{resources,truckId}', ''),\n NULLIF(p.transpas_payload->>'truckId', '')\n ),\n 'truckDescription', COALESCE(\n NULLIF(p.transpas_payload #>> '{resources,truckDescription}', ''),\n NULLIF(p.transpas_payload->>'truckDescription', '')\n ),\n\n 'trailerId', COALESCE(\n NULLIF(p.trailer, ''),\n NULLIF(p.transpas_payload #>> '{resources,trailerId}', ''),\n NULLIF(p.transpas_payload->>'trailerId', '')\n ),\n 'trailerDescription', COALESCE(\n NULLIF(p.transpas_payload #>> '{resources,trailerDescription}', ''),\n NULLIF(p.transpas_payload->>'trailerDescription', '')\n ),\n\n 'driverId', COALESCE(\n NULLIF(p.transpas_payload #>> '{resources,driverId}', ''),\n NULLIF(p.transpas_payload->>'driverId', '')\n ),\n 'driverDescription', COALESCE(\n NULLIF(p.transpas_payload #>> '{resources,driverDescription}', ''),\n NULLIF(p.transpas_payload->>'driverDescription', '')\n ),\n\n 'callbackBody', p.body,\n 'callbackJson', p.full_json,\n 'transpasPayload', p.transpas_payload,\n 'receivedAt', p.created_at\n )\n FROM payload p\n LIMIT 1\n ),\n jsonb_build_object(\n 'ok', true,\n 'hasResult', false\n )\n) AS result;",
|
||||
"options": {
|
||||
"queryReplacement": "={{ [] }}"
|
||||
}
|
||||
},
|
||||
"id": "87f25088-0bb7-49b4-a74e-0292ca3b4777",
|
||||
"name": "PG - Get Pending1",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"typeVersion": 2.6,
|
||||
"position": [
|
||||
2800,
|
||||
528
|
||||
],
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "0mT1Cu2z2TS7JEfo",
|
||||
"name": "elo"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"Webhook - ELO Reponses": [
|
||||
{
|
||||
"json": {
|
||||
"headers": {
|
||||
"connection": "Keep-Alive",
|
||||
"host": "n8n.tmsconnector.nl",
|
||||
"x-forwarded-scheme": "https",
|
||||
"x-forwarded-proto": "https",
|
||||
"x-forwarded-for": "185.24.187.203",
|
||||
"x-real-ip": "185.24.187.203",
|
||||
"content-length": "53581",
|
||||
"messagecode": "ENV_CRE02",
|
||||
"messageid": "eff0e667-70fd-49e5-b081-0d3185b46ae0",
|
||||
"accept": "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*",
|
||||
"accept-charset": "iso-8859-1,*,utf-8",
|
||||
"authorization": "Bearer pleaseinsertyourtokenhere",
|
||||
"functionalid": "B202606161814264595U",
|
||||
"content-type": "application/json",
|
||||
"correlationid": "ELO-MOA-10269-V1-470f9b2823bd",
|
||||
"accept-encoding": "gzip",
|
||||
"user-agent": "Apache-HttpClient/4.5.13 (Java/11.0.15)"
|
||||
},
|
||||
"params": {},
|
||||
"query": {},
|
||||
"body": {
|
||||
"enveloppe": {
|
||||
"jeton": "EE202606161815014596K",
|
||||
"numeroDossier": "B202606161814264595U",
|
||||
"statut": "FERMEE",
|
||||
"modeCreation": "EDI",
|
||||
"informationsAppairage": {
|
||||
"sensTraversee": "EXPORT",
|
||||
"typeCamion": "PLEIN",
|
||||
"estTIRATA": false,
|
||||
"possedeContratTransport": false,
|
||||
"estPostal": false,
|
||||
"estSPS": false,
|
||||
"estProduitPeche": false,
|
||||
"estEmballageVide": false
|
||||
},
|
||||
"declarations": [
|
||||
{
|
||||
"identifiant": "26NL4ZE83WLZ030DA9",
|
||||
"typeDeclaration": "SDS_INDETERMINE",
|
||||
"informationsValidation": {
|
||||
"etat": "DETOURNEMENT",
|
||||
"code": "ENV_E03_MSG32",
|
||||
"message": "Attention : Cette déclaration ne comporte pas de bureau de sortie français."
|
||||
}
|
||||
}
|
||||
],
|
||||
"nombreDeclaration": 1,
|
||||
"dateCreation": "2026-06-16T18:14:26.743",
|
||||
"dateModification": "2026-06-16T18:15:01.867149955",
|
||||
"dateValidation": "2026-06-16T18:15:01.867149955",
|
||||
"procedureSecoursIcs2": true
|
||||
},
|
||||
"pdf": "JVBERi0xLjcKJYGBgYEKCjggMCBvYmoKPDwKL1R5cGUgL1hPYmplY3QKL1N1YnR5cGUgL0ltYWdlCi9XaWR0aCA0MTcKL0hlaWdodCAyMTYKL0NvbG9yU3BhY2UgL0RldmljZVJHQgovQml0c1BlckNvbXBvbmVudCA4Ci9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9MZW5ndGggMTE3ODAKPj4Kc3RyZWFtCnic7Z2/byzZdefrL5AZKjCMDoUFDHQ4wQYdGQKUtAEHXieklSlSK9MmIh1ZArwgNxvAgJvJe5IBCSTwhDXsCR4HC2MmEh8kjKMZkGPNQuuxo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XzD2h1Zeaszec8RVlkTuv7SCA3EwurpFHEpw0gE2ZGVjDgtxme7quIhT/a7YU04anLiFDX8XbGR6A5fdalGElkOrc67jUp6yqjn4sMq05pem8ko8Pj4Gw57HXq8a6Cv2o6/y0dBUa0N2voWtJ00QcUVTX3W5fGmrarbWN11gGVZiZFIvtnGkEdunrG/SYdTfBoizg1QkWrsSXKMVDJtW1lwXF2tt45i36rex57XxkUh4Ccu9Ygkd0LDEDEUwCCptYQs+USLOiUf9zSnNfNWgb9h+OZwLine truncated
|
||||
},
|
||||
"webhookUrl": "https://n8n.tmsconnector.nl/webhook/elo-callback/enveloppe/Reponses",
|
||||
"executionMode": "production"
|
||||
},
|
||||
"pairedItem": {
|
||||
"item": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"Webhook - ELO Reponses": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PG - Insert Reponses",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "If1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"PG - Insert Reponses": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond - Reponses OK",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook - ELO Erreur": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PG - Insert Erreur",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"PG - Insert Erreur": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond - Erreur OK",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook - Pending": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Auth - Pending",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Auth - Pending": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PG - Get Pending",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"PG - Get Pending": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format - Pending Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook - Ack": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Auth - Ack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Auth - Ack": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PG - Ack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"PG - Ack": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond - Ack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook - Fail": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Auth - Fail",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Auth - Fail": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PG - Fail",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"PG - Fail": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond - Fail",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Format - Pending Response": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond - Pending",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert to File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "FTP",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Execute a SQL query",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute a SQL query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert to File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": true,
|
||||
"settings": {
|
||||
"executionOrder": "v1",
|
||||
"binaryMode": "separate",
|
||||
"timeSavedMode": "fixed",
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"availableInMCP": false,
|
||||
"errorWorkflow": "1Ps5lukDf2sgcGL7"
|
||||
},
|
||||
"versionId": "09ec6bfc-ce7e-467b-975c-65e0e63b401c",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "bef8d409866a58c0777dfe7cca1b9c2400fd051c056d361501393ab423006b5f"
|
||||
},
|
||||
"nodeGroups": [],
|
||||
"id": "wawKiFL7MyhS6q2l",
|
||||
"tags": []
|
||||
}
|
||||
Reference in new issue
Block a user