Manoj taking over for Meenashi - collaboration ads creation page#1872
Open
jeyanthi-sm wants to merge 12 commits intodevelopmentfrom
Open
Manoj taking over for Meenashi - collaboration ads creation page#1872jeyanthi-sm wants to merge 12 commits intodevelopmentfrom
jeyanthi-sm wants to merge 12 commits intodevelopmentfrom
Conversation
…lds to the Job model
…nd jobforms/responses/upload; update file type handling to use mimetype
…GNRest into meenashi-collaboration-ads-creation-page
nathanah
approved these changes
Jan 31, 2026
Contributor
nathanah
left a comment
There was a problem hiding this comment.
LGTM, but not sure if you want to set up permissions for the newly created APIs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Include the following environment variables.
BASE_FRONTEND_URL=http://localhost:5173
DROPBOX_APP_KEY=
DROPBOX_APP_SECRET=
DROPBOX_REDIRECT_URI=http://localhost:4500/oauth-callback
DROPBOX_REFRESH_TOKEN=
DROPBOX_PATH='/ResumeUploader-HGN'
JOB_APPLICATION_RECIPIENT_EMAIL='yourEmail'
Pre-requisite
Dropbox OAuth Setup for Refresh Token
The variables DROPBOX_APP_KEY, DROPBOX_APP_SECRET and DROPBOX_REFRESH_TOKEN have been added to Settings → Secrets and Variables → Actions.
II.Gmail Setup (Required for testing email sending)
To test email sending from the submit action, please configure Gmail OAuth:
Open Google OAuth Playground.
Enable Use your own OAuth credentials in the top right.
Enter your credentials:
Client ID: .REACT_APP_EMAIL_CLIENT_ID
Client Secret: REACT_APP_EMAIL_CLIENT_SECRET }}
Select scope:
https://mail.google.com/
Configure request to API
HTTP Method : POST
Request URI - https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/send
Enter Request Body -
{
"raw": "BASE64_ENCODED_MIME_EMAIL"
}
{
"raw":"VG86IHRlc3RAZXhhbXBsZS5jb20KU3ViamVjdDogVGVzdCBmcm9tIE9BdXRoIFBsYXlncm91bmQKCgpUaGlzIGlzIGEgdGVzdCBlbWFpbCBmcm9tIE9BdXRoIFBsYXlncm91bmQ="
}
“Replace test@example.com with your own email before testing.”
Content Type : Application/json
Click Authorize APIs → Authorize.
Click Exchange authorization code for tokens.
Copy the refresh token and add to your local environment:
REACT_APP_EMAIL_USERNAME=<your_gmail_address>
REACT_APP_EMAIL_CLIENT_ID=<client_id>
REACT_APP_EMAIL_CLIENT_SECRET=
REACT_APP_EMAIL_REFRESH_TOKEN=<generated_token>
REACT_APP_EMAIL_CLIENT_REDIRECT_URI=https://developers.google.com/oauthplayground
This enables the submit action to send emails through your Gmail account.
Refer - https://github.com/user-attachments/assets/2aa76510-d283-4604-8ee7-803f516d6e6a
How to Test:
Check out the current branch.
npm install
and follow the usual steps to start the local server.
Step-by-Step Test Instructions
Login and Get Authorization
Request Type: POST
URL: http://localhost:4500/api/login
{
"email": "testEmail@example.com",
"password": "yourtestEmailPassword"
}
Expected Response:
A valid JWT token in the response body.
Authenticated user data (admin)/(Owner).
Request Type: POST
The token in used for sending the jobs data.
A. Dropbox File upload No Authorisation
URL: {{baseUrl}}/api/jobforms/responses/upload
Body

Send as form-data:
Key: file
Value: select the file to upload
Expected Response
A valid Dropbox link is returned.
Clicking the link will open the uploaded file in Dropbox.
B)
Request Type: POST
URL: {{baseUrl}}/api/jobforms/responses
Body
Send the request body as raw JSON.
Substitute the formId with the _id from the jobForms collection.
Construct the answers array based on the form you selected.
For questions of type file, use the Dropbox link obtained from the previous step.
Example Request Body:
{
"formId": "6920189d05b65c73344d265d",
"answers": [
{
"_id": "69247b060fc3a9665c1536ac",
"questionId": "6920189d05b65c73344d265e",
"answer": "test applicant"
}
]
}
The form should include answers for all questions that are marked isRequired = True for the chosen form
Expected Response
Form responses saved successfully and should send an email to the JOB_APPLICATION_RECIPIENT_EMAIL env variable value
FormResponsesBackEndUpd.mp4
jobs Added new columns - requirements, projects, ourCommunity
Note - imageUrl should be a dropbox link.
it should end with raw=1 instead of dl=0 Also select the images from this folder - https://www.dropbox.com/scl/fo/817lsk8fmvx5cdexbk07x/APOLV_TrgXHFLJATnj1xVFg?rlkey=rgs3pfrbav2hf6a2el6dtblnf&e=1&dl=0
Request Type: POST
URL: {{baseUrl}}/api/jobs
Authorization: API Key <your_JWT_token>
Body
Send the request body as raw JSON.
`with applyLink, category, description, imageUrl, projects, ourCommunity, requirements,
Expected Response
job saved successfully.
jobsBackEnd.mp4
With validations
jobsBackEnd.2.mp4
Related PRS (if any):
This backend PR is related to the #4307 frontend PR OneCommunityGlobal/HighestGoodNetworkApp#4307
.
Main changes explained:
jobCollection is updated with these new columns - requirements, projects, ourCommunity
Able to upload a file in the dropbox
Able to save the responses with a dropbox link
collabJobAdsCreation - permission - Admin/Owner
Save the responses can be done by anyone. no need of permission
Note:
Include the information the reviewers need to know.
imageUrl should end with raw=1 instead of dl=0
imageUrl folder should be https://www.dropbox.com/scl/fo/817lsk8fmvx5cdexbk07x/APOLV_TrgXHFLJATnj1xVFg?rlkey=rgs3pfrbav2hf6a2el6dtblnf&e=1&dl=0