Automate Your Invoicing: Connect WooCommerce to Invoiless with n8n

22.02.2025

5 minute read

Automate Your Invoicing: Connect WooCommerce to Invoiless with n8n

Have you ever wished your WooCommerce store could automatically generate professional invoices whenever a customer places an order? In this guide, I'll show you how to connect WooCommerce with Invoiless using n8n - a powerful no-code automation tool that will save you countless hours of manual work. Let's transform your invoicing process into a seamless, automated workflow! ๐Ÿš€

In this guide, you'll learn how to create an automated workflow in n8n that:

  1. Triggers when a new order is created in WooCommerce.
  2. Prepares the order data for Invoiless.
  3. Creates an invoice in Invoiless.
  4. Sends the invoice to the customer.

Prerequisites

Before we begin, make sure you have:

  • An active Invoiless account
  • A WooCommerce store up and running
  • n8n installed (you can use n8n.io or self-host it)
  • API access for both WooCommerce and Invoiless

Step 1: Setting Up API Access

Generate WooCommerce API Key

  1. Log in to your WordPress admin panel
  2. Navigate to WooCommerce → Settings → Advanced → REST API
  3. Click "Add Key"
  4. Enter a description (e.g., "Invoiless - n8n")
  5. Set permissions to "Read/Write"
  6. Click "Generate API Key"
  7. Save your Consumer Key and Consumer Secret in a secure location

Note: Make sure in Settings → Permalink, you don't use "Plain", you can use "Post name", or other options.

Generate Invoiless API Key

  1. Log in to your Invoiless dashboard
  2. Go to Integrations → API Key
  3. Click "Show"
  4. Copy and securely save your API Key

Step 2: Setting Up n8n Workflow

Now let's create the automation workflow that will create invoices in Invoiless whenever a new order is placed in WooCommerce.

Understanding the Workflow

Our workflow consists of four main nodes:

  1. WooCommerce Trigger: Monitors for new orders in your WooCommerce store
  2. Prepare Payload: Transforms WooCommerce order data into Invoiless format
  3. Create Invoice: Sends data to Invoiless API to create the invoice
  4. Send Invoice: Emails the generated invoice to the customer

Step 3: Configuring the Nodes

Import the Workflow

  1. Create new workflow name, e.g. "Invoiless + WooCommerce"
  2. Download from here the workflow json file
  3. Click on top-right menu → Import from URL, select file and it will be imported

Now you have all the nodes you need, you'll notice red flags in the WooCommerce and HTTP nodes that need some extra configuration.

WooCommerce Trigger Node

  1. Click on "WooCommerce" trigger node
  2. Create a new credential:
    1. Enter your WooCommerce site URL
    2. Enter your Consumer Key and Consumer Secret from Step 1
    3. Test the connection to verify it works

The event is already configured to trigger when a new order is created.

Invoiless Nodes

  1. Click on "Create Invoice" node
  2. Click on "Select Credential":
    1. Name field: Enter "api-key"
    2. Value field: Enter your Invoiless API Key from Step 1
    3. Rename the connection name to "Invoiless API"
  3. Click now on "Send Invoice" node and make sure the "Invoiless API" is now selected

Step 4: Activate and Test Your Workflow

  1. Save your entire workflow
  2. Toggle the "Active" switch to enable it
  3. Create a test order in your WooCommerce store
  4. Check your Invoiless dashboard to confirm the invoice was created
  5. Verify that the customer received the invoice email

How It Works in Practice

When a customer places an order in your WooCommerce store:

  1. The WooCommerce Trigger node detects the new order
  2. The Prepare Payload node formats the data for Invoiless
  3. The Create Invoice node generates a new invoice in Invoiless with:
    • All order items properly listed
    • Customer details from WooCommerce
    • Order total, taxes, and shipping correctly mapped
    • Invoice status set based on payment status
    • WooCommerce order number as a reference
  4. The Send Invoice node automatically emails the invoice to the customer

Advanced Features

  • The workflow automatically sets the invoice status to Paid if the WooCommerce order was paid online
  • If payment is pending, the invoice status is set to Pending
  • Each invoice is tagged with the WooCommerce order number for easy reference and filter from Invoiless
  • Customer information is mapped properly between systems, so if the same customer pass new order in the future, the same customer on Invoiless will be used again and not creating new one.

Troubleshooting

If you encounter any issues:

  • Verify your API credentials are correct
  • Check that both WooCommerce and Invoiless are accessible
  • Review n8n execution logs for detailed error information
  • Review WooCommerce logs from WooCommerce → Status → Logs → webhooks-delivery
  • n8n auto create webhook on WooCommerce, so ensure the webhook is created and URL used in accessible especially on self-hosted

See It in Action

Watch this quick demonstration of the entire process - from order placement to automatic invoice creation:

Wrap Up

By implementing this n8n workflow, you've successfully automated a critical part of your e-commerce operations. Your customers will receive professional invoices immediately after purchase, and you'll save countless hours of manual work.

I hope this guide helps streamline your business operations! Feel free to customize the workflow further to match your specific business needs. Let us know if you have any questions or want to see other workflows explained. ๐Ÿงก

Join Invoiless Now!

Join +2,000 businesses that are creating and sending professional online invoices to their customers. Start growing now!

Get Started for Free