Facturama automation
Collect your monthly Facturama CFDI XML and PDF files
At month end your accountant asks for the XML and PDF of every invoice you issued, and you open and download them one by one.
Cotlet does it in your own Facturama account with list_invoices and download_invoice_file, called by your AI agent, an n8n workflow or a script.
Hosted · nothing to install or maintain
Can Facturama do this on its own?
Facturama has reports that download your issued and received invoice history, and the API module includes query (checked 14 Oct 2026). Facturama has no MCP server and no feature that hands the files to your accountant.
How you do it in Facturama today
- You sign in to Facturama in the browser (Iniciar sesión).
- Facturama stores your invoices in the account and has reports to download the history of issued and received invoices.
- You open each invoice you need and download its PDF and its XML.
- You check that the list matches what you issued and pass the files to your accountant.
- A missing invoice is noticed only when the accountant asks about it.
How to collect your monthly Facturama CFDI XML and PDF files
List every invoice I issued last month in Facturama, download the XML and PDF of each, and give me a table with folio, client, total and UUID. - 01
Pull the month
list_invoices runs with the first and last day of the month and follows the cursor until the list ends, so a busy month is read in full.
- 02
Separate stamped from cancelled
Cancelled invoices are listed apart in the report by their status, so the accountant sees which ones no longer count.
- 03
Download both files per invoice
download_invoice_file runs twice per invoice, once for the XML and once for the PDF. A failed download is retried once and then listed.
- 04
Build the table
The agent adds a row per invoice with folio, client, total and UUID, and a total line you can compare with your own books.
What you get back
Month: 2026-09
Invoices: 14 (13 stamped, 1 cancelled)
Files downloaded: 26 of 26 (13 XML, 13 PDF)
Total stamped: 48,720.00 MXN
First row: FAC-88, Estudio Norte SA de CV, 1,160.00 MXN, 6f1c2a90-3b7e-4d55-9a1e-0c52b8e4d7a1 Other ways to ask
- Download only the XML files for September and name each one with its folio.
- Show last quarter's invoices grouped by client with the total for each.
- On the 2nd of each month, collect last month's files and tell me which invoices are cancelled.
What Facturama allows, and what to know first
- Facturama stores invoices in the account and has reports to download the history of issued and received invoices.
- Facturama lets you download both the PDF and the XML of an invoice.
- The UUID of a stamped invoice sits under Complement.TaxStamp.Uuid in the Facturama response.
- Facturama's reports cover issued and received invoices, so check the month against your own list of what you issued.
Every tool here only reads, so it can run on a schedule from n8n, Make, Zapier or cron without waiting for your OK.
Sources: Facturama: online electronic invoicing · Facturama docs: first invoice · Facturama: API overview
Call download_invoice_file from a script
curl "https://cotlet.dev/api/v1/facturama/invoices/Y61TLX-Ls_ZJFqzjanPN1w2/file/download?format=xml" \
-H "Authorization: Bearer $COTLET_API_KEY" {
"invoice_id": "Y61TLX-Ls_ZJFqzjanPN1w2",
"format": "xml",
"file_name": "FAC-101.xml",
"content_base64": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4="
} MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is facturama_read → download_invoice_file. Example data.
Schedule it in n8n, Make, Zapier or cronFacturama tools this automation uses
| Tool | Parameters |
|---|---|
| list_invoices | issued_since, issued_until, client_rfc, limit, cursor |
| download_invoice_file | invoice_id, format |
Frequently asked questions
Is it safe to connect Facturama to Cotlet?
Yes. You sign in to Facturama yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Facturama 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 Facturama.
Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Facturama.