AutomationFlowsWeb Scraping › Recover Failed ePayco Payments & Sync Status

Recover Failed ePayco Payments & Sync Status

Original n8n title: 📊 Payment Recovery & Status Sync (every 2 Hours)

📊 Payment Recovery & Status Sync (Every 2 Hours). Uses n8n-nodes-base:cronTrigger, n8n-nodes-base:httpRequest, n8n-nodes-base:splitInBatches, n8n-nodes-base:emailSend. Scheduled trigger; 8 nodes.

Cron / scheduled trigger★★★★☆ complexity8 nodesN8N Nodes Base:Cron TriggerN8N Nodes Base:Http RequestN8N Nodes Base:Split In BatchesN8N Nodes Base:Email Send
Web Scraping Trigger: Cron / scheduled Nodes: 8 Complexity: ★★★★☆ Added:

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 →

Download .json
{
  "name": "\ud83d\udcca Payment Recovery & Status Sync (Every 2 Hours)",
  "description": "Automatically checks for failed payments, updates their status from ePayco, retries them, and notifies users",
  "tags": [
    "payment",
    "recovery",
    "automation",
    "production"
  ],
  "nodes": [
    {
      "parameters": {
        "cronExpression": "0 */2 * * *"
      },
      "name": "Schedule Every 2 Hours",
      "type": "n8n-nodes-base:cronTrigger",
      "typeVersion": 1,
      "position": [
        100,
        200
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "http://localhost:3001/api/n8n/payments/failed",
        "authentication": "generic",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-N8N-SECRET",
              "value": "={{ $env.N8N_WEBHOOK_SECRET }}"
            }
          ]
        }
      },
      "name": "Get Failed Payments",
      "type": "n8n-nodes-base:httpRequest",
      "typeVersion": 4.1,
      "position": [
        300,
        200
      ]
    },
    {
      "parameters": {
        "loopOver": "=data"
      },
      "name": "Loop Each Payment",
      "type": "n8n-nodes-base:splitInBatches",
      "typeVersion": 3,
      "position": [
        500,
        200
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "http://localhost:3001/api/payment/check-ePayco-status",
        "authentication": "generic",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "refPayco",
              "value": "={{ $node[\"Loop Each Payment\"].json.ref_payco }}"
            }
          ]
        }
      },
      "name": "Check ePayco Status",
      "type": "n8n-nodes-base:httpRequest",
      "typeVersion": 4.1,
      "position": [
        700,
        200
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://localhost:3001/api/n8n/payments/update-status",
        "authentication": "generic",
        "sendBody": true,
        "contentType": "application/json",
        "body": "{\n  \"paymentId\": \"{{ $node[\\\"Loop Each Payment\\\"].json.id }}\",\n  \"status\": \"{{ $node[\\\"Check ePayco Status\\\"].json.estado }}\",\n  \"result\": {{ JSON.stringify($node[\\\"Check ePayco Status\\\"].json) }}\n}"
      },
      "name": "Update Payment Status",
      "type": "n8n-nodes-base:httpRequest",
      "typeVersion": 4.1,
      "position": [
        900,
        200
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $node[\\\"Loop Each Payment\\\"].json.email }}",
        "authentication": "generic",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "To",
              "value": "={{ $node[\\\"Loop Each Payment\\\"].json.email }}"
            },
            {
              "name": "Subject",
              "value": "Payment Status Update - {{ $node[\\\"Check ePayco Status\\\"].json.estado }}"
            }
          ]
        }
      },
      "name": "Send Status Email",
      "type": "n8n-nodes-base:emailSend",
      "typeVersion": 1,
      "position": [
        1100,
        200
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://localhost:3001/api/n8n/workflows/log",
        "authentication": "generic",
        "sendBody": true,
        "contentType": "application/json",
        "body": "{\n  \"workflowName\": \"Payment Recovery & Status Sync\",\n  \"status\": \"success\",\n  \"itemsProcessed\": {{ $node[\\\"Loop Each Payment\\\"].json.length || 0 }},\n  \"executionTimeMs\": {{ Date.now() - $now }}\n}"
      },
      "name": "Log Workflow Success",
      "type": "n8n-nodes-base:httpRequest",
      "typeVersion": 4.1,
      "position": [
        1300,
        200
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://localhost:3001/api/n8n/alerts/admin",
        "authentication": "generic",
        "sendBody": true,
        "contentType": "application/json",
        "body": "{\n  \"alertType\": \"payment_recovery_daily\",\n  \"severity\": \"info\",\n  \"title\": \"Payment Recovery Summary\",\n  \"message\": \"Processed {{ $node[\\\"Loop Each Payment\\\"].json.length || 0 }} failed payments\",\n  \"details\": {\n    \"itemsProcessed\": {{ $node[\\\"Loop Each Payment\\\"].json.length || 0 }},\n    \"timestamp\": \"{{ now.toISOString() }}\"\n  }\n}"
      },
      "name": "Send Admin Summary",
      "type": "n8n-nodes-base:httpRequest",
      "typeVersion": 4.1,
      "position": [
        1500,
        200
      ]
    }
  ],
  "connections": {
    "Schedule Every 2 Hours": {
      "main": [
        [
          {
            "node": "Get Failed Payments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Failed Payments": {
      "main": [
        [
          {
            "node": "Loop Each Payment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Each Payment": {
      "main": [
        [
          {
            "node": "Check ePayco Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check ePayco Status": {
      "main": [
        [
          {
            "node": "Update Payment Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Payment Status": {
      "main": [
        [
          {
            "node": "Send Status Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Status Email": {
      "main": [
        [
          {
            "node": "Log Workflow Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Workflow Success": {
      "main": [
        [
          {
            "node": "Send Admin Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {}
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

📊 Payment Recovery & Status Sync (Every 2 Hours). Uses n8n-nodes-base:cronTrigger, n8n-nodes-base:httpRequest, n8n-nodes-base:splitInBatches, n8n-nodes-base:emailSend. Scheduled trigger; 8 nodes.

Source: https://github.com/carlossmartdevices-cyber/pnptvbot-production/blob/a16c33f1a909be7dcb4d44674ff007a4dde17c64/n8n-workflows/1-payment-recovery.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

Birthday Automation - Production (Fixed). Uses stopAndError, httpRequest, emailSend, bannerbear. Scheduled trigger; 86 nodes.

Stop And Error, HTTP Request, Email Send +1
Web Scraping

This template runs two scheduled workflows to govern Microsoft Entra ID (Azure AD) guest accounts by detecting stale users via Microsoft Graph, staging deletions in SharePoint with a 72-hour window, n

Microsoft SharePoint, Microsoft Teams, Microsoft Entra +1
Web Scraping

Jira-Allure-Auto-Qa. Uses httpRequest, jira. Scheduled trigger; 68 nodes.

HTTP Request, Jira
Web Scraping

Spotify-Sync-Surrealdb-V1. Uses httpRequest, n8n-nodes-surrealdb, spotify. Scheduled trigger; 62 nodes.

HTTP Request, N8N Nodes Surrealdb, Spotify
Web Scraping

As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o

HTTP Request, n8n, N8N Trigger +1