Sheetal phase3 Re Engagement Strategies No Show Follow Up Email#1333
Sheetal phase3 Re Engagement Strategies No Show Follow Up Email#1333sheetalmangate wants to merge 30 commits intodevelopmentfrom
Conversation
…into development
branch 'development' of https://github.com/OneCommunityGlobal/HGNRest into development
Merge branch 'development' of https://github.com/OneCommunityGlobal/HGNRest into development i especially if it merges an updated upstream into a topic branch.
…GNRest into development updating local branch
…GNRest into development updating local branch :wq
|
@sheetalmangate plz change the label to review first and get atleast 3 approvals |
rahul07bagul
left a comment
There was a problem hiding this comment.
Functionality is working as expected, tested from postman and frontend.
Note: no idea how we are going to handle participants data once it gets deployed, currently it's hard coded.
Some suggestions:
-
The email subject line is duplicated. You can define it once.
You can use:const getEmailSubject = (eventName) =>Sorry we missed you at ${eventName}; -
The core logic for preparing and sending emails is very similar in both sendFollowUpEmailAll and sendFollowUpEmail.
Below code is almost same in both, except filter part in second function which you can define outside and pass filteredRecipients
const subject = `Sorry we missed you at ${eventName}`;
const updatedRecipients = recipients
.filter((recipient) => selectedPraticipants.includes(recipient.participantID))
.map((recipient)=>{
const body = getFollowUpEmailBody( recipient.name, eventName, eventDate, eventTime )
return { ...recipient, message: body };
});
noShowRouter.route('/sendFollowUpEmailAll').get(controller.sendFollowUpEmailAll);- this should be POST not GET.
…s after merge with development
bhanuanishakkineni
left a comment
There was a problem hiding this comment.
Hello Sheetal,
I have reviewed and tested this PR. Please find the comments and screenshots from the frontend PR #3409
Ganesh112001
left a comment
There was a problem hiding this comment.
Hi Sheetal, Tried to test PR#1333
Attempted to test this backend PR but encountered multiple missing npm packages that are not in package.json:
- geoip-lite
- @aws-sdk/client-s3
- @paypal/checkout-server-sdk
- joi
These dependencies prevent the backend from starting. Please update package.json to include all required dependencies before this PR can be tested.
…stsController, overviewReportHelper, routes, and AzureBlobImages
Please try npm install |
|
Mistakenly closed this PR and reopening it using the “Reopen and comment” button. |
…zer to improve coverage
| const subject = `Sorry we missed you at ${eventName}`; | ||
|
|
||
| try { | ||
| const updatedRecipients = recipients.map((recipient) => { | ||
| const body = getFollowUpEmailBody( recipient.name, eventName, eventDate, eventTime ) | ||
| return { ...recipient, message: body }; | ||
| }); |
There was a problem hiding this comment.
Tested the log attendance follow-up email flow, selecting a participant, and sending the email. The email send completes, and I also verified the received message in Ethereal, but this is still using hardcoded Event 1 details and a fixed participant list instead of the selected activity from the route. This could be checked if the activityId is not being used to load the real event and no-show participants here, because the page is currently sending follow-up emails from static mock data rather than the actual activity being viewed.
|








Description
Phase 3 - Development for Re-Engagement Strategies
URL : /communityportal/activity/:activityid/logattendance
Details:
Implement automated follow-up email functionality for participants who missed events.
Include dynamic options for:
Rescheduling opportunities.
Suggestions for alternative event formats.
Related PRS (if any):
This backend PR is related to the PR#3409 frontend PR.
To test this backend PR you need to
Main changes explained:
How to test:
npm installnpm run devto start backend serverGmail API
Before testing, you need to set up your own test email id to send the mail notification.
This is only for test purposes. Once tested you can revert these changes..
To send an email using the Gmail API with OAuth2 and nodemailer, follow the video below and set it up.
https://www.youtube.com/watch?v=-rcRf7yswfM&t=10s&ab_channel=MafiaCodes
Fill in the these variable values from the above setup in the .env file of the backend.
REACT_APP_EMAIL =
REACT_APP_EMAIL_CLIENT_ID =
REACT_APP_EMAIL_CLIENT_SECRET =
REACT_APP_EMAIL_REFRESH_TOKEN =
REACT_APP_EMAIL_CLIENT_REDIRECT_URI = https://developers.google.com/oauthplayground
sendEmail = true
NOTE: if you get a 403 error ("Access blocked: emailapi has not completed the Google verification process") when you reach the part around 6 minutes, go to console.cloud.google.com -> OAuth Consent Screen and then add your email to "Test users". It's not mentioned in the YouTube video but I saw it in one of the comments.
credit to PR479, thank you @AaronPersaud
Screenshots or videos of changes:
functionality_recording_for_pr.mp4
Note:
Email template functionality is handled in another task so currently using hardcoded email content.