FacturamaDescargar
Description
Section titled “Description”Downloads the XML (for fiscal archiving) or PDF (to send to the customer) of a CFDI registered in Facturama. Content is returned in base64, ready to save to storage, send by email, or attach to other systems.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Facturama account credentials |
| cfdi_id | text | Yes | Facturama internal CFDI ID |
| format | select | No | Format: ‘pdf’ (default) or ‘xml’ |
| cfdi_type | select | No | ’issued’ (default) or ‘received’ |
Output
Section titled “Output”{ "success": true, "cfdi_id": "abc123def456", "format": "pdf", "content": "JVBERi0xLjQg...", "content_type": "application/pdf", "filename": "abc123def456.pdf", "raw": { ... }}The content field is the file encoded in base64.
Usage Example
Section titled “Usage Example”Download PDF
Section titled “Download PDF”{ "credentials_id": "cred-facturama-prod", "cfdi_id": "abc123def456", "format": "pdf"}Download fiscal XML
Section titled “Download fiscal XML”{ "credentials_id": "cred-facturama-prod", "cfdi_id": "abc123def456", "format": "xml"}Typical Flow
Section titled “Typical Flow”- FacturamaCFDI — issue CFDI → gets
cfdi_id - FacturamaDescargar — download PDF in base64
- SendMail — attach the PDF to the customer’s email
- The base64 content can be used directly with the
SendMailnode as an attachment - To save to S3/GCS, convert the base64 to a buffer before uploading
- The signed XML is the legally valid fiscal document with the SAT
Related Nodes
Section titled “Related Nodes”- FacturamaCFDI - Issue a CFDI
- FacturamaCancelar - Cancel a CFDI