Agent de suivi des factures

Intermédiaire

Ceci est unInvoice Processing, Multimodal AIworkflow d'automatisation du domainecontenant 8 nœuds.Utilise principalement des nœuds comme Cron, Function, EmailSend, GoogleSheets. Suivi automatique des factures via Google Sheets et e-mails, avec une intelligence de ton pour les réponses

Prérequis
  • Informations d'identification Google Sheets API
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "RdYMo0ozk6r4oyLm",
  "meta": {
    "instanceId": "a287613f1596da776459594685fbf4e2b4a12124f80ab8c8772f5e37bff103ae",
    "templateCredsSetupCompleted": true
  },
  "name": "Invoice Follow Up Agent",
  "tags": [],
  "nodes": [
    {
      "id": "bf973089-06fa-4da5-a823-9cc6e0823387",
      "name": "Déclencheur Quotidien",
      "type": "n8n-nodes-base.cron",
      "position": [
        -980,
        80
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": 6
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8c35f2a2-8bb3-4608-b95d-ffa8292fa813",
      "name": "Charger les Factures",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -780,
        80
      ],
      "parameters": {
        "range": "Invoices!A1:G1000",
        "options": {},
        "sheetId": "YOUR_SHEET_ID",
        "operation": "lookup",
        "authentication": "oAuth2"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "4Y2ksdr35dFDo0rB",
          "name": "maranata"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0874c817-026c-4d88-80e8-e92aa2b51bca",
      "name": "Filtrer les Factures En Retard",
      "type": "n8n-nodes-base.function",
      "position": [
        -580,
        80
      ],
      "parameters": {
        "functionCode": "\nreturn items.filter(item => {\n  const dueDate = new Date(item.json.due_date);\n  const today = new Date();\n  return item.json.status.toLowerCase() === \"unpaid\" && dueDate < today;\n});\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b296c45e-755c-436f-9791-c2015e7ed0e6",
      "name": "Calculer les Jours de Retard",
      "type": "n8n-nodes-base.function",
      "position": [
        -380,
        80
      ],
      "parameters": {
        "functionCode": "\nreturn items.map(item => {\n  const dueDate = new Date(item.json.due_date);\n  const today = new Date();\n  const dpd = Math.floor((today - dueDate) / (1000 * 60 * 60 * 24));\n  item.json.dpd = dpd;\n  return item;\n});\n"
      },
      "typeVersion": 1
    },
    {
      "id": "303f0f3b-6fd4-4546-83ba-20158ceb0a8a",
      "name": "Générer le Message",
      "type": "n8n-nodes-base.function",
      "position": [
        -180,
        80
      ],
      "parameters": {
        "functionCode": "\nreturn items.map(item => {\n  const dpd = item.json.dpd;\n  let tone = \"\";\n  if (dpd <= 7) {\n    tone = `Hi ${item.json.client_name}, just a quick reminder about your invoice #${item.json.invoice_number} due on ${item.json.due_date}. Let us know if you need anything!`;\n  } else if (dpd <= 14) {\n    tone = `Hi ${item.json.client_name}, your invoice #${item.json.invoice_number} is now ${dpd} days overdue. Please arrange the payment soon.`;\n  } else {\n    tone = `Final Reminder: Invoice #${item.json.invoice_number} is ${dpd} days overdue. Immediate payment is required to avoid further action.`;\n  }\n  item.json.message = tone;\n  return item;\n});\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d636929c-5cc3-4eeb-87cf-c417ee5bc439",
      "name": "Envoyer l'E-mail",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        20,
        80
      ],
      "parameters": {
        "text": "={{$json.message}}",
        "options": {},
        "subject": "Invoice Reminder"
      },
      "typeVersion": 1
    },
    {
      "id": "22c96891-4f97-42f4-94fc-670639fde6e2",
      "name": "Note Adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        20
      ],
      "parameters": {
        "color": 3,
        "width": 1300,
        "height": 240,
        "content": "## Flow\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ec179bef-03c4-4a02-8f80-97eb4c6290b5",
      "name": "Note Adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        280
      ],
      "parameters": {
        "color": 4,
        "width": 960,
        "height": 900,
        "content": "# AI Invoice & Payment Follow-Up Agent\n\n## 🧨 Problem\nFreelancers, agencies, and businesses often deal with late payments from clients. Manually tracking unpaid invoices, calculating how overdue they are, and following up takes time and often leads to inconsistent communication or missed revenue.\n\n## ✅ Solution\nThis AI Agent automates the entire invoice follow-up process. It scans unpaid invoices daily, calculates how many days they are overdue (Days Past Due / DPD), and sends personalized reminder emails with different tones depending on how long the invoice has been unpaid.\n\n## 👤 This AI Agent Is For:\n- Freelancers and consultants\n- Digital agencies\n- Finance and billing teams\n- Subscription-based services\n- Anyone managing invoice collections\n\n## 📦 Scope\n- Daily scan of unpaid invoices (via Google Sheets)\n- Filters invoices that are overdue\n- Calculates Days Past Due (DPD)\n- Generates personalized reminder messages with varying tone based on DPD\n- Sends follow-up via Email (can be extended to WhatsApp or Slack)\n- Logs all follow-ups for accountability\n\n## ⚙️ How to Set Up\n1. Replace `YOUR_SHEET_ID` with your actual Google Sheet ID that contains invoice data (columns like `client_name`, `email`, `due_date`, `invoice_number`, `status`)\n2. Customize the reminder messages if needed (in the “Generate Message” node)\n3. Set your email credentials in the Email node (SMTP or Gmail)\n4. Optionally connect to WhatsApp API, Notion, or Slack for multichannel reminders\n5. Activate the Cron Trigger to run daily\n\n> Optional: Expand the workflow with penalty logic, automated PDF resend, or Google Calendar reminders for internal finance tracking.\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "47470742-6e89-46dd-a951-a7a3c9c6b7da",
  "connections": {
    "b296c45e-755c-436f-9791-c2015e7ed0e6": {
      "main": [
        [
          {
            "node": "303f0f3b-6fd4-4546-83ba-20158ceb0a8a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bf973089-06fa-4da5-a823-9cc6e0823387": {
      "main": [
        [
          {
            "node": "8c35f2a2-8bb3-4608-b95d-ffa8292fa813",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8c35f2a2-8bb3-4608-b95d-ffa8292fa813": {
      "main": [
        [
          {
            "node": "0874c817-026c-4d88-80e8-e92aa2b51bca",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "303f0f3b-6fd4-4546-83ba-20158ceb0a8a": {
      "main": [
        [
          {
            "node": "d636929c-5cc3-4eeb-87cf-c417ee5bc439",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0874c817-026c-4d88-80e8-e92aa2b51bca": {
      "main": [
        [
          {
            "node": "b296c45e-755c-436f-9791-c2015e7ed0e6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Traitement des factures, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds8
Catégorie2
Types de nœuds5
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34