Categorygithub.com/grokify/groupbot
repositorypackage
0.2.6
Repository: https://github.com/grokify/groupbot.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

GroupBot

Build Status Go Report Card Docs License

Overview

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.

Configuration

Set the following environment variables:

VariableTypeRequiredNotes
GROUPBOT_ENGINEstringyaws or nethttp
GROUPBOT_PORTintegernlocal port number for net/http
GROUPBOT_REQUEST_FUZZY_AT_MENTION_MATCHbooleannMatch non-completed at mentions.
GROUPBOT_RESPONSE_AUTO_AT_MENTIONbooleann
GROUPBOT_POST_SUFFIXstringn
GOOGLE_SERVICE_ACCOUNT_JWTJSON stringy
GOOGLE_SPREADSHEET_IDstringyID as in URL
GOOGLE_SHEET_TITLE_RECORDSstringysheet title for data records, e.g. Records
GOOGLE_SHEET_TITLE_METADATAstringysheet title for metadata, e.g. Metadata
RINGCENTRAL_BOT_IDstringybot personId in Glip
RINGCENTRAL_BOT_NAMEstringybot name in Glip for fuzzy at matching
RINGCENTRAL_SERVER_URLstringyBase API URL, e.g. https://platform.ringcentral.com
RINGCENTRAL_TOKEN_JSONJSON stringyJSON token as returned by /oauth/token endpoint

Using the AWS Engine

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.

Installation via AWS Lambda

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

Keepalive

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: