Generate PDFs in n8n with Gotenberg (for free!)

Поділитися
Вставка
  • Опубліковано 20 вер 2024

КОМЕНТАРІ • 42

  • @workfloows
    @workfloows  5 місяців тому +4

    Hello, thank you for watching my video!
    In the new version of n8n "Move Binary Data" node has been replaced with "Convert to File". I prepared a new workflow file, so you can easily run this automation in new version of n8n: gist.github.com/workfloows/c35fe2380ad56bcd9d4dcf6cb6dff833

    • @damienbushby1423
      @damienbushby1423 5 місяців тому

      Thanks for the workflow. It worked well with just one edit. I will be looking through some of your other videos. I hope you will also have the workflow json file available there too.

  • @binaryb4sher
    @binaryb4sher Місяць тому

    This was a great walkthrough @workfloows thanks for sharing.
    I'm hoping this might replace a complex set of azure functions, log files, orchestration code and data factory... of course, it'll require more than you've demonstrated, but I do like the idea of using n8n and gotenberg to manage the process and pdf generation. Sweet!

  • @sevenelven
    @sevenelven 3 місяці тому +1

    If you're using compose you don't need to issue the compose down command, just simply run pull and up or if you want to recreate all containers you can pass the --force-recreate flag.

    • @workfloows
      @workfloows  3 місяці тому +1

      Hey, thanks for your comment and sorry for my delayed response. This is a a valuable tip, thank you for sharing!

  • @shwet6189
    @shwet6189 Рік тому +2

    Nice video buddy keep making n8n content ,i recently got to know about this tool it is very powerful,capable but to use it for many is by no mean easy so your guides can really help for n8n there are so many service integration available from some most used services if u can make videos on it will be best :-)

    • @workfloows
      @workfloows  Рік тому +1

      Thanks a lot for your comment! I will definitely keep creating those tutorials and I will do my best to involve some cool services and APIs in future workflows. I’m glad my videos bring you value and I’m more than happy to have you as my viewer. Cheers!

    • @shwet6189
      @shwet6189 Рік тому +1

      @@workfloows going through your videos really awesome work buddy, this tool is open source so no ads and promotion and not too easy to use so not tooo popular BUT this tool can be soo much powerful if person like you guide us by making great videos ,cant find much videos or content till date for n8n and these videos will be greatest contribution from your side for open source automation soo keep learning and making videos at your pace if possible 😁I will also try to learn different things sooo much service integration soo many combos can be made really very capable software

  • @Soniboy84
    @Soniboy84 9 місяців тому

    Hey Oskar, was looking for how to generate PDF for invoice for customer on YT. Got your video as the first result. Seems like you're always the solution for all my problems lol...

    • @workfloows
      @workfloows  9 місяців тому

      Hey! Glad to hear that and I’m really happy that you find my videos helpful 😄
      Thank you very much for watching and for your kind comment!

    • @Soniboy84
      @Soniboy84 9 місяців тому

      ​@@workfloowsI watched all your videos, they're great. Please don't stop.
      I've redone this workflow, however used static HTML in code node to create an HTML for the invoice. I use an openblocks front-end to input invoice details in a form and have n8n receive it via a webhook.
      Never knew the pain to work with on-the-fly binary files until today 😂

  • @siddharthalodha
    @siddharthalodha 11 місяців тому +1

    Thanks. Helped me a lot.

    • @workfloows
      @workfloows  11 місяців тому

      You’re very welcome and thank you for your comment!

  • @FoLDx
    @FoLDx Рік тому +1

    Thank you for video. Couple of days ago i have installed n8n, but i'm confused that for so simple action like PDF i can't do "from the box" your solution is good, but i think in future they must add simple action to "create PDF"

    • @workfloows
      @workfloows  Рік тому +1

      Exactly, I also hope that solutions like Gotenberg are only temporary and soon we will be able to create PDF files in n8n itself. Thank you for your comment, I really appreciate it!

  • @dragon3602010
    @dragon3602010 5 місяців тому +2

    awesome thanks
    and what if the invoice is in multiple pages ?

    • @workfloows
      @workfloows  5 місяців тому +1

      Hey, thanks for your comment!
      If the document is long, it should split automatically between the pages. This should happen unless the Gotenberg properties are overwritten. You can also set header/footer to display number of pages in the doc.
      Have a look at Gotenberg documentation for more details: gotenberg.dev/docs/routes#page-properties-chromium

  • @Omnibas
    @Omnibas 4 місяці тому

    Hi Oskar, great tutorial. How would you include pagenumbers in the resulting PDF? I can't manage to upload the required footer.html and header.html into gotenberg, I end up with two files.

  • @MJApple
    @MJApple 7 місяців тому +1

    Hey Oskar! The new n8n has no convert to binary as you describe here. Any clue how to solve it?

    • @workfloows
      @workfloows  7 місяців тому

      Hey! Thanks for your comment and apologize for my late feedback.
      In new version of n8n "Move Binary Data" node has been replaced with "Convert to File". I prepared a workflow file for you, so you can easily run this automation in new version of n8n: gist.github.com/workfloows/c35fe2380ad56bcd9d4dcf6cb6dff833

  • @EliSpizzichino
    @EliSpizzichino 6 місяців тому

    For the file name you can set the header in the request: Name: Gotenberg-Output-Filename Value: my_file
    Unfortunately the new convert to html spills out formatted html + same content in text. I've avoided it converting to text, but is a bug

    • @workfloows
      @workfloows  6 місяців тому

      Hey, thank you for your comment.
      Yes - n8n node "Convert to HTML" has been updated some time ago and flow changed a bit. You can now select "Move Base64 String to File" in order to return correct HTML for Gotenberg conversion. Below please find example workflow with this node implemented.
      gist.github.com/workfloows/c35fe2380ad56bcd9d4dcf6cb6dff833

  • @damienbushby1423
    @damienbushby1423 5 місяців тому

    'Move Binary Data' node does not exist, I expect it is the 'Convert to File' node

    • @workfloows
      @workfloows  5 місяців тому +1

      Hey, thanks for your comment. Yes - in new version of n8n "Move Binary Data" node has been replaced with "Convert to File". I prepared a workflow file for you, so you can easily run this automation in new version of n8n: gist.github.com/workfloows/c35fe2380ad56bcd9d4dcf6cb6dff833

  • @DiegoEscorel
    @DiegoEscorel 5 місяців тому

    can I do this transformation with an HTML code too or just with a url?

    • @workfloows
      @workfloows  5 місяців тому

      Hello, thank you for your comment.
      With Gotenberg, you can generate PDFs both from HTML files or URLs - simply use the specific route when doing HTTP call (convert/url or convert/html). You can find more details about it in Gotenberg docs: gotenberg.dev/docs/routes

  • @chrisder1814
    @chrisder1814 Місяць тому

    hello I had an idea it was to make a robot that could remove the background from my images and put a white background instead
    a robot that could scan all the images on my site and remove all the backgrounds and change them to white backgrounds
    I thought it would be possible with the canva kind of api
    but first I wanted to know if it is possible to do more advanced stuff with the figma API for my background idea
    Can you tell me if this is feasible?

    • @workfloows
      @workfloows  Місяць тому

      Hey, thanks for your comment.
      Automation of this process should be feasible - you can use one of AI background removers to erase the background and further in the process replace it with the specific colour/image. Overall this should be doable.

    • @chrisder1814
      @chrisder1814 Місяць тому

      @@workfloows Yes I can do this with canva and other tools but I would like to do it automatically and I had some ideas but I don't know if these ideas are good and feasible, could I send you an email so you can tell me what you think?

    • @chrisder1814
      @chrisder1814 Місяць тому

      @@workfloows hello, do you know api connector?
      do you use AI for coding?
      can I find "templates" ?

    • @chrisder1814
      @chrisder1814 11 днів тому

      @@workfloows hello

  • @christian6820
    @christian6820 11 місяців тому

    I'm looking to generate a report and append a variable number of images to each report.
    save it as a pdf and maybe compress it.
    can you give me a pointer how you would try to achieve this task?

    • @workfloows
      @workfloows  11 місяців тому

      Hello, thanks for your comment!
      If you want achieve it using n8n and Gotenebrg, the best way would be to first set HTML element for each image (e.g. using “set” node). Next, in further steps of workflow, combine all elements together and put into HTML layout. Finally, generate PDF using Gotenberg.
      Alternatively, if you want to avoid using Gotenberg, you can create a PDF template in external tool (e.g. APITemplate or PDFMonkey) and make a simple HTTP request from n8n.

  • @GeorgivanCosta
    @GeorgivanCosta 8 місяців тому

    And to print automatically? type of delivery app that automatically prints as soon as an order arrives, Thank you

    • @workfloows
      @workfloows  8 місяців тому

      Hi, thank you for your comment!
      As far as I know, there are many ways to automate printing process - it depends strictly on your printer and its software. If you have a printer that enables you to trigger printing e.g. via email messages, you can easily do it with „send email” node in n8n. I’d recommend to go through docs of your printer and see what communication options it provides (email, API, cloud printing etc.) and then use this method to build the workflow.

    • @GeorgivanCosta
      @GeorgivanCosta 8 місяців тому

      @@workfloows Thanks bro, could you release this N8N flow for me, give me a study here, I'm still learning how to use it, that would be very useful for me

  • @mfauzi4357
    @mfauzi4357 7 місяців тому

    can we also use css file with this workflow?

    • @workfloows
      @workfloows  7 місяців тому

      Hello, thank you for your comment.
      It should be possible, but you’d need to modify the flow and create a separate path for CSS stylesheet. It’s also necessary to mention the file in core HTML file and modify POST request, to send both HTML and CSS file for conversion.
      Please have a look on Gotenberg docs for more details: gotenberg.dev/docs/6.x/html

    • @mfauzi4357
      @mfauzi4357 7 місяців тому

      @@workfloows Thanks for your answer, I tested it with other html, but why is seem like pdf converted using mobile view or not landscape like when it open in the browser