Create Destination to Trigger Process From any Service
Create a destination to trigger a business process by creating a service instance and service key of SAP Build Process Automation.
Overview
You will learn
- How to create a destination in the SAP BTP cockpit to start a business process from SAP Build Apps.
- How to create a service instance and service key for SAP Build Process Automation
Prerequisites
Prerequisites
- Subscribe to SAP Build Process Automation
- Proper roles to create service instance, service key and destinations in SAP BTP Cockpit
Steps
Intro
In this tutorial, you will create a service instance and service key for SAP Build Process Automation. You would consume the credentials of the service key of SAP Build Process Automation to create a destination that would trigger a business process from SAP Build Apps.
Once you have successfully subscribed to SAP Build Process Automation in SAP BTP Cockpit, you can find the subscription in your sub account view, under Instances and Subscriptions.

IMPORTANT: If you are using a SAP BTP Free Tier account, the Instance
sap_process_automationand the Key get automatically created when you subscribe to SAP Build Process Automation in SAP BTP Cockpit. You will find the Instance under Instances and Subscriptions > Instances. Please skip to step 2.3 to retrieve the credentials of your key.
Let’s create an Instance for SAP Build Process Automation. Choose Create.
Select the Service as SAP Build Process Automation and Plan as standard instance.

Create Enter the values for other fields as shown below and give an instance name as spa-instance. Choose Create.
Field Value Service SAP Build Process Automation Plan standard - Instance Runtime Environment Cloud Foundry Space dev Instance Name any name (spa-instance) 
Create Once the instance is created successfully, you can find it in Instances section.

Create
Once you have successfully created the instance, select … > Create Service Key.

Create Enter the name for Service Key as spa-key and choose Create.

Create The service key is created and you can view the credentials.

Create After the key is provisioned, open it and take note of the following fields:
apiclientidclientsecreturl
These values are needed later in the Destination Configuration section.

Create
Navigate to Destinations > Create Destination. Enter the destination name as
spa_process_destination.
Create Enter the details as below.
Field Value Name any name ( spa_process_destination)Type HTTP Description any description URL api/public/workflow/rest/v1/workflow-instances, whereapiis noted previously in step 2ยsuch as:https://spa-api-gateway-bpi-us-prod.cfapps.us10.hana.ondemand.com/public/workflow/rest/v1/workflow-instancesProxy Type Internet Authentication OAuth2ClientCredentials Use mTLSfor token retrievalOff Client ID Paste the client id noted previously in step 2 Client Secret Paste the client secret noted previously in step 2 Token Service URL Type Dedicated Token Service URL url/oauth/token, whereurlis noted previously in step 2ยThe final URL should be something like this:https://<your tenant>.authentication.<domain>.hana.ondemand.com/oauth/tokenToken Service User Blank Token Service Password Blank Additionally, enable the following properties when you would like to integrate with SAP Build Apps.
AppgyverEnabledHTML5.DynamicDestinationWebIDEEnabledsap.processautomation.enabled

Create You have successfully created a destination and you can trigger your business process from any service like SAP Build Apps.
When you will check the connection to the destination, the status will show 401: Unauthorized.
Even though the connection returns unauthorized, the status is successful.

Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.