I'm Michael from Germany, and I'm pretty new to Node-RED. I recently built a machine for vacuum testing and now want to create a protocol for the testing process.
The protocol should include information like:
Which functions were activated during the test,
Who performed the test,
Which part was tested, and so on.
The idea is to send this protocol via email to a specific address. Ideally, the flow would generate a PDF document with all the collected values and the company’s logo.
Right now, I’m having an issue with sending the email, and I think it might be because of the format of the values. I’m also not sure how to properly use the pdfmake node.
I’ve attached my flow and would really appreciate it if someone could help me out or share some tips on how to make this work. Thanks a lot in advance!
I don't think I've ever actually bothered to send an email from Node-RED myself so not totally sure I can help with that - though I'm sure we could work it out.
However, a question. Why a PDF? Those are a pain to work with and generally are not accessible which might be an issue for you given EU laws in that area.
Instead, why not simply make use of HTML in the email?
For your logo, I recommend running through an online tool to fully optimise it and then run it through a tool to turn it into a data url. That will let you embed it into an HTML email and have the email client's more reliably display it.
All modern email clients will accept HTML emails and will deal with basic formatting. Just avoid JavaScript, external fonts and overly complex CSS.
@TotallyInformation : Hey, thanks for the tip! Yes, implementing it with HTML could also be an option. As I mentioned, I’m new to this topic and don’t know much yet. At the moment, it’s not working at all, and I’m getting an error message.
I believe my email setup is configured correctly. I’m using ioBroker, and in the email settings, there’s an option to send a test email. That works fine. I think the issue is with the setup in Node-RED. That’s probably where things aren’t working as they should.
GMail, Outlook, etc all use Modern Authentication methods which generally means that you need to create an application code for logging in from a system.
For those, you may have to use the OAuth2 option but you will need a suitable token from the service.
For what I can see, web.de requires the part BEFORE the @ symbol as your user id and it should accept the basic login.
Okay, I’ll try this with Gmail tonight. @jbudd, thanks for the link!
I’m wondering if the issue is related to the email node itself, or if I made a mistake earlier in the flow. I’ve collected multiple values and combined them using a join node.
Do I need a function node as well to format the data, or can I connect the output of the join node directly to the email node?
and i changed the name to vacucheck (without the @symbol an web.de)
but it doesn´t work. the Test function in iobroker works with nr 465)
but here in Node red : It still doesn't work
Hey, I’m very happy to say that it’s now working with Gmail. I’m really, really happy—thank you so much for your help!
I want to create a test protocol that collects all the data in my flow. I already have a script in my function node, but unfortunately, it’s not working. It was created with ChatGPT. Maybe someone can check it to see what the problem is?
Thats the code :