A handy Slack bot to send your favorite GIFs.
- A Slack workspace.
- An AWS account.
- Start by creating a Slack app and setting up a Slash Command.
- Configure a
DYNAMO_TABLE_NAMEenvironmental variable with the name of your DynamoDB table. - Configure a
SLACK_SIGNING_SECRETenvironmental variable with your Slack app's signing secret. - Deploy using
cdk deploy. - After deploying the first time, add some images to your DynamoDB table, see the item structure below.
- Change any other values in
cdk.goto fit your needs. - Profit!
{
"giphy_url": "https://giphy.com/gifs/studiosoriginals-gloria-domitille-collardey-business-woman-3o7TKy1qgGdbbMalcQ",
"image_url": "https://media.giphy.com/media/3o7TKy1qgGdbbMalcQ/giphy.gif",
"image_name": "tubular"
}giphy_url- points to a Giphy page.image_url- points to the actual image file, the "social" size is recommended for Slack to always show it.image_name- name of the image. Used in the/jiphycommand.
To send one of the available GIFs, type /jiphy <image> where <image> points to one of the image_names in your DynamoDB table. There is also a /jiphy list command to list all available images, only shown to the one sending it.