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

You can use process to call the APIs. For that, you have to create Action Project for the APIs and then call one after another in the process. Using Automation just for API calls are not recommended. I have used that in multiple projects, and it works as required. Let me know if that helps. 

Regards,
Archana

geetbijlani
Participant
0 Kudos

Hi @Archana ,

Thanks for your reply. I understand and have done the same.

However, the problem is to create an action project you need to have predefined API endpoint. In this case, I have a dynamic url generated in previous step which needs to be called and I do not find an option to call this url which cannot be done using Actions project.

Best Regards,

Geet