Part 4 of our collection of interactive videos to show how you can manage supplier invoices within the Headlight application.
The Headlight invoice module saves tremendous time for the fleet manager in the approval process of invoices, as wel as for the Accounting department, via ready-to-use input files for the Analytical Accounting.
See part 1 if you need an introduction to Invoice Management with Headlight, or see the overview of all related articles.
Let us know your questions or thoughts via support@headlight.tech.
Automation via workflows
In this section, we’ll show you how you can put your invoice management on autopilot, using automatic triggers, generation, transformation and notification process steps.
Headlight | Workflow triggers
Every process in Headlight starts with a trigger.Workflow triggers allow you to automate actions in invoice management.
You can set automatic triggers for events such as an invoice being created, approved, or consolidated.
Each trigger connects directly to invoice documents in the system.
Triggers make it possible to automate follow-up steps like approvals, payments, or notifications. For example, when a consolidated supplier invoice is created, it can automatically be sent to the accounting team.
- Attachments and document references are included, so teams receive complete information.
- All settings are configurable through no-code options within the workflow editor.
- Select the type of trigger you want to use and browse the available options.
- You can also search and set parameters to match your process needs.
Each workflow step—sending a notification, updating a file, or launching an event—can be defined within the same interface. Notifications can include custom text, such as:
“Dear Accounting colleagues,
attached, you can find consolidated invoice {{consolidated_supplier_invoice.document_label}}.
Kind regards,
Fleet team.”
Once configured, workflows run automatically every time the trigger condition is met. This removes manual steps and ensures that invoice management runs faster and more consistently.
Headlight | Create custom invoice files
The Automated Invoice Processing workflow transforms uploaded Excel invoices into structured data. It fills missing details, calculates VAT codes, and generates descriptions for each line. The resulting file is then automatically emailed to the accounting department.
Compared to the standard workflow, this version adds a Custom File Transformation step. Here, predefined scripts in Python can be applied to modify files according to specific formatting needs.
Once the transformation completes, the custom file is saved and shared through an email notification. The message can include personalized text for colleagues, such as a note to the Accounts Payable team.
These workflows can also incorporate conditional logic—for example, sending results to different recipients depending on the legal entity—offering a highly flexible automation setup.
Headlight | Create Custom Invoice Files — Step-by-Step Guide
Purpose:
Automate the transformation of uploaded invoice files into structured, formatted data — ready for accounting or analytics workflows.
1. Open the Automated Invoice Processing workflow
- Navigate to Procurement > Invoices > Invoice.
- Select the Automated Invoice Processing workflow.
- This process handles Excel invoices and converts them into structured data.
2. Understand the process
- The workflow fills missing information, calculates VAT codes, and generates line descriptions automatically.
- Once completed, the system emails the processed invoice to the accounting team for documentation and record-keeping.
3. Locate the Custom File Transformation step
- This additional step allows the use of custom Python scripts to transform the Excel files.
- These scripts can apply predefined formatting rules or calculations to meet company-specific requirements.
- Example functions include
read_excel(),group_rows(), andidd_vat_results()for refining the data.
4. Edit or extend the transformation logic
- The transformation logic runs through a Python handler function that uses safe built-in libraries such as:
pandasrequestsio
- You can use the event payload to access:
upload_link→ destination for the output file.invoice_doc.external_link→ source file location.
- The script applies transformations, then uploads the final file using:
„`python
write_to_excel(df, url)
5. Review the email notification setup
- The Invoice Processing Notification step automatically emails the processed file.
- The recipient (e.g., accounting@company.com) is notified once the document is ready.
- Example message:
“Dear Accounts Payable department of company.company_name,
Attached you will find the processed invoice supplier_invoice.external_invoice_id from supplier_invoice.supplier_name.
Best regards,
Fleet team company.company_name”
6. Add custom communication or logic
- You can include a personalized message for colleagues in the notification email.
- Extend the workflow with additional automation logic, such as:
- Sending to different recipients per legal entity.
- Enabling one-click confirmation for faster approvals.
7. Confirm workflow completion
- Once the file transformation and notification steps are complete, the accounting team can immediately import the processed invoice.
- This automation ensures efficient documentation and eliminates manual formatting work.
Tip:
Add a friendly message for colleagues — and remember, Headlight workflows can be extended endlessly with custom logic to fit your organization’s needs.
Continued in Part 5