Hi Xano community,
Can anyone help me? I'm struggling to send a pdf attachment using Sendgrid.
I'm correctly set up on both sides because emails (without attachments) are sending without issue and populating dynamic templates correctly.
My attachment set up is as follows:
attachments: [ {
content: JVBERi0xLjMKJf////8KMSAwIG9iago8PCAvQ3JlYXRvciA8ZmVmZjAwNTAwMDcyMDA2MTAwNzcwMDZlPgovUHJvZHVjZXIgPGZlZmYwMDUwMDA3MjAwNjEwMDc3MDA2ZT4KPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cKL1BhZ2VzIDMgMCBSCj4+CmVuZG9iagozIDAgb2JqCjw8IC9UeXBlIC9QYWdlcwovQ291bnQgMQovS2lkcyBbNSAwIFJdCj4+CmVuZG9iago0IDAgb2JqCjw8IC9MZW5ndGggMjE0NDIKPj4Kc3RyZWFtCnEKL0RldmljZVJHQiBDUwowLjkwMTk2IDAuOTAxOTYgMC45MDE5NiBTQ04KNDQuMCA3NTYuMCBtCjU2OC4wIDc1Ni4wIGwKNTcyLjQxODI4IDc1Ni4wIDU3Ni4wIDc1Mi40MTgyOCA1NzYuMCA3NDguMCBjCjU3Ni4wIDU1OC42NjY2NyBsCjU3Ni4wIDU1NC4yNDgzOSA1NzIuNDE4MjggNTUwLjY2NjY3IDU2OC4wIDU1MC42NjY2NyBjCjQ0LjAgNTUwLjY2NjY3IGwKMzkuNTgxNzIgNTUwLjY2NjY3IDM2LjAgNTU0LjI0ODM5IDM2LjAgNTU4LjY2NjY3IGMKMzYuMCA3NDguMCBsCjM2LjAgNzUyLjQxODI4IDM5LjU4MTcyIDc1Ni4wIDQ0LjAgNzU2LjAgYwpoClMKcQpxCgpxCjU0MC4wIDAuMCAwLjAgNzIuMCAzNi4wIDY4NC4wIGNtCi9JMSBEbwpRClEKL0RldmljZVJHQiBjcwowLjI1MDk4IDAuMzAxOTYgMC4zNDExOCBzY24KCnEKNjQuMCAwLjAgMC4wIDY0LjAgNjYuMCA1OTYuNjY2NjcgY20KL0kyIERvClEKCkJUCjY3Ljc2IDU4My41ODY2NyBUZAovRjIuMCA4IFRmCjwzMzM0NjE2...
... 283397 more,
filename: ticket - virgin active 947 ride joburg road 2024 - uj78w7ex7mhs0u8w.pdf,
type: application/pdf,
disposition: attachment
} ]
I've tested the Base64 string on a decoder platform and it is encoded correctly. The file itself is only 44kb so size isn't an issue. I've attempted to send three different pdfs.
This is my SendGrid set up:
This is my JSON set up:
I'm suspecting the problem may be with how I've created the JSON: I wasn't sure whether Sendgrid needs me to add "to", "from", "msg" etc, but that stuff seems to all be integrated already.
Any advice would be much appreciated.
(Kindly note I'm a non-coder, so please use small words...)
Marisa