Send report to student very easy to understand

Is there a way to send an email to the student with the result of his exam that is easily understood?

In fact, I saw that it is possible to send an email to the student, who can enter their email in a special field, but then the email that arrives is very difficult to understand because the data is in json format or other format. Instead.
I would like the student to receive a comprehensible e-mail with the data ordered within it or a google sheet directly, with the fields ordered.

Is it possible and in what way?

thanks for the precious collaboration.

Please choose an appropriate sub-category to post your question or topic.

Hi,

You should create an HTML template then fill in the report data. I’ve created a sample for it. Please take a look.

The email will look like the below screenshot. You can customize the code to adapt to your needs.

Regards,

Dear Namnt, the result is very effective indeed.

I made the copy of your google sheet and the deployment (I insert my email).

I just didn’t understand how to make the user insert his email before or at the end of the quiz so that he can receive the result of the quiz in the beautiful formatting you prepared.

Can I ask you the courtesy of sending me a sample template so it is easier for me?

Can I also ask you if instead of sending the email there is a system where the user presses a button and downloads the result of the quiz in pdf?

Thanks for your valuable collaboration.

Hi,

=> You should prompt users to enter their emails before the quiz. I attached a sample (.approj file) in this topic:

=> Please take a look at this topic. The report is in PNG image format.

For your convenience, I’ve attached the sample here: https://talk.atomisystems.com/uploads/default/original/1X/b05ffd8e1b745318998bea441dcd80aa61a84bf7.approj

Regards,

Dear Namnt,

thank you very much!

Now I will try your solution.

1 Like

Dear Namnt

I tested your solution and I’ve a problem.

If you use this google sheet

(with your template SendReportEmail.approj), and change the email with my email, I got the test result with your nice formatting in my email and recorded in the google sheet.

However, the email did not reach the potential user who entered in your template (SendReportEmail.approj).

I have tried with your excel sheet

and the messages arrive to user, but without the nice formatting.

I noticed a difference in code between the two google sheets.

Can you please check and make sure that the first template with the beautiful formatting allows you to send the email as well as me to the user with the beautiful formatting?

Thank you very much!

Hi,

Please remove the first line of the script in “Email Data Formatted” Google Sheet. Then add
var TO_ADDRESS = name; // Email to receive the report data
to the line after
var name = report["UserID"];

You can see the changes in the below image.

Regards,

Dear namnt, the file runs very well. Very good!!!

Only one question: can you tell me the code to add for to send the email also to my email address which I decide, please?

So the code send 2 email: one for the user one for me and also register the result of quiz in the google sheet (very very good…).

Thank you very much

Hi,

Yes, it is possible.

Please just add CC or BCC field in sendEmail function:

MailApp.sendEmail({
to: TO_ADDRESS,
cc: ‘abc@xyz.com’,
bcc: ‘abc@xyz.com’,
subject: “Report Data” + " - " + report.Name,
htmlBody: overviewTemplate + ‘
’ + detailTemplate
});

Please take a look at this guide, it might be helpful:

Regards,

Dear namnt,

thank very much!

I tried to use your code and at end I understood to fix the code as below:

[quote=“namnt, post:9, topic:4764”]
MailApp.sendEmail({
to: TO_ADDRESS,
cc: ‘abc@xyz.com’,
bcc: ‘abc@xyz.com’,

So it runs very well!

By Gianluca

Hi Gianluca,

Yes, you’re right. There is a mistake in my code. Anyway, that’s good as everything is OK now.

Regards,