
Automate Factur-X and ZUGFeRD e-Invoices in Python with PDF.co
15 MIN READ
This tutorial shows how to convert a CSV file or an Excel worksheet to PDF, then save the generated file to SharePoint.
Use the official PDFco connector and connect with your PDF.co API key. The connector is Premium in Power Automate, so confirm that your account and environment allow its use.
Create an Instant cloud flow, select Manually trigger a flow, and name it Convert Spreadsheet to PDF.
Start with a small input file. For the CSV example, save the following content as orders.csv:
Order,Customer,Total
ORD-101,Example Studio,120.00
ORD-102,Sample Workshop,85.50Provide a download URL that PDF.co can retrieve. A SharePoint or OneDrive preview link requiring your browser login is not sufficient.
Follow the Power Automate file-source guide to prepare an accessible source. If your organization does not permit shareable links, use an approved file-upload method rather than changing access permissions for this example.
Add an action, search for PDFco, and choose the appropriate conversion.
Select PDF from CSV and configure:
orders.csv.orders.pdf.Select PDF From Spreadsheet and configure:
0 for the first worksheet or 1 for the second.worksheet.pdf.The worksheet index selects a sheet, not a PDF page. Although PDF from CSV also accepts XLS/XLSX files, PDF From Spreadsheet provides the explicit worksheet-selection field.
Before downloading the output, confirm that the conversion completed successfully and Error is false.
For longer conversions with Async enabled, pass Job Id to Background Jobs Check. Check again after a short delay while the status is working; proceed only on success, and stop on failed or aborted.
Add an HTTP action:
GET.Next, add SharePoint’s Create file action:
orders.pdf or worksheet.pdf, matching your example.Use the downloaded file content—not the URL string—in File Content. Save the PDF before its temporary download link expires. For repeated runs, use unique filenames to avoid naming conflicts.
If you add an email notification, link to the saved SharePoint file.
Save the flow and run a manual test. Open the PDF stored in SharePoint and compare it with the source.
If content is clipped or difficult to read, adjust the source workbook’s layout and run another test.
Your flow now converts the source file and stores the PDF itself, ready for sharing or further processing.
That’s how easy it is to convert a CSV file to PDF using the PDF.co Power Automate plugin.
Create an account, get an API key and test a request.