The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "TrustLoop + Signatrust: Customer Refund",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "ai_refund_request",
"responseMode": "lastNode",
"options": {}
},
"id": "trigger-1",
"name": "AI Refund Request",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
0,
0
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.trustloop.live/api/intercept",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{$env.TRUSTLOOP_API_KEY}}"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\"tool_name\": \"issue_refund\", \"arguments\": {{JSON.stringify($json.body)}}, \"agent_name\": \"n8n-refund-workflow\"}",
"options": {}
},
"id": "trustloop-1",
"name": "TrustLoop Policy Check",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
200,
0
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{$json.allowed}}",
"value2": true
}
]
}
},
"id": "if-1",
"name": "Is Allowed?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
400,
0
]
},
{
"parameters": {
"jsCode": "const input = $('AI Refund Request').item.json.body;\nreturn {\n action: 'refund_processed',\n amount: input.amount || 0,\n currency: input.currency || 'USD',\n customer_id: input.customer_id || 'unknown',\n reason: input.reason || 'customer_request',\n timestamp: new Date().toISOString()\n};"
},
"id": "execute-1",
"name": "Process Stripe Refund",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
-100
]
},
{
"parameters": {
"method": "POST",
"url": "https://signatrust.net/api/v1/n8n/receipts",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-API-Key",
"value": "={{$env.SIGNATRUST_API_KEY}}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{JSON.stringify({\"decision\": \"Approved refund of \" + ($json.currency || 'USD') + ' ' + ($json.amount || 0) + \" for customer \" + ($json.customer_id || 'unknown') + \" \u2014 reason: \" + ($json.reason || 'customer_request') + \" \u2014 governed by TrustLoop policy\", \"agent_id\": \"n8n-refund-workflow\", \"action\": \"customer_refund_issued\", \"metadata\": {\"governed_by\": \"TrustLoop\", \"amount\": $json.amount, \"customer_id\": $json.customer_id}})}}",
"options": {}
},
"id": "signatrust-1",
"name": "Signatrust Seal Receipt",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
800,
-100
]
},
{
"parameters": {
"method": "GET",
"url": "=https://signatrust.net/api/v1/n8n/receipts/{{$json.receipt_id}}/verify",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-API-Key",
"value": "={{$env.SIGNATRUST_API_KEY}}"
}
]
},
"options": {}
},
"id": "verify-1",
"name": "Verify Receipt",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1000,
-100
]
},
{
"parameters": {
"jsCode": "const receipt = $('Signatrust Seal Receipt').item.json;\nconst verification = $json;\nreturn {\n status: 'completed',\n receipt_id: receipt.receipt_id,\n verified: verification.valid,\n share_url: receipt.share_url,\n hash: receipt.hash,\n signature: receipt.signature\n};"
},
"id": "respond-1",
"name": "Return Audit Trail",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1200,
-100
]
},
{
"parameters": {
"jsCode": "return {\n status: 'blocked',\n reason: $('TrustLoop Policy Check').item.json.message || 'Policy violation detected',\n action: 'refund_denied'\n};"
},
"id": "block-1",
"name": "Handle Blocked Action",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
100
]
}
],
"connections": {
"AI Refund Request": {
"main": [
[
{
"node": "TrustLoop Policy Check",
"type": "main",
"index": 0
}
]
]
},
"TrustLoop Policy Check": {
"main": [
[
{
"node": "Is Allowed?",
"type": "main",
"index": 0
}
]
]
},
"Is Allowed?": {
"main": [
[
{
"node": "Process Stripe Refund",
"type": "main",
"index": 0
}
],
[
{
"node": "Handle Blocked Action",
"type": "main",
"index": 0
}
]
]
},
"Process Stripe Refund": {
"main": [
[
{
"node": "Signatrust Seal Receipt",
"type": "main",
"index": 0
}
]
]
},
"Signatrust Seal Receipt": {
"main": [
[
{
"node": "Verify Receipt",
"type": "main",
"index": 0
}
]
]
},
"Verify Receipt": {
"main": [
[
{
"node": "Return Audit Trail",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "2.0"
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
TrustLoop + Signatrust: Customer Refund. Uses httpRequest. Webhook trigger; 8 nodes.
Source: https://github.com/abokenan444/trustloop-signatrust-workflows/blob/master/2_customer_refund.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.
This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c