sendgrid-action
sendgrid-action copied to clipboard
How can i pass dynamic value as part of the email body
This Works well as long as body of the email is static. But what if i want to add something dynamically in the mail body ?
Basically this is what i want to do through github actions
1> Execute test cases through CI/CD pipelines 2> Upload coverage report to bucket on cloud (Initally wanted to send that as an attachment but gmail blocks attachment with .js extension) 3> Send email with the link of the uploaded report through sendgrid actions
I am able to achieve all 3 except i am not able to dynamically change the body of the email based on the output of other actions
Thank you
Hi @mihir-mehta
I'm not sure what is best here, but one idea would be to pass dynamic parts of the message body to the script as environment variables. Then read the environment variable in the script and use it in the message body.
Thank you Peter, Not sure exactly how to do that , will try it out... Thanks