Power Automate Workflows
Inbound workflow
The "Post PB Message from Webhook" workflow in Power Automate is designed to process incoming data from a webhook and post structured messages to a Microsoft Teams channel using adaptive cards. This workflow acts as a bridge between SAP and Teams
Importing
In Power Automate, navigate to 'My Flows' in the left hand menu.
At the top of the page, click on the 'Import' button. This will open the import screen where you can upload your workflow.
Select 'Import Package (Legacy)' and select the workflow package file (Post_PB_Message_From_Webhook.zip) from your local machine.
After the workflow is uploaded, you will see a list of resources in the package.
You will need to action the related resource and re-establish the connections. You will need to authenticate with the appropriate credentials for the services the workflow uses.
Once all resources are configured, click the 'Import' button at the bottom of the page.
Outbound workflow
The outbound workflow is designed to handle responses to adaptive cards within Microsoft Teams.
When a user interacts with an adaptive card, the workflow captures key information such as the message source system, message ID, user details, and the response provided. This data is then passed to a HTTP POST method, which facilitates the integration by sending the response back to SAP.
Importing a flow from a package file
For the outbound workflow, you can follow the same steps as for the inbound flow (above), but additional modifications will be necessary within the package content.
Select 'Import Package (Legacy)' and select the workflow package file (Handle_PB_Message_response.zip) from your local machine.
For the resource type flow select the Update or Action Spanner.

On the Import Setup, under the field Setup, select “Create as new” and give Resource name “Handle PB Message Response”.
You must configure the related resource and re-establish the connections, following the same process as the inbound workflow. Ensure you authenticate using the correct credentials for the services utilized by the workflow. If a connection is not available, select 'Create New' and add the required connection.
Amending Outbound Workflow
After importing the package file, locate the workflow. Select 'More Commands' and then select 'Edit'.

Review each step in the workflow to ensure accuracy.
Populate the following parameters:
Insert a new step below 'Get user profile (V2)':

Select 'Add an Action' and search for 'HTTP'.

Select action 'HTTP PREMIUM':

Populate the following parameters:
Method - POST
URL - PreBilt URL, with /ztctm_ewm_om on the end
Body
{
"MSGSOURCESYS": "@{triggerBody()?['entity']?['cardOutputs']?['msgSourceSys']}",
"MSGID": "@{triggerBody()?['entity']?['cardOutputs']?['msgID']}",
"MSGUSERID": "@{outputs('Get_user_profile_(V2)')?['body/mail']}",
"MSGUSERNAME": "@{outputs('Get_user_profile_(V2)')?['body/displayName']}",
"MSGACTION": "SendReply",
"MSG": "@{triggerBody()?['entity']?['cardOutputs']?['message']}"
}
Delete the highlighted step below:

Select 'Save' to save the changes to the outbound workflow.
Last updated
Was this helpful?