Blog

eBay Flip Finder Automation (n8n Recipe)

05 April 2025

Automate finding undervalued eBay items with AI-generated search prompts, profit calculations, and alerts.

Who This Is For

Indie resellers, solopreneurs, and digital entrepreneurs who want to automate the discovery of profitable eBay flipping opportunities using AI-driven search prompts and automated alerts.

What You Get

A ready-to-import n8n automation recipe that:

  1. Generates AI-powered eBay search queries based on trending or seasonal keywords.
  2. Monitors eBay for newly listed items matching those queries.
  3. Filters for undervalued items using a profit margin calculation after eBay/PayPal fees and shipping.
  4. Sends Discord and SMS alerts for items with positive ROI.

This is ideal for people who want to build a reseller business with minimal manual effort.

How It Works

Trigger β†’ Steps β†’ Outcome

  1. Trigger: Cron job (runs every 15 minutes)
  2. Steps:
    • AI Prompt Generator: Uses OpenAI to generate eBay search terms (e.g., β€œiPhone 13 unlocked new”)
    • eBay API Call: Fetches new listings matching the prompt
    • Fee Calculator: Computes profit after eBay/PayPal fees and estimated shipping
    • Filter: Only items with >20% ROI pass through
    • Formatter: Prepares message for alert
    • Discord Webhook: Sends alert
    • Twilio SMS: Sends SMS alert (optional)
  3. Outcome: You receive real-time alerts of high-ROI eBay items to flip.

Prerequisites

  • n8n cloud or self-hosted instance
  • eBay developer account + API keys
  • OpenAI API key
  • Twilio account (optional)
  • Discord webhook URL

Step-by-Step Setup

  1. Import the workflow JSON (see below).
  2. Set up credentials:
    • eBay API
    • OpenAI API
    • Twilio (optional)
    • Discord Webhook
  3. Customize search prompt logic (e.g., seasonal items, trending tech, etc.).
  4. Set cron trigger frequency (default is every 15 minutes).
  5. Test the workflow with sample inputs.
  6. Activate and monitor alerts.

n8n Workflow JSON

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [250, 300]
    },
    {
      "parameters": {
        "httpMethod": "GET",
        "path": "generate-prompt",
        "responseMode": "lastNode",
        "options": {}
      },
      "name": "AI Prompt Generator",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [450, 300],
      "credentials": {
        "openAiApi": "OpenAI API Credentials"
      }
    },
    {
      "parameters": {
        "operation": "findItemsByKeywords",
        "keywords": "={{$json[\"prompt\"]}}",
        "limit": 10,
        "sortOrder": "StartTimeNewest"
      },
      "name": "eBay API",
      "type": "n8n-nodes-base.ebay",
      "typeVersion": 1,
      "position": [650, 300],
      "credentials": {
        "ebayOAuth2Api": "eBay API Credentials"
      }
    },
    {
      "parameters": {
        "functionCode": "const items = $input.all();\nconst results = items.map(item => {\n  const price = parseFloat(item.json.price?.value || 0);\n  const shipping = parseFloat(item.json.shippingCost?.value || 0);\n  const ebayFee = price * 0.1255;\n  const paypalFee = price * 0.029 + 0.30;\n  const totalFees = ebayFee + paypalFee;\n  const netProfit = price - totalFees - shipping;\n  const roi = ((netProfit / price) * 100).toFixed(2);\n  return { ...item.json, netProfit, roi, totalFees };\n});\nreturn results.filter(item => item.roi > 20);"
      },
      "name": "Profit Calculator",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [850, 300]
    },
    {
      "parameters": {
        "message": "πŸ”₯ New Flip Alert: {{ $json.title }} - Est. Profit: ${{ $json.netProfit.toFixed(2) }} ({{ $json.roi }}% ROI)\nπŸ”— {{ $json.viewItemURL }}",
        "webhookUri": "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
      },
      "name": "Discord Alert",
      "type": "n8n-nodes-base.discord",
      "typeVersion": 1,
      "position": [1050, 300]
    },
    {
      "parameters": {
        "message": "πŸ”₯ New Flip: {{ $json.title }} - Est. Profit: ${{ $json.netProfit.toFixed(2) }} ({{ $json.roi }}% ROI)",
        "to": "+1234567890",
        "from": "+0987654321"
      },
      "name": "SMS Alert",
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [1250, 300],
      "credentials": {
        "twilio": "Twilio Credentials"
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Schedule Trigger",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "AI Prompt Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Prompt Generator": {
      "main": [
        [
          {
            "node": "eBay API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "eBay API": {
      "main": [
        [
          {
            "node": "Profit Calculator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Profit Calculator": {
      "main": [
        [
          {
            "node": "Discord Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Discord Alert": {
      "main": [
        [
          {
            "node": "SMS Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Troubleshooting FAQ

Q: eBay API returns no results?

A: Check your search prompt logic or eBay API quota. Use fewer keywords or increase limit.

Q: Discord alerts are not sending?

A: Confirm the webhook URL is correct and the bot has permissions in the channel.

Q: SMS not working?

A: Verify Twilio credentials and ensure the phone number is verified or purchased in Twilio.

Q: How do I change the ROI threshold?

A: Edit the filter(item => item.roi > 20) line in the Profit Calculator node.

Q: Can I use this with other marketplaces?

A: Yes. Replace the eBay API node with Amazon, Mercari, or Poshmark API equivalents if available.

Monetize This

Want to scale this into a reseller business or SaaS?

πŸ‘‰ Check out our reseller fee calculator to build your own profit models. πŸ‘‰ See more automation recipes for solopreneurs. πŸ‘‰ Join our experiments to see how this idea evolves into a standalone business.


Next Step: Import this workflow into n8n and start flipping eBay items in minutes.

← Back to blog