Custom Invoice Templates

Add Data Sources to ConnectWise Invoices

Pull additional data into your ConnectWise invoices from company details, finance records, IT Glue, Hudu, and other external sources.

Data sources let you pull additional information into your invoice templates beyond standard ConnectWise Manage line items. Use them to display company phone numbers, custom finance fields, IT Glue configuration data, Hudu details, or anything else your team needs on an invoice.

Better Invoice supports two types of data sources:


Need help setting this up? Custom endpoints are powerful but can involve moving parts. Contact us and we’ll help you get your data sources configured and working on your invoices.

Built-in ConnectWise sources

Two ConnectWise Manage endpoints are available as built-in data sources. Turn them on in the Data Sources section of the template sidebar.

These sources use your existing ConnectWise API connection automatically. No additional configuration is needed.

Use built-in sources in your template

All data returned by a source is available under sources.<name> in your Liquid template. Select any field in the Preview panel to copy the Liquid tag to your clipboard.

{% if sources.company %}
  Phone: {{ sources.company.phoneNumber }}
  Website: {{ sources.company.website }}
{% endif %}

{% if sources.companyFinance %}
  {% comment %} Alternate Billing Company Name {% endcomment %}
  {{ sources.companyFinance.customFields.0.value }}
{% endif %}

Custom external endpoints

Custom endpoints let you pull data from any external HTTPS API — including IT Glue, Hudu, n8n webhooks, or your own internal services. You can add up to five custom endpoints per template.

Add a custom endpoint

  1. In the template sidebar, go to Data Sources > Custom Endpoints.

  2. Select Add Endpoint.

  3. In the Name field, enter a Liquid-safe identifier (letters, numbers, and underscores only). This becomes the variable name in your template — for example, entering itglue makes the data available as {{ sources.itglue }}.

  4. In the URL field, enter the full HTTPS URL for your endpoint. You can include tokens that Better Invoice replaces automatically before each request:

    TokenReplaced with
    {{ company.id }}ConnectWise company ID
    {{ company.identifier }}ConnectWise company identifier
    {{ invoice.id }}ConnectWise invoice ID
    {{ invoice.number }}Invoice number

    For example: https://your-n8n.app/webhook/itglue?company_id={{ company.id }}

  5. Turn on the Enabled toggle.

Use custom source data in your template

Custom endpoint data works the same way as built-in sources. Wrap it in a conditional so your invoice still renders if the endpoint is unavailable:

{% if sources.itglue %}
  Primary Contact: {{ sources.itglue.primaryContact }}
  Contract Type: {{ sources.itglue.contractType }}
{% endif %}

Requirements for custom endpoints

Timing and reliability

Data sources are fetched in parallel every time an invoice is rendered. For the best experience, keep these guidelines in mind:

Preview your data

To see what a data source returns before using it in a template:

  1. Load an invoice in the template editor.

  2. In the Data Sources panel, select Refresh.

The Preview panel displays the full JSON response from each enabled source. Select any value to copy its Liquid tag (e.g., {{ sources.company.phoneNumber }}) to your clipboard, ready to paste into your template.

Example workflows

Display IT Glue data on invoices using n8n

Use MSP Copilot Link for n8n to bridge ConnectWise company IDs to IT Glue and return the data Better Invoice needs.

  1. In n8n, create a new workflow with a Webhook trigger. Set the HTTP method to GET.

  2. Add an MSP Copilot Link node. Configure it to look up the IT Glue organization ID from the ConnectWise company ID passed in the webhook query string.

  3. Add an IT Glue node to fetch the data you need (configurations, contacts, flexible assets, etc.) using the organization ID from the previous step.

  4. Add a Respond to Webhook node. Map the fields you want on the invoice into a JSON response.

  5. In Better Invoice, add a custom endpoint with the n8n webhook URL:

    https://your-n8n.app/webhook/itglue-invoice-data?company_id={{ company.id }}
  6. Use the returned data in your template:

    {% if sources.itglue %}
      {% for config in sources.itglue.configurations %}
        {{ config.name }} — {{ config.type }}
      {% endfor %}
    {% endif %}

MSP Copilot Link handles the ID mapping between ConnectWise and IT Glue, so you don’t need to maintain a separate lookup table.

Ready to send better invoices?

Start for free. Your invoices should look as good as the work you do.

Get started free →