Basecamp Slack Link Unfurler
This is an AWS Lambda function written in Ruby that listens for Slack link_shared
events that contain Basecamp links and uses the chat.unfurl
API to augment the corresponding messages with card previews. This project is also an experiment to see how to build a project from scratch using ChatGPT.
Prerequisites
Installation
- Clone this repository:
git clone https://github.com/example/basecamp-slack-link-unfurler.git
- Navigate to the
terraform
directory:cd basecamp-slack-link-unfurler/terraform
- Initialize Terraform:
terraform init
- Configure your AWS credentials:
aws configure
- Apply the Terraform configuration:
terraform apply
- Set the following environment variables:
SLACK_ACCESS_TOKEN
: Your Slack app's OAuth access tokenBASECAMP_CLIENT_ID
: Your Basecamp app's client IDBASECAMP_CLIENT_SECRET
: Your Basecamp app's client secret
Usage
After installation, the Lambda function will listen for link_shared
events in your Slack workspace that contain Basecamp links. When it detects a qualifying event, it will use the chat.unfurl
API to augment the corresponding message with a card preview of the linked Basecamp item.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Note
The aws_lambda_function_url
output variable is not included in the Terraform configuration since it is not recognized by ChatGPT. However, you can retrieve the URL of the Lambda function from the AWS Console or by using the AWS CLI.