GroupBot is a bot that allows you to share information about yourself with the team. It was initially created to share information for ordering tshirts. It currently stores data in a Google Sheet.
Set the following environment variables:
Variable | Type | Required | Notes |
---|---|---|---|
GROUPBOT_ENGINE |
string | y | aws or nethttp |
GROUPBOT_PORT |
integer | n | local port number for net/http |
GROUPBOT_REQUEST_FUZZY_AT_MENTION_MATCH |
boolean | n | Match non-completed at mentions. |
GROUPBOT_RESPONSE_AUTO_AT_MENTION |
boolean | n | |
GROUPBOT_POST_SUFFIX |
string | n | |
GOOGLE_SERVICE_ACCOUNT_JWT |
JSON string | y | |
GOOGLE_SPREADSHEET_ID |
string | y | ID as in URL |
GOOGLE_SHEET_TITLE_RECORDS |
string | y | sheet title for data records, e.g. Records |
GOOGLE_SHEET_TITLE_METADATA |
string | y | sheet title for metadata, e.g. Metadata |
RINGCENTRAL_BOT_ID |
string | y | bot personId in Glip |
RINGCENTRAL_BOT_NAME |
string | y | bot name in Glip for fuzzy at matching |
RINGCENTRAL_SERVER_URL |
string | y | Base API URL, e.g. https://platform.ringcentral.com |
RINGCENTRAL_TOKEN_JSON |
JSON string | y | JSON token as returned by /oauth/token endpoint |
To use the AWS Lambda engine, you need an AWS account. If you don't hae one, the free trial account includes 1 million free Lambda requests per month forever and 1 million free API Gateway requests per month for the first year.
See the AWS docs for deployment:
https://docs.aws.amazon.com/lambda/latest/dg/lambda-go-how-to-create-deployment-package.html
Using the aws-cli
you can use the following approach:
$ cd ./apps/server
$ GOOS=linux go build main.go
$ zip main.zip ./main
# --handler is the path to the executable inside the .zip
$ aws lambda create-function --region us-east-1 --function-name Databot --memory 128 --role arn:aws:iam::account-id:role/execution_role --runtime go1.x --zip-file fileb://main.zip --handler main
In production, there are are reasons why a RingCentral webhook may fail and become blacklisted. These should be tracked down an eliminated. If there are reasons to reenable the webhook, you can deploy the [rchooks
] RingCentral Lambda keepalive function: