Workdocs not sending emails on feedback.

1

I am using create_comment API in my lambda to add comments on a document. This API adds comment on the file but workdocs doesn't send email despite NotifyCollaborators=True. When comment is posted manually on the document, it is sending the email. Please help in understanding why email is not being received on posting comment through API.

https://docs.aws.amazon.com/workdocs/latest/APIReference/API_CreateComment.html (Adding: Lambda execution role has AmazonWorkDocsFullAccess)

asked 2 months ago112 views
1 Answer
0

Hey, you need to setting up notifications permission for your Lambda function's execution role.

Here is the documentation to do it: https://docs.aws.amazon.com/workdocs/latest/developerguide/manage-notifications.html

profile picture
EXPERT
answered 2 months ago
  • Hello, thanks for sharing. My lambda role has AmazonWorkDocsFullAccess.

        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "workdocs:*",
                    "ds:DescribeDirectories",
                    "ec2:DescribeVpcs",
                    "ec2:DescribeSubnets"
                ],
                "Resource": "*"
            }
        ]
    }```
    
  • Did you do this step "Call the notification subscription APIs to enable or disable publishing of SNS messages to your endpoint"?

  • This API is just for subscribing to any event happening in Workdocs to an SNS topic. This topic was attached manually. My SNS topic invokes a lambda and lambda is able to receive the event and process it. Lambda then creates comment on the uploaded file, after which ideally email should go out to users having access permissions which is not happening currently but comments get posted. CreateNotificationSubscription is not related to having control over email notifications.

  • Understood. There are multiple factors that could prevent collaborators from receiving notifications, despite having the Notify Collaborators option activated:

    1. Users with "viewer" permissions may not be eligible to receive email notifications.
    2. Notification settings or permissions configured at the folder level might not automatically apply to individual files without being explicitly set for each one.
    3. The system typically does not send notifications to "anonymous viewers," meaning users outside the organization who access a file via an external link.

    Resources:

    1. Users with "viewer" permissions may not be eligible to receive email notifications. - Agreed on this, they don't get emails even by manually adding comment unless their email-id is mentioned like "xyz@domain.com"
    2. Notification settings or permissions configured at the folder level might not automatically apply to individual files without being explicitly set for each one. - Notification settings at file level were not muted.
    3. The system typically does not send notifications to "anonymous viewers," meaning users outside the organization who access a file via an external link. - Agreed on this but even the co-owners/contributors didn't receive emails.

    Meanwhile, thanks for the efforts to look into this. Much appreciated!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions