cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic URL's in Build Process Automation

geetbijlani
Participant
0 Kudos

Dear All,

I am trying to achieve back to back API calls in SAP Build process automation but using only actions and not using the bot for web service calls in a sequence.

Here's the scenario:

1. The process starts with SBPA form, where the user enters the asset details.

2. The details have to be filled in a word template file and saved as a PDF on SharePoint online.

To achieve this , I am using "Adobe Document Generation API" https://developer.adobe.com/document-services/docs/apis/ which works  perfectly fine with the automation but since having an automation bot for a single small use case is not so cost effective. I would like to do the same using only the Build Process Automation process.

This process involves calling back to back API's. In one of the steps, I get the upload url from one of the "GET" calls and then I need to make a "PUT" to this received url . In this case the endpoint URL is not fixed and hence I am unable to proceed.

Using Automation artifact, it works as follows:

geetbijlani_0-1713435674561.png

 

In case of automation , my script does the job and then call webservice

return {
  method: 'PUT',
  url: UploadUri.uploadUri,<<<<<<<(URL received from the previous "GET" call)
  responseType: 'json',
  resolveBodyOnly: false,
  headers:
  {
    'Content-Type''application/vnd.openxmlformats-officedocument.wordprocessingml.document'
  },
  readFileAsBufferToBody: filePath
};
 

Additional Info:

The url looks like : 

We need to make a "PUT" call to this URL which is generated dynamically as an upload pre-signed url in the previous steps to upload our document to this asset location.
It would be great if you could point me in the right direction so that we achieve this with SBPA process only without using automation . Basically, if there is a possibility to pass the call as dynamic URL from SBPA process.
 
Best Regards,
Geet
View Entire Topic
Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello @geetbijlani , 

It depends to what extent the URL is dynamic. Even if the URL is dynamic, the API specification should have some URL parameters which can be dynamically set. For example, here the task API where few parameters have to be provided as URL param - rest is the host which can be controlled via the destination. 

Hope that helps. 

Archana_0-1713791756596.png

 

geetbijlani
Participant
0 Kudos

Hi @Archana ,

Well in this case , as described above:

The url looks like : 

We need to make a "PUT" call to this URL which is generated dynamically as an upload pre-signed url in the previous steps to upload our document to this asset location. I am not sure if its possible to create an action project with this as part https://dcplatformstorageservice-prod-us-east-1.s3-accelerate.amazonaws.com/ stays generally constant followed by the security token and id. Also, how do we get API specification for the actions project for a url that being created dynamically.
 
Best Regards,
Geet