Skip to content

HubfiscalExportPdf

Exports ticket files (PDF and/or HTML) stored in the Hub Fiscal database. The behavior adapts based on the number of documents requested:

  • Single document: Returns the individual file (PDF or HTML) with a direct download URL.
  • Multiple documents: Generates a ZIP archive containing all tickets, organized by country subfolders (e.g. PT/, ES/).

The output format is compatible with other Floogos file export nodes (createCsv, saveToExcel) returning { filename, filePath, urlPath }.

FieldTypeRequiredDescription
credentials_idcredentialsYesHub Fiscal SQL Server (MSSQL) credential
document_idstextYesDocument ID(s): single ID, comma-separated list, or {{variable}} with array
formatselectNoExport format: pdf, html, or both. Default: pdf
output_nametextNoBase filename for ZIP (no extension). Default: hubfiscal-export
timeouttextNoTimeout in milliseconds (default: 60000)

Uses the same credential type as HubfiscalCreateDocument (hubfiscalCreateDocument provider).

{
"filename": "FT-2026-1-1712345678.pdf",
"filePath": "/www/wwwroot/floogos/engine_us1/temporal/cli_123/FT-2026-1-1712345678.pdf",
"urlPath": "https://us1.floogos.com/download/cli_123/FT-2026-1-1712345678.pdf",
"document_id": 42,
"format": "pdf",
"total_documents": 1
}
{
"filename": "hubfiscal-export-1712345678.zip",
"filePath": "/www/wwwroot/floogos/engine_us1/temporal/cli_123/hubfiscal-export-1712345678.zip",
"urlPath": "https://us1.floogos.com/download/cli_123/hubfiscal-export-1712345678.zip",
"format": "zip",
"total_documents": 15,
"total_found": 15,
"size_bytes": 245760,
"documents_exported": [
{ "id": 42, "order_number": "PT14684", "fiscal_doc_number": "FT 2026/1", "country_iso": "PT" },
{ "id": 43, "order_number": "ES10521", "fiscal_doc_number": "FT 2026/2", "country_iso": "ES" }
]
}
hubfiscal-export-1712345678.zip
├── PT/
│ ├── FT-2026-1.pdf
│ ├── FT-2026-2.pdf
│ └── FT-2026-3.html
└── ES/
├── FT-2026-10.pdf
└── FT-2026-11.pdf

Export a single document PDF:

{
"credentials_id": "10",
"document_ids": "{{hub_document_id}}",
"format": "pdf"
}

Export multiple documents as ZIP with both formats:

{
"credentials_id": "10",
"document_ids": "1,2,3,4,5",
"format": "both",
"output_name": "facturas-abril-2026"
}

Chain with HubfiscalGetDocuments to export filtered results:

HubfiscalGetDocuments (filter by date + country) → EditFields (extract IDs) → HubfiscalExportPdf
  • Uses the archiver library for ZIP generation with zlib compression level 6
  • Documents without ticket content in the requested format are skipped (not included in ZIP)
  • The download URL uses the standard Floogos /download/:path_cli/:filename endpoint
  • Files are stored in the temporal/cli_{client_id}/ directory on the server
  • The total_found vs total_documents difference indicates documents without ticket content
  • ZIP files organize tickets by country ISO code subfolders for easy navigation
  • The timeout default is 60000ms (1 minute) since large exports may take longer