Facturation automatique

Intermédiaire

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 9 nœuds.Utilise principalement des nœuds comme Gmail, Filter, GoogleDrive, HttpRequest, GoogleSheets. Automatisation de la facturation et de la collecte client avec Stripe, Google Sheets, Drive et Gmail

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Informations d'identification Google Drive API
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • 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": "vJ0wZhatRHwADMcn",
  "meta": {
    "instanceId": "cbe443dad974471e0b4f8b19ab92782e168bbdef84a3d0b94f5f96a67e01c92c",
    "templateCredsSetupCompleted": true
  },
  "name": "AutoInvoicing",
  "tags": [],
  "nodes": [
    {
      "id": "1fc28d00-b93a-47d1-bc7e-9616f36128b2",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xRWt65Mu7Lx_LAbCdf_FsZmO0MW2o61kMPM854_L4jw/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1xRWt65Mu7Lx_LAbCdf_FsZmO0MW2o61kMPM854_L4jw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xRWt65Mu7Lx_LAbCdf_FsZmO0MW2o61kMPM854_L4jw/edit?usp=drivesdk",
          "cachedResultName": "ClientPayments"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "DJ7kiXarj7DIKQKE",
          "name": "Google Sheets Trigger account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4c634c62-6e9e-4948-b2c7-69f278f861c3",
      "name": "Envoyer un e-mail via Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        352,
        432
      ],
      "parameters": {
        "toList": [
          "={{ $('Filter').item.json[\"Client Email\"] }}"
        ],
        "message": "Invoice",
        "subject": "Invoice for Services",
        "resource": "message",
        "htmlMessage": "=<!DOCTYPE html> <html> <head>   <meta charset=\"UTF-8\">   <style>     body {       font-family: Arial, sans-serif;       background-color: #f8f9fa;       padding: 20px;     }     .container {       max-width: 600px;       margin: auto;       background: #ffffff;       border: 1px solid #ddd;       border-radius: 8px;       padding: 30px;     }     h2 {       color: #333333;     }     p {       font-size: 15px;       color: #555555;     }     .info {       background: #f1f1f1;       padding: 15px;       border-radius: 6px;       margin-bottom: 20px;     }     .btn {       background-color: #007bff;       color: #ffffff !important;       padding: 12px 20px;       text-decoration: none;       border-radius: 5px;       display: inline-block;       font-weight: bold;     }     .footer {       font-size: 12px;       color: #999999;       margin-top: 30px;       text-align: center;     }   </style> </head> <body>   <div class=\"container\">     <h2>Invoice: {{ $('Filter').item.json[\"Order ID\"] }}</h2>     <p>Dear {{ $('Filter').item.json[\"Client Name\"] }},</p>     <p>Thank you for your business! Please find your invoice details below:</p>      <div class=\"info\">       <p><strong>Invoice Date:</strong> {{ DateTime.now().format('yyyy-LL-dd') }}</p>       <p><strong>Due Date:</strong> {{ $('Filter').item.json[\"Due Date\"] }}</p>       <p><strong>Total Amount:</strong>{{ $('Filter').item.json.Amount }} {{ $('Filter').item.json.Currency }}</p>       <p><strong>Items:</strong><br>{{ $('Filter').item.json[\"Items Description\"] }}</p>     </div>      <p>You can view or download your invoice using the button below:</p>     <p><a class=\"btn\" href=\"https://drive.google.com/file/d/{{ $('Google Drive').item.json.id }}/view?usp=drive_link\" target=\"_blank\">View Invoice</a></p>      <p>To complete your payment, please click below:</p>     <p><a class=\"btn\" href=\"{{ $('Create Stripe Payment Link').item.json.url }}\" target=\"_blank\">Pay Now</a></p>      <p>If you have any questions or concerns, feel free to contact us.</p>      <div class=\"footer\">       © {{ DateTime.now().format('yyyy') }} Your Company Name. All rights reserved.     </div>   </div> </body> </html>",
        "includeHtml": true,
        "additionalFields": {}
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "RhbEB1PDPVVI9T4I",
          "name": "Gmail account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7221a13f-9278-47e1-b99d-dd063b69b2ab",
      "name": "Filtre",
      "type": "n8n-nodes-base.filter",
      "position": [
        224,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "8b570f11-d7d3-412d-a637-a24fa07008ea",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json[\"Last Updated\"] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "85accbae-199e-4541-8e19-dbfc41339a2a",
      "name": "Créer un produit Stripe",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -96,
        208
      ],
      "parameters": {
        "url": "https://api.stripe.com/v1/products",
        "options": {
          "bodyContentCustomMimeType": "application/x-www-form-urlencoded"
        },
        "requestMethod": "POST",
        "authentication": "basicAuth",
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "name",
              "value": "={{ $json[\"Items Description\"] }}"
            }
          ]
        }
      },
      "credentials": {
        "httpBasicAuth": {
          "id": "EPKbd3Ykc72IhBCw",
          "name": "Unnamed credential"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f69f2dd2-3446-4f83-aa82-e66e4010f233",
      "name": "Créer un prix Stripe",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        128,
        208
      ],
      "parameters": {
        "url": "https://api.stripe.com/v1/prices",
        "options": {
          "bodyContentCustomMimeType": "application/x-www-form-urlencoded"
        },
        "requestMethod": "POST",
        "authentication": "basicAuth",
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "currency",
              "value": "={{ $('Filter').item.json.Currency }}"
            },
            {
              "name": "unit_amount",
              "value": "={{ $('Filter').item.json.Amount }}"
            },
            {
              "name": "product",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "credentials": {
        "httpBasicAuth": {
          "id": "EPKbd3Ykc72IhBCw",
          "name": "Unnamed credential"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2b785e52-0f4a-4583-ae9b-9df7f19b2ca0",
      "name": "Créer un lien de paiement Stripe",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        352,
        208
      ],
      "parameters": {
        "url": "https://api.stripe.com/v1/payment_links",
        "options": {
          "bodyContentCustomMimeType": "application/x-www-form-urlencoded"
        },
        "requestMethod": "POST",
        "authentication": "basicAuth",
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "line_items[0][price]",
              "value": "={{ $json.id }}"
            },
            {
              "name": "line_items[0][quantity]",
              "value": "1"
            }
          ]
        }
      },
      "credentials": {
        "httpBasicAuth": {
          "id": "EPKbd3Ykc72IhBCw",
          "name": "Unnamed credential"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "983b3432-dd64-4ffa-9e15-5305840867dd",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -96,
        432
      ],
      "parameters": {
        "name": "=Invoice_{{ $('Filter').item.json[\"Order ID\"] }}",
        "content": "=INVOICE\nInvoice Number: {{ $('Filter').item.json[\"Order ID\"] }}\nDate: {{  DateTime.now().format('yyyy-MM-dd') }}\nDue Date: {{ $('Filter').item.json[\"Due Date\"] }}\nClient Name: {{ $('Filter').item.json[\"Client Name\"] }}\nClient Email: {{ $('Filter').item.json[\"Client Email\"] }}\n\n\n\nDescription:\n{{ $('Filter').item.json[\"Items Description\"] }}\n\nAmount:\n{{ $('Filter').item.json.Amount }}\n\n\n\n\nTotal Amount: {{ $('Filter').item.json.Amount }} {{ $('Filter').item.json.Currency }}\nPlease complete your payment using the link below:\n{{ $('Create Stripe Payment Link').item.json.url }}\n\nThank you for your business!\nIf you have any questions, feel free to contact us.\n",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1FfQW6DeAd0UPj-CFFEsXqgE43I2V6zDX",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1FfQW6DeAd0UPj-CFFEsXqgE43I2V6zDX",
          "cachedResultName": "Youtube"
        },
        "operation": "createFromText"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "LxrpvgkD31trhdub",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "a43b8711-6c28-40e3-aa60-3883b6cdacca",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        128,
        432
      ],
      "parameters": {
        "columns": {
          "value": {
            "Order ID": "={{ $('Filter').item.json[\"Order ID\"] }}",
            "Invoice Link": "={{ $json.id }}",
            "Last Updated": "={{ DateTime.now() }}",
            "Stripe Payment Link": "={{ $('Create Stripe Payment Link').item.json.url }}"
          },
          "schema": [
            {
              "id": "Order ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Order ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Client Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Client Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Client Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Client Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Items Description",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Items Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Due Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Due Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Amount",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Amount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Currency",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Currency",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Invoice Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Invoice Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Invoice Link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Invoice Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Stripe Payment Link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Stripe Payment Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Payment Received On",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Payment Received On",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Updated",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Last Updated",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Order ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xRWt65Mu7Lx_LAbCdf_FsZmO0MW2o61kMPM854_L4jw/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1xRWt65Mu7Lx_LAbCdf_FsZmO0MW2o61kMPM854_L4jw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xRWt65Mu7Lx_LAbCdf_FsZmO0MW2o61kMPM854_L4jw/edit?usp=drivesdk",
          "cachedResultName": "ClientPayments"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uqJcQ13LuCAaohLN",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "4dbe5318-59e7-4787-b397-64aabdc6a3e7",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -32
      ],
      "parameters": {
        "width": 560,
        "height": 848,
        "content": "## 🛠 Setup Guide  \n\n### Prerequisites  \n- **n8n account**  \n- **Google Sheets & Google Drive credentials**  \n- **Gmail API credentials**  \n- **Stripe API Key**  \n\n### Steps  \n1. **Clone/Import Workflow**  \n   - Import the workflow JSON file into your **n8n** instance.  \n\n2. **Configure Google Sheets**  \n   - Create a Google Sheet with columns:  \n     - `Order ID, Client Name, Client Email, Items Description, Due Date, Amount, Currency, Invoice Status, Invoice Link, Stripe Payment Link, Last Updated`  \n   - Connect your **Google Sheets node** to this sheet.  \n\n3. **Set Up Stripe**  \n   - Obtain your **Stripe Secret Key** from [Stripe Dashboard](https://dashboard.stripe.com/).  \n   - Add it in the Stripe nodes for **Product**, **Price**, and **Payment Link** creation.  \n\n4. **Google Drive**  \n   - Configure to store invoice backups (optional).  \n\n5. **Gmail**  \n   - Authorize Gmail and set up the **Send Email** node.  \n   - Customize the email template with client details and the Stripe link.  \n\n6. **Test the Workflow**  \n   - Add a sample row in Google Sheets.  \n   - Run the workflow manually or update the sheet to trigger automatically.  \n   - Verify that the Stripe link is created, updated in the sheet, and emailed to the client.  "
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e166fc02-4473-4099-b669-e6898694feff",
  "connections": {
    "7221a13f-9278-47e1-b99d-dd063b69b2ab": {
      "main": [
        [
          {
            "node": "85accbae-199e-4541-8e19-dbfc41339a2a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "983b3432-dd64-4ffa-9e15-5305840867dd": {
      "main": [
        [
          {
            "node": "a43b8711-6c28-40e3-aa60-3883b6cdacca",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a43b8711-6c28-40e3-aa60-3883b6cdacca": {
      "main": [
        [
          {
            "node": "4c634c62-6e9e-4948-b2c7-69f278f861c3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f69f2dd2-3446-4f83-aa82-e66e4010f233": {
      "main": [
        [
          {
            "node": "2b785e52-0f4a-4583-ae9b-9df7f19b2ca0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "85accbae-199e-4541-8e19-dbfc41339a2a": {
      "main": [
        [
          {
            "node": "f69f2dd2-3446-4f83-aa82-e66e4010f233",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1fc28d00-b93a-47d1-bc7e-9616f36128b2": {
      "main": [
        [
          {
            "node": "7221a13f-9278-47e1-b99d-dd063b69b2ab",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2b785e52-0f4a-4583-ae9b-9df7f19b2ca0": {
      "main": [
        [
          {
            "node": "983b3432-dd64-4ffa-9e15-5305840867dd",
            "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 - Création de contenu, 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.

Workflows recommandés

Génération automatique de vidéos de produits avec Gemini, FAL et Google Workspace
Utiliser Gemini, FAL et Google Workspace pour générer automatiquement des vidéo de produit
Wait
Filter
Google Drive
+
Wait
Filter
Google Drive
16 NœudsCong Nguyen
Création de contenu
AI驱动dee-mail分诊与automatique回复系统,intégrationOpenAIagentetGmail
AI驱动dee-mail分诊与automatique回复系统,intégrationOpenAIagentetGmail
If
Set
Gmail
+
If
Set
Gmail
68 NœudsAbdullahi Ahmed
Création de contenu
💥 Automatisation de la création de vidéos AI et de la publication multiplateforme avec Veo 3.1 et Blotato - Vidéo
Utiliser GPT-4, Veo 3.1 et Blotato pour automatiser la création de vidéos IA et leur publication multiplateforme
Set
Code
Merge
+
Set
Code
Merge
25 NœudsDr. Firas
Création de contenu
Automatisation de courts métrages sans visage avec OpenAI, RunwayML et ElevenLabs
Automatisation de courts métrages sans visage : du script aux réseaux sociaux avec OpenAI, RunwayML et ElevenLabs
Set
Code
Wait
+
Set
Code
Wait
56 NœudsLeeWei
Création de contenu
Extraction de données Google Maps
Automatiser la génération de prospects Google Maps avec Perplexity AI et la vérification d'e-mails
If
Set
Code
+
If
Set
Code
18 NœudsAntxon Pous
Création de contenu
Création automatisée de contenu LinkedIn via l'analyse de publications populaires avec Gemini AI et Flux Image Génération
Utiliser Gemini AI et Flux Image Generation pour créer automatiquement du contenu LinkedIn via l'analyse des publications tendance
Code
Wait
Filter
+
Code
Wait
Filter
20 NœudsRoshan Ramani
Création de contenu
Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds9
Catégorie2
Types de nœuds7
Description de la difficulté

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

Auteur
Rohit Dabra

Rohit Dabra

@rohitdabra

As the CTO of QServices, I lead digital transformation for startups and SMBs by building scalable, AI-powered SaaS solutions that solve real-world business challenges.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34