This is a solution for MASV. It allows the uploader in a Portal to specify a recipient email address so the notification can be sent to a specific person dynamically.
- Create a Lambda function in AWS using the code in lambda_function.py. Enable a public Function URL.
- Create a MASV Portal with a Custom Form and add a new required field called Recipient Email with a key of recipient_email.
- Use the MASV API to get a User Token. https://developer.massive.io/masv-api/auth/
- Create a Custom Webhook using "package.finalized" as the event and the Lambda Function URL as the url. https://developer.massive.io/masv-api/webhooks/#create-webhook
- List the Portals and copy the entire Portal object for the next step. https://developer.massive.io/masv-api/portals/#listing-portals
- Attach the Custom Webhook to the Portal. https://developer.massive.io/masv-api/webhooks/#attach-custom-webhook-to-portal
- Create a MASV API Key. https://developer.massive.io/masv-api/apikeys/
- In the Lambda function, add an Environment Variable named MASV_API_KEY with a value of the API Key created in the last step.
- Modify the allowedDomains list in the code to include all the email domains you will allow notifications to be sent to.