Example Scenario: Using Calendar APIs in SAP BTP Build Process Automation
Learn how you can use the calendar APIs in an automated process that allows you to start a workflow in the SAP Analytics Cloud calendar when another step in your automated process is completed.
In addition to automatically starting a workflow in the calendar, you can automatically check whether the workflow is already completed and proceed with the next automated steps once the first one is completed. You also have the option to change the status of your workflow to react to outcomes of other automated steps, for example: Suspend or cancel the workflow if it is no longer needed.
Creating Actions Using the Calendar APIs
Procedure
Results
Using the Calendar APIs in the Process Automation
The following graphic shows an example process for using the APIs in an automated process. This is just a basic example and should give a brief overview of how to use the calendar APIs in action. You can extend the process with any steps to meet your requirements.

The entry point of this process is an input form in which the user can enter the ID of the event to be instantiated. You can replace the entry point with any action that should start a workflow in the SAP Analytics Cloud calendar. If you have already saved the ID as referenceEventId, you don’t need to insert the ID of the event in an input form again.
Once the new event is created, the automated process checks the status of the event every 6 hours using the GET API. You can define how often the event should be fetched to check the status. If the instantiated event runs for several weeks, it might make sense to check every day. If it only runs for an hour, you might want to check every 5 minutes.
As soon as the condition is fulfilled, in this example the event should have the status Successful, an email is sent to inform users that the event is completed.
Your process doesn't have to end with an email. You can add further steps that are required once the workflow in SAP Analytics Cloud has reached a certain status or progress.



