Dialogflow Secrets

Dialogflow V2 Secret For NLP Detection

  1. Login to your Dialogflow account at https://dialogflow.cloud.google.com/
  2. Find your Dialogflow agent that you want to connect to and click on the settings gear wheel next to the agent name start
  3. You will have been navigated to the general settings page. Click on the Project ID link Click on Project ID link
  4. Once in google projects, confirm you are logged into the right user and looking at the correct project (user avatar top left, and project dropdown)
  5. On the Project Dashboard page, in the Project info card, click on Go to project settings Go to project settings
  6. In project settings, click on the Service Accounts tab on the left hand side. Service accounts tab on left hand side If you already have a service account set, take note of the email used and skip to step 11. Service accounts list
  7. If you do not have a service account, click Create Service Account. For ease of management, put the botname in the description of this account.
  8. Add the Dialogflow API Admin role to this account Dialogflow API Admin role
  9. Add yourself or other team members as managers of this service account
  10. Save the service account
  11. For the active or newly created service account for that bot, go to the actions menu and select Manage keys
  12. Select Add KeyCreate new key add a key
  13. Select JSON as the key type and create the key. Select JSON for the key type
  14. Once you save a secret in ServisBOT, it is not accessible to anyone. Please ensure you are storing your secrets in an appropriate internal manager in order to migrate this bot to other accounts or rotate access.
  15. If you are re-using a service account, please verify that it has the role Dialogflow API admin or you will be unable to publish. To verify, note the email address tied to this service account, then navigate to IAM, for the list of the accounts there, find the one that matches your service account email and edit the account. Add the Dialogflow API Admin Role to that account. Navigate to IAM Dialogflow API Admin role
  16. You can now store your secrets in the ServisBOT platform:
    • In the ServisBOT platform on the left hand side menu, click to Secrets Vault and then Create Secret
    • Assign an alias and select Dialogflow V2 in the Template drop down
    • Upload the file you downloaded from Dialogflow
    • Save your Secret

Dialogflow V2 Secret for Managing Intents with ServisBOT

To use SBIntents with a Dialogflow agent additional permissions are required in order to successfully train a bot.

  1. Login to your Dialogflow account at https://dialogflow.cloud.google.com/

  2. Find your Dialogflow agent that you want to connect to and click on the settings gear wheel next to the agent name start

  3. You will have been navigated to the general settings page. Click on the Project ID link Click on Project ID link

  4. Once in google projects, confirm you are logged into the right user and looking at the correct project (user avatar top left, and project dropdown)

  5. On the Project Dashboard page, in the Project info card, click on Go to project settings Go to project settings

  6. In project settings, click on the Service Accounts tab on the left hand side. Service accounts tab on left hand side If you do not have already have a service account,

    • click Create Service Account. For ease of management, put the botname in the description of this account.
    • Add the owner role to this account
    • Add yourself or other team members as managers of this service account
    • Save the service account
  7. If you already have a service account set, take note of the email used. Service accounts list

    • Go to the actions menu and select Manage permissions
    • If your service account has the role owner skip this step. Otherwise, click select and edit and existing member.
    • Add a role for project -> owner start
    • Save the change and navigate back to Service Accounts.
    • The member should now be listed on the IAM page (on the left hand side menu) with an Owner role.
  8. For the active or newly created service account for that bot, go to the actions menu and select Manage keys

  9. Select Add KeyCreate new key add a key

  10. Select JSON as the key type and create the key. Select JSON for the key type

  11. Once you save a secret in ServisBOT, it is not accessible to anyone. Please ensure you are storing your secrets in an appropriate internal manager in order to migrate this bot to other accounts or rotate access.

  12. If you are re-using a service account, please verify that it has the role Dialogflow API admin or you will be unable to publish. To verify, note the email address tied to this service account, then navigate to IAM, for the list of the accounts there, find the one that matches your service account email and edit the account. Add the Dialogflow API Admin Role to that account. Navigate to IAM Dialogflow API Admin role

  13. You can now store your secrets in the ServisBOT platform:

    • In the ServisBOT platform on the left hand side menu, click to Secrets Vault and then Create Secret
    • Assign an alias and select Dialogflow V2 in the Template drop down
    • Upload the file you downloaded from Dialogflow
    • Save your Secret

Alternatively you can map the values of the fields in the Dialogflow JSON file directly.

  • [user@mail.com] with the information in the client_email field from the json file
  • [some-private-key] with the information in private_key field from the json file - all of it, even “—–BEGIN PRIVATE KEY”
  • [someproject-id] with the information in the project_id field from the json file

Do not use the private-key-id in the private_key field this is a common mistake