{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21054,"path":"integrate-applications/integration-hub/box-spk-triggers-setup.md","title":"Set up triggers for the Box spoke","bundle":null,"doc_type":null,"release":"australia","body":"\n# Set up triggers for the Box spoke\n\nSet up the trigger to generate the secret and callback URL on your ServiceNow instance.\n\n## Before you begin\n\n-   Request an Integration Hub subscription.\n-   Activate and set up the Box spoke.\n-   Role required: admin.\n\n## Configure secret and callback URL in Box\n\nSet the secret and callback URL to enable Box to securely send webhooks to your ServiceNow instance.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  Log in to the Box account.\n\n2.  Create a custom application.\n\n    1.  Click **Dev Console**.\n\n    2.  Under **My Platform Apps**, click **Create Platform App**.\n\n    3.  Click **Custom App**.\n\n    4.  On the Create a Custom App form, provide app details.\n\n        Provide a name for **App Name** and select **Custom Portal** for **Purpose**.\n\n    5.  Click **Next**.\n\n    6.  Select **Server Authentication \\(with JWT\\)** for **Authentication Method** and click **Create App**.\n\n        The custom application is created and the **Configuration** tab is displayed.\n\n    7.  Copy the value of **Client ID** from the **Configuration** tab.\n\n3.  Authorize the custom application.\n\n    1.  Navigate to the **Admin console** from the Box account homepage.\n\n    2.  Click **Integrations**.\n\n    3.  Under the **Platform Apps Manager**, click **Server Authentication App**.\n\n    4.  Click **Add Platform App**, paste the value of **Client ID**, and click **Next**.\n\n        The custom application details are displayed.\n\n    5.  Click **Authorize**.\n\n4.  Provide the required application scopes to the custom application.\n\n    1.  In the **Configuration** tab, for **Application Scopes** select the **Write all files and folders stored in Box**, **Manage signature requests**, **Manage webhooks**, and **Enable integrations** options.\n\n    2.  Click **Save Changes**.\n\n5.  Generate primary key for the custom application.\n\n    1.  In the **Webhooks** tab, click **Manage Signature Keys**.\n\n    2.  Under **Primary Key**, click **Generate Key**.\n\n    3.  Click **Copy** to copy the value of **Primary Key** and record it for later use.\n\n6.  Create a webhook for the custom application and add ServiceNow endpoint URL.\n\n    1.  In the **Webhooks** tab, click **Create Webhook** and select **V2**.\n\n    2.  For **URL Address** under **Configuration**, enter ServiceNow endpoint URL in this format: `https://<ServiceNow-Instance-Name>.service-now.com/api/sn_box_spoke/box_external_trigger?X-SkipCookieAuthentication=true`.\n\n    3.  For **Content Type**, select either file or folder as per your requirement.\n\n        Flow events differ based on the selected **Content Type**.\n\n    4.  Select the required triggers that are associated with the selected **Content Type**.\n\n    5.  Click **Create Webhook**.\n\n\n## Activate the trigger definition on ServiceNow instance for the Box spoke\n\nActivate the trigger definition to generate the secret and callback URL on your ServiceNow instance for the Box spoke.\n\n### Before you begin\n\nRole required: flow\\_designer and connection\\_admin.\n\n### About this task\n\nBox uses the secret and callback URL to securely send the payload to the ServiceNow instance. The ServiceNow instance verifies the secret that Box sends and accepts the payload.\n\n### Procedure\n\n1.  Navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n2.  Select the **Integrations** tab.\n\n3.  Toggle and enable the **Inbound** tab.\n\n4.  Locate the **Box Spoke** card and select **View Details**.\n\n5.  Select **Configure**.\n\n6.  In the **User** field, select the user name on whose behalf the inbound session or flow is triggered.\n\n7.  In the **Secret** field, paste the value of **Primary Key** that was generated in the Box account.\n\n    The secret is used to sign the payload of the webhook.\n\n8.  Select **Activate**.\n\n    The callback URL is generated in the URL field.\n\n    \\[Omitted image \"box-spk-ext-trigger.jpg\"\\] Alt text: Configure external trigger for the Box spoke.\n\n9.  Close the window.\n\n\n"}}