Alegra automation · runs daily
Record bank payments on Alegra invoices
Money lands in your bank account, and each transfer still has to be matched to an open invoice and entered in Alegra with the right date, bank account and payment method.
Cotlet does it in your own Alegra account with list_invoices, list_bank_accounts and record_payment, called by your AI agent, an n8n workflow or a script.
Hosted · nothing to install or maintain
Can Alegra do this on its own?
Alegra has an API that records payments, and Zapier has a Create Invoice Payment action (checked 14 Oct 2026). Alegra's official MCP server can read payments but cannot create one. Alegra does not match bank transfers to invoices for you outside of bank reconciliation.
How you do it in Alegra today
- You open the Ingresos menu, choose Facturas de venta and open the invoice the transfer belongs to.
- You click + Agregar pago and fill the pop-up: Fecha, Cuenta bancaria and Método de pago, then click Agregar pago.
- For anything unusual you click Ir a formulario avanzado, where one payment can be tied to several invoices at once.
- Later you reconcile the bank account in Alegra, which only works for payments you entered.
- A wrong payment is voided, not deleted, and only payments that are not reconciled can be deleted.
How to record bank payments on Alegra invoices
Here are yesterday's incoming transfers from my bank statement. Match each one to an open Alegra invoice by client and amount, record the payment on the Bancolombia account, and list anything that does not match. - 01
Find the invoice behind each transfer
list_invoices runs with status open and the client from the statement line. A transfer matches only when the amount equals the balance of exactly one open invoice for that client.
- 02
Resolve the bank account once
list_bank_accounts returns the account IDs, and the agent maps the account named in your prompt to its ID. An unknown account name stops the run before any payment.
- 03
Hold back the doubtful ones
A transfer that matches two invoices, a part payment, or no invoice goes to a list for you, with the closest candidate named.
- 04
Record each payment
record_payment is called per match with the statement date, the amount and the method transfer. Each call asks for your confirmation by default, so a wrong match is stopped before it posts.
- 05
Report what is still open
The response of every call shows the new balance. The agent reports invoices now fully paid, those with a balance left and the transfers it could not place.
What you get back
Transfers read: 4
Payments recorded: 2
- Northwind Studio, FV-0042, 1,130.50 on 2026-10-20, balance now 0.00
- Lumen Dental, FV-0035, 571.20 on 2026-10-20, balance now 0.00
Needs you: 2
- 300.00 from "J. Ortiz": no open invoice for that name
- 400.00 from Harbor Cafe: two open invoices of 400.00 Other ways to ask
- Record the payment of 1,130.50 on FV-0042 as a transfer into my main account, dated October 20.
- List open invoices whose balance equals one of these amounts, but do not record anything.
- Every morning, record yesterday's transfers from this file and email me what did not match.
- Show payments received in the last 7 days with the invoice each one settled.
What Alegra allows, and what to know first
- Alegra needs a date and a bank account ID for every payment, and the payment method is one of cash, check, transfer, deposit, credit-card or debit-card.
- One Alegra payment can settle several invoices, but record_payment books one invoice per call so each match is confirmed on its own.
- Alegra does not delete a voided payment: it stays in the list and can be restored with Convertir a abierta.
- Only payments that are not yet reconciled with the bank can be deleted in Alegra.
- Alegra shows the total, the amount paid and the balance on the invoice, and a payment of the full balance leaves it at zero.
record_payment asks for your OK by default. To run it daily without you, switch confirmation off for that tool in your dashboard.
Sources: Alegra Help: Register and manage your received payments · Alegra Help: Manage your bank accounts in Alegra · Alegra developers: Create a payment · Alegra triggers and actions on Zapier
Call record_payment from a script
curl -X POST https://cotlet.dev/api/v1/alegra/invoices/1042/payments \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":1130.5,"date":"2026-10-20","bank_account_id":"2","payment_method":"transfer"}' {
"payment_id": "311",
"invoice_id": "1042",
"number": "FV-0042",
"date": "2026-10-20",
"amount": 1130.5,
"payment_method": "transfer",
"bank_account": {
"bank_account_id": "2",
"name": "Bancolombia"
},
"total": 1130.5,
"total_paid": 1130.5,
"balance": 0
} MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is alegra_write → record_payment. Example data.
Schedule it in n8n, Make, Zapier or cronAlegra tools this automation uses
| Tool | Parameters |
|---|---|
| list_invoices | status, client_id, due_before, date_from, date_to, limit, cursor |
| list_bank_accounts | none |
| record_payment | invoice_id, amount, date, bank_account_id, payment_method |
Frequently asked questions
Is it safe to connect Alegra to Cotlet?
Yes. You sign in to Alegra yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Alegra once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.
Give your agent access to Alegra.
Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Alegra.