Skip to content

Excel From Summary

This module generates a CSV file from a summary array (data.summary) that typically contains results from batch processing or iterations. Each summary element is flattened by extracting the index, status and record fields. Nested record fields are serialized as JSON strings. The resulting file is saved in the server’s temporary folder and is available for later use in the workflow (email sending, FTP upload, etc.). It is useful for generating reports of bulk processing results.

ParameterTypeRequiredDescription
credentials_idstringNoCredentials ID (reserved for future use).
protocolstringNoProtocol (reserved for future use). Default sftp.
localPathstringNoLocal path (reserved for future use).
remotePathstringNoRemote path (reserved for future use). Default /.
{
"nextModule": "siguiente_modulo",
"data": {
"summary": [ "..." ],
"excel": {
"filename": "summary_1711234567890.csv",
"path": "/ruta/temporal/summary_1711234567890.csv"
}
}
}

The input data must contain a summary array:

{
"summary": [
{ "index": 0, "status": "success", "record": { "id": 1, "name": "Item A" } },
{ "index": 1, "status": "error", "record": { "id": 2, "name": "Item B" } }
]
}
  • Requires data.summary to be an array, otherwise returns an error
  • Each record is flattened with record. prefix for record fields
  • Nested objects within the record are serialized to JSON string
  • The file is saved in the current process temporal/ folder
  • The filename includes a timestamp to avoid collisions
  • Uses the json2csv library to generate the CSV
  • Original data is preserved in the output along with the reference to the generated file