Skip to content

Sync Copilot with SAP using Power Automate and yunIO

This article shows how to synchronize Microsoft Copilot with SAP.
In the following scenario, the capabilities of a copilot chatbot is extended to query data from SAP. A Power Automate workflow provides the functionality to query the data. It calls a yunIO service whenever users request the data via the chatbot.

Prerequisites

Setup in Copilot Studio

  1. Log into Microsoft Copilot Studio and create a new copilot, see Microsoft Documentation: Create a copilot.
  2. Open the Actions tab and click [+ Add an action] . The menu "Step 1 of 3: Choose an action" opens.
    copilot-new-action
  3. Click [Create a new flow] . A new browser tab with a Power Automate workflow opens.
    copilot-new-flow
  4. If your yunIO service requires input parameters, create the parameters in the Run a flow from copilot trigger action.

    Note

    Input parameters are required when using a yunIO service to write data to SAP. In this case, make sure to assign the input parameters correctly in the Power Automate woekflow.

  5. Add a yunIO Custom Connector to the workflow , see Integrate a yunIO Service with Power Automate.
    Alternatively, add an HTTP action that triggers your yunIO service.
    copilot-array-variable

  6. If the yunIO service returns a string, skip this step.
    If the yunIO service returns data that is not a string, add an Initialize variable action to assign the correct data type . The depicted example returns multiple items in an array.
  7. Add the SAP data as an output parameter to the Respond to Copilot action .
    copilot-respond
  8. Save the workflow.
  9. Go back to Copilot Studio and click [Refresh]. The workflow is now available in the list of actions.
    copilot-refresh
  10. Select the workflow. The menu "Step 1 of 3: Choose an action" opens.
  11. Click [Next]. The menu "Step 2 of 3: Review inputs and outputs" opens.
  12. Click [Next]. The menu "Step 3 of 3: Review and finish" opens.
  13. In the section Configure, click [Edit] to change the name and description of the action. Copilot selects and runs the action based on the name and description.
    copilot-description
  14. Click [Finish].
  15. Navigate to [Settings] > Generative AI and select Generative (preview).
    copilot-settings
  16. Click [Save].
  17. Test the copilot chatbot in Copilot Studio.
    copilot-test

Use copilot topics to add trigger phrases and more context to the copilot action. For more information, see Microsoft Documentation: Call a flow from a topic.

Note

The number of characters returned by the Power Automate workflow may be limited. This will be improved upon in the future.



Last update: September 18, 2024
Written by: Christian Tauchmann, Valerie Schipka