Secret Santa Bot

Number of APIs: 7

This collection helps initiate a Secret Santa gift exchange through a specified slack channel for a particular budget. It also gives gift recommendations based on the interest of the person you were assigned.

Setup

To run this collection locally, you will need an environment with the following variables:

  1. budget : denotes the spending cap for all participants in the gift exchange in numbers
  2. channel: denotes the Slack channel name whose members will be participating in Secret Santa
  3. amazonUrl: denotes the Amazon base url for your region
  4. botToken: denotes the token of the bot user created in Slack
  5. googleClientId, googleClientSecret : specifies your Google API Oauth Client credentials that need to be generated
  1. Create Google calendar invite POST https://www.googleapis.com/calendar/v3/calendars/primary/events

  2. Get channel Id from slack channel GET https://slack.com/api/channels.list

  3. Get user Ids from Slack channel GET https://slack.com/api/channels.info?channel={{channelId}}

  4. Get user email from slack GET https://slack.com/api/users.info?user={{userId}}

  5. Get all user interests from app GET https://secretsantatest.herokuapp.com/slack

  6. Get Amazon product links for a user GET {{amazonUrl}}/s?k={{category}}+under+{{budget}}&ref=nb_sb_noss_1

  7. Post recomendations to slack POST https://slack.com/api/chat.postMessage