Excel > HTML > PDF. Questions!

Converting Excel to PDF

Hi all,

I want to build a flow that:

  1. Takes a user-uploaded Excel file
  2. Extracts values from it
  3. Puts said values into HTML
  4. Sends that HTML to an external HTML-to-PDF API (don’t yet know which)
  5. Gets a PDF back from the API
  6. Sends PDF to the user

Would appreciate your assistance with some stuff:

  1. Does the flow make sense to you? Am I missing something simpler to build/implement?
  2. The Excel file contains data for a price quote. As such it will contain items that will appear once in the end document (Quote number, client name, etc.) and some “line items” that might be multiple (the different items/prices/quantities included in the quote). Not sure how to handle that. Start with an HTML node to loop over the extracted the line items, building an HTML snippet from each, and then putting all the snippets in another HTML node, which also houses the “single” values?
  3. Any suggestions on a specific API to use? Needs to be dirt cheap, or free (I’ll be converting a maximum of 200 Excel files a month)

I’m using Cloud n8n, if that matters.

Hello @HvrAdmin, how are you?

Excellent flow. In your scenario, you could use apitemplate.io, and it has a native node in n8n. But in the case of apitemplate.io, it receives the data in a specific JSON (you define the structure), and the PDF is built in HTML on the apitemplate.io platform.

If this is what you need, mark this answer as the solution; other users may have the same question as you.

1 Like

For HTML to PDF, you can use this native node: HTML to PDF integrations | Workflow automation with n8n

You can use it without having to deal with the HTTP Node.

1 Like

Hey!

This is a very interesting workflow:

  • Because the data you’ll be sending to the API is going to be quite structured, you’d benefit from having HTML templates and not storing or generating them dynamically, instead just filling the “blanks” in with the API hosting the HTML template.
  • PDFMyHTML.com does that quite well, I’ve built a workflow that leverages that API, but for invoice generation:
1 Like