$ serverless invoke local --function run-intent --data '{"name":"TogglSummaryIntent", "entities": { "day": "2019-03-25"}}'
- AWS account (for API Gateway and AWS Lambda functions)
- Google Cloud Platform account (for Dialogflow)
- Node v8.10
You can run the bot using the free tier on both cloud providers.
Seve the Toggl and Slack API tokens in the AWS Systems Manager using the Parameter Store:
$ aws ssm put-parameter --name calculon-dev-toggl-api-token --type String --value xx --overwrite
$ aws ssm put-parameter --name calculon-dev-slack-bot-oauth-access-token --type String --value "xyz" --overwrite
$ aws ssm get-parameter --name calculon-dev-toggl-api-token
{
"Parameter": {
"Name": "calculon-dev-toggl-api-token",
"Type": "String",
"Value": "xxx",
"Version": 3,
"LastModifiedDate": 1549606553.596,
"ARN": "arn:aws:ssm:eu-west-1:123456789:parameter/calculon-dev-toggl-api-token"
}
}