[PoC] Dialogflow pre-survey chatbot #425
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the require code to support migrating our pre-survey chatbot to Google Dialogflow ES.
The bot used here can be found in GCP console. The definition for the bot was done manually via console. You may not have access to the bot's definition. If that's the case, ask me so I can send you an invite.
Simlarly to #424, this PR adds two functions, which do the same as in the mentioned PR. Studio changes are analogous too. The only substantial difference between the two is that this one uses Google Dialogflow library instead.
Note: Since GCP does not provides a way to interact with their APIs using API keys, you need to generate a key pair for the service account, which is a json file that should remain private. Because of this, the file must not be published to our public repo. To sort this, I dropped the file under
assets/service-account-key.private.json
and deployed the local version with❯ twilio serverless:deploy --runtime=node14 --service-name=serverless --environment=production --force
. If we go this way, the json file should live in AWS S3/SSM and bundle it at deploy time.Checklist
Verification steps