Azure / Azure/azure-functions-java-library
@SendGridOutput ignores personalizations->dynamic_template_data
- 主要言語
- Java
- スター
- 45
- フォーク
- 49
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello.
We are trying to use SendGridOutput to send outbound emails from our functions. For each email we need to use dynamic template with handlebars. Learn more on these here:
1. https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/
2. https://sendgrid.com/docs/for-developers/sending-email/using-handlebars/
We've created several dynamic templates and for all of them we see similar issue: the dynamic_template_data is not being applied to the template so all placeholders are empty.
Here is the real example:
**Template code:**
```
Hello {{ firstName }}.
We've received new call back request {{ callbackId }} at {{ callbackTimestamp }}.
Please follow up with the new enrollee {{ enrolleeFirstName }} {{ enrolleeLastName }} at {{ enrolleePhone }} .
Yours truly, subscription bot.
```
**The value we put into the output value (OutputBinding outSendgridMessage):**
```
{
"personalizations":
[
{
"to": [{"email":"my@email.com"}],
"dynamic_template_data: {
"firstName":"Coach",
"enrolleePhone":"7879090099",
"callbackId":null,
"enrolleeFirstName":"Joe",
"enrolleeLastName":"Test105",
"callbackTimestamp":1615493135111
}
}
],
"content":[{"type":"text/html","value":"The new call back request has been received."}],
"template_id":"d-7a92d5731fc942bb87dd4bfc2ac02afd"
}
```
**The email comes without data:**

Please investigate why it is happening.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
ファイルもテストも指定されていません。まず、提供された personalizations JSON と dynamic_template_data を使った Java @SendGridOutput binding を追跡し、次に生成された SendGrid リクエストをドキュメント化された形式と比較します。dynamic template が personalization の値を受け取り、メール内にレンダリングできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- azure, java
- 領域
- backend, cloud
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100