diff --git a/bindings/twilio/sendgrid/sendgrid.go b/bindings/twilio/sendgrid/sendgrid.go index 558e2923cf..9f20bf242e 100644 --- a/bindings/twilio/sendgrid/sendgrid.go +++ b/bindings/twilio/sendgrid/sendgrid.go @@ -185,7 +185,11 @@ func (sg *SendGrid) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*b } // Email body is held in req.Data, after we tidy it up a bit - emailBody, _ := strconv.Unquote(string(req.Data)) + emailBody, err := strconv.Unquote(string(req.Data)) + if err != nil { + // Unquote will error if the string is not quoted (not exactly graceful!), so fallback using the string as is + emailBody = string(req.Data) + } // Construct email message email := mail.NewV3Mail()