Skip to content

Manoj taking over for Meenashi - collaboration ads creation page#1872

Open
jeyanthi-sm wants to merge 12 commits intodevelopmentfrom
meenashi-collaboration-ads-creation-page
Open

Manoj taking over for Meenashi - collaboration ads creation page#1872
jeyanthi-sm wants to merge 12 commits intodevelopmentfrom
meenashi-collaboration-ads-creation-page

Conversation

@jeyanthi-sm
Copy link
Copy Markdown
Contributor

@jeyanthi-sm jeyanthi-sm commented Nov 1, 2025

image

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
dropboxFileUploadNoAuthorization

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

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Dec 1, 2025
Copy link
Copy Markdown
Contributor

@nathanah nathanah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but not sure if you want to set up permissions for the newly created APIs.

@one-community one-community added Do Not Review Do not review or look at code without full context and removed High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible labels Mar 9, 2026
@one-community one-community changed the title Meenashi collaboration ads creation page Vishnupriya taking over for Meenashi - collaboration ads creation page Mar 9, 2026
@Vishnu10-hub Vishnu10-hub self-assigned this Mar 9, 2026
@one-community one-community changed the title Vishnupriya taking over for Meenashi - collaboration ads creation page Manoj taking over for Meenashi - collaboration ads creation page Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Review Do not review or look at code without full context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants