How to add image as a parameter to triggered emails?

I want to send triggered email with relevant image to the user. The image is in the database. How do I create a parameter in the triggered email, and on the other side, how do I pass image as a parameter in the wixCRM.emailContact function?

You will first have to load the right contact-data…
https://www.wix.com/velo/reference/wix-crm-backend/getcontactbyid

  1. After you have found the right one, do some console-logging onto the results. See what are the results and what is the result-structure.

  2. PICTURE should already be included…

Dima thank you for your help, but it’s not the users picture’s that I want to send in the triggered email. My site is a kind of a log book where workers can upload and track reject from the work floor. When the user reports on reject there is an option to upload a picture to describe the problem. After, the user can send triggered email to chosen contact person with the picture (the picture is stored of course in the database as part of the rejected item).

Is this what you need?

https://www.wix.com/velo/reference/wix-media-backend/events/introduction

No, thank you Dima once again:)
I know how to handle the file, but the question is if and how it’s possible to send the picture in triggered email

@osnat_po
Ok, next try. Perhaps this post can help you…

https://www.wix.com/velo/forum/community-discussion/triggered-emails-to-contacts-2020

Ok, i got it! I think now i know your PROBLEM :sweat_smile:

This could be the right “source of knowledge” :laughing:
https://www.wix.com/velo/forum/community-discussion/include-images-documents-in-form-submission-email

1 Like

I believe that it’s not currently possible to add an image as a parameter to a triggered email. I suggest that you reach out to Wix Customer Care for assistance with Triggered Emails as they might be aware of a solution.

Wix is constantly working on improving the developer experience. Feel free to make your voice heard. The Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.

Meanwhile, you can send the email on your own using the techniques outlined in Velo Tutorial: Sending an Email on Form Submission . It’s also worthwhile to take a look at the Sendgrid NPM Integration example.

2 Likes

Damn! That was the reason, why i could not find any answer on it :sweat_smile:
But wait, my last suggestion was about —> “form-submission”. Than it was the right direction.

https://www.wix.com/velo/forum/community-discussion/include-images-documents-in-form-submission-email

P.S.: Good morning Yisrael. :grin:

3 Likes