-
Notifications
You must be signed in to change notification settings - Fork 9
corrected the expression for sending hsm templates using google sheets #421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
corrected the expression for sending hsm templates using google sheets #421
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughInserted a single leading placeholder line ("___") before the existing header structure in the Link Google Sheets documentation file; no content or logic changes were made. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🚀 Deployed on https://deploy-preview-421--glific-docs.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/4. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md(1 hunks)
| 5. In the next step, `Send contact a message` is used and an expression is given in place of the template selection drop-down. The expression to be added for the HSM templates which contain template variables is as follows `<%= Glific.send_template("@results.sheet.template_uuid", ["@contact.name","@contact.fields.district"] ) %>`. The variables can be added in the square brackets inside double quotes separated by commas. Refer to how @contact.name, @contact.fields.district have been added. Different contact variables or just plain strings can be added as variables. | ||
|
|
||
| 6. For HSM templates without any template variables, the following expression can be used `<%= Glific.send_template("@results.sheet.template_uuid", [] ) %>` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unquoted variables are required inside Glific.send_template.
Quoting @results.sheet.template_uuid, @contact.name, etc. turns them into literal strings, so the sent template will show @contact.name instead of the contact’s actual name. Drop the quotes so the helper receives evaluated values.
-… `<%= Glific.send_template("@results.sheet.template_uuid", ["@contact.name","@contact.fields.district"] ) %>` …
+… `<%= Glific.send_template(@results.sheet.template_uuid, [@contact.name, @contact.fields.district]) %>` …
-6. For HSM templates without any template variables, the following expression can be used `<%= Glific.send_template("@results.sheet.template_uuid", [] ) %>`
+6. For HSM templates without any template variables, the following expression can be used `<%= Glific.send_template(@results.sheet.template_uuid, []) %>`📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 5. In the next step, `Send contact a message` is used and an expression is given in place of the template selection drop-down. The expression to be added for the HSM templates which contain template variables is as follows `<%= Glific.send_template("@results.sheet.template_uuid", ["@contact.name","@contact.fields.district"] ) %>`. The variables can be added in the square brackets inside double quotes separated by commas. Refer to how @contact.name, @contact.fields.district have been added. Different contact variables or just plain strings can be added as variables. | |
| 6. For HSM templates without any template variables, the following expression can be used `<%= Glific.send_template("@results.sheet.template_uuid", [] ) %>` | |
| 5. In the next step, `Send contact a message` is used and an expression is given in place of the template selection drop-down. The expression to be added for the HSM templates which contain template variables is as follows `<%= Glific.send_template(@results.sheet.template_uuid, [@contact.name, @contact.fields.district]) %>`. The variables can be added in the square brackets separated by commas. Refer to how @contact.name and @contact.fields.district have been added. Different contact variables or just plain strings can be added as variables. | |
| 6. For HSM templates without any template variables, the following expression can be used `<%= Glific.send_template(@results.sheet.template_uuid, []) %>` |
🤖 Prompt for AI Agents
In docs/4. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md
around lines 97 to 100, the examples incorrectly show quoted variables inside
the Glific.send_template call which causes them to be sent as literal text;
update the examples to remove the quotes so the helper receives evaluated values
(i.e., pass @results.sheet.template_uuid and contact variables like
@contact.name or @contact.fields.district unquoted, and keep an empty array for
templates without variables).
Fawas003
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Level, last updated and time required details are missing in this doc. Could you please add that.
|
@mahajantejas Actions are pending on this PR, can you please take a look at it. |
Summary by CodeRabbit