How to make a cute report

Hi!!
I would like to know how can I make a report starting from a markdown code. After talking the client’s answers I asked gpt to full the fields in a template I write in the Js Code piece. Now I wouldd like to create a PDF starting from this, but I would like to add some style to it, what can I do?

@CarmenFry92 The built-in PDF piece (Text to PDF) only writes plain Helvetica text, so a styled report needs either HTML with CSS or a styled document template.

Option 1, HTML: convert the markdown with the Text Helper piece (Markdown to HTML), then wrap it with your CSS in a Code step:

export const code = async (inputs) => {
  const css = `
    body { font-family: Arial, sans-serif; color: #222; margin: 40px; }
    h1 { color: #3b5bdb; border-bottom: 2px solid #eee; padding-bottom: 6px; }
    table { border-collapse: collapse; width: 100%; }
    th, td { border: 1px solid #ddd; padding: 6px; }
  `;
  return `<!doctype html><html><head><meta charset="utf-8"><style>${css}</style></head><body>${inputs.html}</body></html>`;
};

Then send that string to an HTML to PDF renderer with the HTTP piece. Keep every rule inside the <style> tag, since renderers often skip external files.

Option 2, Google Docs: design the report once as a Doc with placeholders like {{client_name}}. In the flow, use Copy Document, then Edit Template File on the copy to fill the placeholders, then Export as PDF. Fonts, colours and logos stay exactly as designed, with no code.

(Disclosure: I’m connected to thirds.ai.)