Are there any modern sendGrid examples with PDF files?

Hi Anthony - Thanks for your reply. I am already comfortable with the URL piece; the part that’s unclear to me is using Wix to implement SendGrid’s functionality to convert that URL to an encodable PDF. Their USE_CASES.md from the original post doesn’t do much in the way of useful WIX code.

To clarify the post title, This old topic no longer is valid when I try to work the code into a 2024 Wix site. And this topic is all the way from 2017 but they are asking the same basic question that I am. We’re trying to take a PDF and attach it to a sendGrid e-mail.

If we can find a solution here, I would ask the Wix team to include it in the FAQ write up.
People have been using SendGrid to send file attachments (PDFs / images) for a long time, and it would help to have an example from 2024 in the forums here or in the how-to articles where all the code is up to date. The Wix libraries have certainly updated since 2017 as have the @sendgrid/mail calls – and rightfully so. But because using Velo on Wix isn’t the exact same thing as a pure node.js implementation it’d be nice to see how the two work together on file attachments.

Anyway, Anthony, do you have example backend code that allows the PDF to be sent?