Skip to content
This is a AWS Lambda function for notifying receiving e-mail with Amazon SES to Slack.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore initial commit May 31, 2019
config.ini.sample add readme May 31, 2019
lambda_function.py fix match pattern of only plain text message May 31, 2019
readme.md fix readme May 31, 2019

readme.md

About

This is a AWS Lambda function for notifying receiving e-mail with Amazon SES to Slack.

Usage

  1. Create config.ini file.

    cp config.ini.sample config.ini
    
    [aws]
    backet = S3 backet name that you set at Amazon SES Rule Sets.
    
    [slack]
    hook_url = Slack Webhook URL created at Incoming WebHooks in Custom Integrations.
    api_token = Slack API Token created at Legacy tokens section in Legacy integrations page.
    channel = Slack channel name you want to notify.
    channel_id = Slack channel "ID" (not a name) you want to notify.
    icon_emoji = :robot_face: (option)
    attachment_color = #7e1083 (option)
    
  2. Create Lambda function using this script and config file.

    LambdaFunction
    ├── config.ini
    └── lambda_function.py
    
  3. Add this Lambda function as Lambda Action to Amazon SES Rule Sets.

Features

  • This function show only e-mail summary (From, Date, Subject, To) at Slack channel.
  • The e-mail body will post in the thread of that summary post.

Smaple

At the case that you forwarded an email you received via Gmail to an email address configured in Amazon SES, it will be notified to Slack as follows:

2019-05-31_104227

Run manually

You can run this function on the command line.

$ python3 lambda_function.py {message_id}

For {message_id}, please pass a message ID generated using random alphanumeric generated issued by Amazon SES.

You can’t perform that action at this time.