https://discord.gg/botpress logo
PDF Generator
# 🤝help
e
Hello, I want to make a feature for my chatbot to be able to print out pdf invoices. I installed the PDF generator integration. I was wondering if someone could let me know how it works. Like in the html field I supposed that I'd write down my script but it does not let me write code there! Please let me know! Thanks alot! https://cdn.discordapp.com/attachments/1388564100090564750/1388564100602396724/image.png?ex=68617097&is=68601f17&hm=210960cd1f1b9f8026614064d2e4f174c9bfed0154fabb62789d02a5760a5d1b&
w
Use a variable in code block to write proper html and give the card your variable
e
wait i didnt get that, like create a new variable and add the code to it as a value?
could you please elaborate further? thanks alot!
so basically create an execute code card like that?
Copy code
workflow.invoice_html = `
  <html>
    <body>
      <h1>Invoice #{{workflow.invoice_number}}</h1>
      <p>Client: {{workflow.client_name}}</p>
      ...
    </body>
  </html>
`
w
yep that's the idea