Set up the Amazon Alexa spoke
Integrate the ServiceNow instance and Amazon Alexa account by creating a custom OAuth application in Amazon Alexa to authenticate ServiceNow requests.
Before you begin
- Request an Integration Hub subscription.
- Activate the Amazon Alexa spoke.
- Role required: admin
Create a security profile
Create and register a security profile through the Developer Console to use Login with Amazon on your ServiceNow instance.
Before you begin
Role required: admin.
Procedure
Log in to Amazon Developer Portal with admin credentials.
Create a security profile.
For information about creating a security profile, see Create an LwA Security Profile in Amazon Developer Documentation.
Copy and record the values of Client ID and Client Secret for later use.
Configure the security profile and specify these values in Web Settings:
Field Value Allowed Origins ServiceNow instance URL. Allowed Return URLs ServiceNow instance redirect URL in this format: https://<Instance-Name>.com/oauth_redirect.doFor more information about configuring the security policy, see Add your Website to your Security Profile in Amazon Developer Documentation.
Configure a connection for Amazon Alexa spoke
Add and configure a Amazon Alexa connection to authenticate ServiceNow requests in the Amazon Alexa spoke.
Before you begin
Role required: admin
Procedure
Navigate to All > Process Automation > Workflow Studio.
Click the Integrations tab.
Under Connections, the Outbound connections are displayed by default.
Locate the AmazonAlexa connection alias and click View Details.
On the Connection form, fill in the fields.
Field Description Connection Information Connection Name Name to uniquely identify the record. By default, the name is AmazonAlexa.Connection URL Base URL to connect to Amazon Alexa. Enter: https://api.amazonalexa.comAPI Version Required API version of Amazon Alexa. Enter v1.Credential Information OAuth Entity Name Name to identify the OAuth entity record. For example, Amazon Alexa OAuth.OAuth Client ID Client ID created during the configuration of the security profile. OAuth Client Secret Client Secret created during the configuration of the security profile. OAuth Redirect URL OAuth callback endpoint in this format: https://<instance>.service-now.com/oauth_redirect.do. Replace<instance>with the ServiceNow instance name.Click Configure and Get OAuth Token.
Setup webhook for the Amazon Alexa spoke
Authenticate the inbound requests from Amazon Alexa account to your ServiceNow instance by creating a webhook registry.
Before you begin
Role required: admin.
Procedure
In the filter navigator, enter
token_verification.list.Records in the Token Verifications [token_verification] table are displayed.
Click New.
On the form, fill these values.
Field Description Name Name to identify the token record. For example, Alexa token.Description Brief description of the token. Token Value of token. This value is encrypted before it is used. Click Submit.
Navigate to Alexa Webhooks > Alexa Webhook Registries.
Click New.
On the form, fill these values.
Field Description Name Name to identify the webhook registry record. For example, Alexa token.Description Brief description of the webhook registry record. Token Token you have created. For example, Alexa token.Path Scripted REST endpoint. A default endpoint is available. You can change the default value as per your requirement. Right-click the form header and click Save.
Click Callback URL.
Webhook Callback URL is displayed in the confirmation message. Copy and record this value.
Log in to AWS Management Console.
In the AWS Lambda function, specify the Webhook Callback URL and save the changes.
Webhook Callback URL
Log in to Alexa Developer Console.
Navigate to Build > CUSTOM > Endpoint and specify ARN of the AWS Lambda function you had configured.
AWS Lambda ARN