---
title: "Alegra Integration"
description: "Alegra is cloud accounting and electronic invoicing for Latin America and Spain. Agents create contacts and items, issue sales invoices through the electronic stamping flow, raise quotes and credit notes, and record supplier bills and payments."
url: https://flowrunner.ai/integrations/alegra
date_modified: 2026-09-04T14:53:04-07:00
---

# Alegra

[Accounting](https://flowrunner.ai/integrations/category/finance-accounting)

Alegra is cloud accounting and electronic invoicing for Latin America and Spain. Agents create contacts and items, issue sales invoices through the electronic stamping flow, raise quotes and credit notes, and record supplier bills and payments.

1 trigger · 52 actions · Basic auth · available

[Alegra website](https://alegra.com/) · [Platform Documentation](https://developer.alegra.com/) · Capability data verified 2026-08-24

1.  An order is confirmed in the storefront or the billing system
2.  Get Company reports which country the Alegra account belongs to
3.  List Number Templates returns the numbering available, and the agent reads which document kind each one produces
4.  Create Invoice writes the invoice with the country specific fields the account's rules demand
5.  Preview Invoice renders what the document will look like without issuing anything
6.  The buyer's tax identity is checked against what that country requires on an electronic document
7.  A finance owner approves the batch before Stamp Invoices files it

## What This Integration Enables

Alegra is eleven country products wearing one API. Colombia, Mexico, Costa Rica, Argentina, Spain and the rest each add their own required fields and their own code catalogs to the same endpoints, which is why a single hardcoded invoice payload works in one market and fails in the next. FlowRunner agents handle that by reading the account's country from Get Company and assembling the fields that country actually needs, rather than shipping a payload built for headquarters.

The other thing worth understanding before automating Alegra is that the number template decides what kind of legal document you just issued. A Mexican sales ticket, a Colombian POS equivalent document and an ordinary invoice all go through the same create call and differ by which numbering they carry. Pick the wrong one and you have produced a legally different document that looks correct in every respect. Agents run List Number Templates and read the document type rather than caching an id, and the [connectors](https://flowrunner.ai/concepts/connectors) FlowRunner builds are verified against each vendor's official API so the shape of that call is not guesswork.

### Without FlowRunner

**One process per country**: Each market's invoicing rules live in a different person's head, and the person who knows Colombia is on holiday

**Errors found after filing**: The wrong numbering or a missing tax field surfaces when the tax authority rejects the document

**Voids as routine cleanup**: Correcting a stamped invoice means a void with a reason code, and voids accumulate as a matter of course

### With FlowRunner

**Country rules read at runtime**: The agent asks the account which country it is and assembles that country's required fields rather than assuming one market

**Errors found before filing**: The preview and the tax identity check happen while the invoice is still editable

**Voids become exceptions**: Documents that would fail are stopped before stamping, so a void means something genuinely changed

## Use Case Scenarios

### Storefront order to stamped electronic invoice

An order settles in [Shopify](https://flowrunner.ai/integrations/shopify) or [WooCommerce](https://flowrunner.ai/integrations/woocommerce). The agent looks the buyer up with List Contacts, creating one with Create Contact if this is a first purchase, and checks the tax identity that the account's country requires on an electronic document. It selects the numbering with List Number Templates, calls Create Invoice with the country specific fields, and runs Preview Invoice to see the rendered document. Everything up to that point is reversible. Stamp Invoices is not, so the batch waits for a person. Once stamped, Send Invoice By Email delivers it and the invoice id posts back to the order.

### Supplier bills booked from an inbox

Supplier PDFs arrive by email or through [Dext](https://flowrunner.ai/integrations/dext). The agent extracts the supplier, the date and the lines, matches the supplier against List Contacts, then calls Create Bill. Alegra puts a bill's lines inside a purchases block, where an item books against the catalog and a category books straight to an accounting account, so the agent decides per line which of the two applies. Lines it cannot classify with confidence become [automation exceptions](https://flowrunner.ai/concepts/automation-exceptions) rather than defaults, and the bookkeeper sees the supplier, the amount and the two candidate accounts side by side.

### Collections that read the relationship first

On a schedule, the agent runs List Invoices for documents with a balance past their due date, then pulls each client's history with Get Contact and their earlier payments with List Payments. A first time late payer and a customer who has always paid on day forty get different messages. The agent drafts each one, posts the queue to [Slack](https://flowrunner.ai/integrations/slack) for the collections owner to release, and appends the outcome to a sheet in [Google Sheets](https://flowrunner.ai/integrations/google-sheets). Payments that arrive are recorded with Create Payment against the named invoice, in the right direction, because a payment's direction cannot be edited afterwards.

## Human-in-Loop Highlight

Stamp Invoices is where this connector stops being reversible. Before it runs, an invoice can be edited or deleted outright. After it runs, the only route back is Void Invoice, which in a country with electronic invoicing requires a cancellation reason code from that country's own catalog, and for one Mexican reason also the number of the invoice that replaced it. The call takes up to ten invoices, so a single wrong number template stamps ten legally wrong documents in one shot. The agent therefore assembles, previews and checks, then posts to the approver: "12 invoices ready to stamp for the Colombia account. Number template 4, documentType FE, isElectronic true. 11 buyers carry a NIT; Distribuidora Vega does not. Stamp the 11 and hold Vega, or hold all 12?" The approver decides. The agent is good at assembling country specific documents at volume. Choosing to make them permanent is a different job.

Agent processes routinely

Detects exception requiring judgment

Clear match Continues automatically

Ambiguous Routes to human via preferred channel

Human decides

Agent resumes with decision

## Agent Capabilities

52 actions

### Account and reference data

8

-   **Get Company** Returns the account's profile, including the country its rules come from. The cheapest way for a flow to learn which market it is operating in.
-   **List Taxes** Lists the tax rates configured on the account, used to set the right rate on an item or a line.
-   **List Currencies** Lists the currencies the account can issue in.
-   **List Payment Terms** Lists the payment terms available, used to set a due date consistently.
-   **List Number Templates** Lists the numbering available with its document type and whether it is electronic. Run this before issuing rather than caching an id.
-   **List Price Lists** Lists the price lists on the account, which is how an item carries more than one price.
-   **List Warehouses** Lists warehouses, used when stock matters to the document being issued.
-   **List Item Categories** Lists the categories items are grouped under.

### Contacts

6

-   **List Contacts** Lists customers and suppliers with paging. The lookup behind matching an order to an existing party.
-   **Get Contact** Retrieves a single contact, including the tax identity fields the country requires.
-   **Create Contact** Creates a customer or supplier. Only the genuinely universal fields are required; country specific ones travel in the properties hatch.
-   **Update Contact** Updates a contact. Editing is partial, so unsent fields are left alone rather than cleared.
-   **Delete Contact** Deletes a contact. Recoverable through Restore Contact.
-   **Restore Contact** Restores a deleted contact, which makes contact deletion the one cleanly reversible destructive operation here.

### Items

5

-   **List Items** Lists the catalog with prices and taxes.
-   **Get Item** Retrieves a single catalog item.
-   **Create Item** Creates a catalog item. Stock exists only when an inventory block is supplied at creation.
-   **Update Item** Updates a catalog item's price, tax or category.
-   **Delete Item** Removes a catalog item.

### Invoices

10

-   **List Invoices** Lists sales invoices filtered by status, date and contact. The read behind collections and reporting.
-   **Get Invoice** Retrieves a single invoice. Used to re-read a record after a trigger fires rather than trusting the delivered payload.
-   **Create Invoice** Creates a sales invoice. It arrives as a draft when no payments are attached and open when they are, so set the status explicitly.
-   **Update Invoice** Updates an unstamped invoice. Only the attributes sent are modified.
-   **Delete Invoice** Destroys an invoice. It works on a draft only; an open or stamped invoice is refused.
-   **Void Invoice** Keeps the record but removes its effect on the accounts. The correction path for a stamped invoice, and reversible with Open Invoice.
-   **Open Invoice** Returns a voided invoice to open.
-   **Send Invoice By Email** Emails the invoice to the customer.
-   **Preview Invoice** Renders the PDF the invoice would produce without creating anything, and returns a URL that expires after a short window.
-   **Stamp Invoices** Files up to ten invoices through the country's electronic invoicing flow. The irreversible step this page's human gate exists for.

### Estimates

6

-   **List Estimates** Lists quotes with their status.
-   **Get Estimate** Retrieves a single quote.
-   **Create Estimate** Creates a quote. Passing its identifier to Create Invoice later carries the items across and marks the quote invoiced.
-   **Update Estimate** Updates a quote's lines, dates or wording.
-   **Delete Estimate** Removes a quote.
-   **Send Estimate By Email** Emails the quote to the customer.

### Credit notes

3

-   **List Credit Notes** Lists credit notes on the account.
-   **Create Credit Note** Raises a credit note against a customer.
-   **Delete Credit Note** Removes a credit note.

### Bills

4

-   **List Bills** Lists supplier bills.
-   **Get Bill** Retrieves a single supplier bill.
-   **Create Bill** Records a supplier bill. Its lines sit inside a purchases block, booking either against the catalog or straight to an accounting account.
-   **Delete Bill** Removes a supplier bill.

### Payments

7

-   **List Payments** Lists payments in and out, used to prove a settlement was already recorded before recording it again.
-   **Get Payment** Retrieves a single payment and the documents it was applied to.
-   **Create Payment** Records a payment. Its direction, in or out, is permanent and cannot be edited afterwards.
-   **Update Payment** Updates a payment's allocation or details.
-   **Void Payment** Removes a payment's effect on the accounts while keeping the record. Reversible with Open Payment.
-   **Open Payment** Returns a voided payment to open.
-   **Delete Payment** Destroys a payment record.

### Webhooks

3

-   **List Webhook Subscriptions** Shows which event subscriptions are currently registered on the account.
-   **Create Webhook Subscription** Registers a subscription. Alegra's subscription object carries one event, so covering every event means several subscriptions.
-   **Delete Webhook Subscription** Removes a subscription.

## Triggers

1 triggers

### Event Triggers

1

-   **On Alegra Event** Fires on the documented create, update and delete events for invoices, bills, contacts and items, or on all of them at once. Alegra publishes no shared secret and no signing header for its deliveries, so the payload cannot be proven to have come from Alegra. Treat it as a hint that something changed, and re-read the record with Get Invoice or Get Contact before acting on anything that matters.

## Frequently asked questions

### What can FlowRunner do with Alegra?

FlowRunner agents can run Get Company, List Taxes, and List Currencies in Alegra, plus 49 more actions.

### Does connecting Alegra to FlowRunner require OAuth?

No. Alegra connects to FlowRunner with basic authentication (a username and password), no OAuth flow required.

### Can Alegra trigger a FlowRunner workflow automatically?

Yes. Alegra supports 1 trigger that can start a FlowRunner workflow automatically.

**Work at Alegra?** This integration exposes Alegra to AI agents on every FlowRunner plan, including through MCP, at no cost to you. [See what FlowRunner offers integration partners](https://flowrunner.ai/integrations/partners), including how to keep this page current.

---
Markdown version of https://flowrunner.ai/integrations/alegra. Site index: https://flowrunner.ai/llms.txt
