Skip to content

Commit b55774f

Browse files
authored
Merge branch 'main' into caburk-patch-3
2 parents 0423244 + 900714f commit b55774f

17 files changed

+251
-137
lines changed
Loading
Loading

powerapps-docs/cards/send-a-card/send-card-with-flow.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Send a card automatically with a flow (preview)
2+
title: Send a card automatically with a flow
33
description: Learn how to send a card automatically using a Power Automate flow.
44
keywords: "Card Designer, Power Apps, cards, send a card, Power Automate, flow"
55
author: anuitz
@@ -15,19 +15,21 @@ contributors:
1515
- anuitz
1616
---
1717

18-
# Send a card automatically with a flow (preview)
18+
# Send a card automatically with a flow
1919

20-
[!INCLUDE[cards_preview_notice](../includes/preview-include.md)]
20+
Use Power Automate to send cards for Power Apps from a flow. By setting up a flow that is triggered by an event, you can automate the process of sending cards in Teams. For instance, you can create a flow that requests the assigned individual to approve or reject an expense when a new record is added to Dataverse. Alternatively, you can create a flow that sends a daily status update in Teams every morning.
2121

22-
Use Power Automate to send cards. By setting up a flow that is triggered by an event, you can automate the process of sending cards. For instance, you can create a flow that requests the assigned individual to approve or reject an expense when a new record is added to Dataverse. Alternatively, you can create a flow that sends a daily status update every morning.
22+
You can use **Send from a flow** option in **Send** menu on the card's **Play** page to launch a Power Automate flow template for sending cards in Teams. You can modify and save this template as a new flow to post your card in Teams chat or channel or send it to a specific Teams user.
23+
24+
:::image type="content" source="../media/send-a-card/Send_from_flow.png" alt-text="Select Send from flow option to lauch a Power Automate template.":::
2325

2426
## Prerequisites
2527

2628
- [Power Automate](https://make.powerautomate.com) account
2729
- Create a [card](../tutorials/hello-world-card.md)
2830
- The [Power Apps Teams app](send-card-in-teams.md#add-power-apps-to-teams) installed in the chat, group chat, or channel that the card will be sent to
2931

30-
## Cards for Power Apps connector
32+
## Use Cards for Power Apps connector in Power Automate
3133

3234
The **Cards for Power Apps** connector is used to create instances of cards to send using a flow. The connector has no triggers and two actions:
3335

@@ -36,20 +38,34 @@ The **Cards for Power Apps** connector is used to create instances of cards to s
3638

3739
:::image type="content" source="../media/send-a-card/cards-connector.png" alt-text="Screenshot of the cards for Power Apps connector.":::
3840

39-
## Send card in Teams using the Teams connector
41+
## Send a card for Power Apps in Teams chat or channel
4042

41-
Sending a card in Teams requires a card instance. To get a card instance, use the **Cards for Power Apps** connector actions. The **Create card instance** action has `Card` dynamic content that can be used with the **Teams** connector **Post card in a chat or channel** action.
43+
Sending a card in Teams froma flow requires a card instance. To crearte a card instance, use the **Cards for Power Apps** connector actions. The **Create card instance** action has `Card` dynamic content that can be used with the **Teams** connector **Post card in a chat or channel** action.
4244

43-
1. Create or modify an existing flow
45+
1. Create or modify an existing flow, or use **Send** > **Send from a flow** on cards for Power Apps **Play** page to start with a template.
4446
1. Make sure the flow has a trigger. In the screenshot below, the trigger is when a new account record is created.
45-
1. Create or get the card instance you want to send using the **Cards for Power Apps** connector. In the screenshot, we created a card instance of the `Account Card` and setting the `Body` input variable to the `Account Name` of the newly created account record.
47+
1. Create a card instance you want to send using the **Cards for Power Apps** connector's **Create card instance** action. In the screenshot, we created a card instance of the `Account Card` and setting the `Body` input variable to the `Account Name` of the newly created account record.
4648
1. Add an action to **Post card in a chat or channel** using the **Teams** connector.
47-
1. On the action, set **Post as** to `Power Apps (Preview)`.
49+
1. On the action, set **Post as** to `Power Apps`.
4850
1. On the action, set **Post in**, **Team** & **Channel**, or **Group chat** to the conversation you want to send the card in. In the example screenshot, this is to the `Cards for Power Apps (Customer Channel)` Teams in the `General` channel.
4951
1. On the action, set **Card** to the `Card` dynamic content from the **Cards for Power Apps** connector action you added earlier.
5052

5153
:::image type="content" source="../media/send-a-card/card-in-flow-example.png" alt-text="Screenshot a flow that creates a card instance when an account record is created and sends it in Teams.":::
5254

55+
## Send a card for Power Apps to a Teams user
56+
You can send a card to a specific Teams user. In a Power Automate flow, use the **Create card instance** action in **Cards for Power Apps** connector actions to create a card instance as `Card` dynamic content. You can use the resulting `Card` dynamic content with the **Teams** connector **Post card in a chat or channel** action to send a card to a specific Teams user.
57+
58+
1. Create or modify an existing flow, or use **Send** > **Send from a flow** on cards for Power Apps **Play** page to start with a template.
59+
1. Make sure the flow has a trigger. In the screenshot below, the trigger is when a new account record is created.
60+
1. Create a card instance you want to send using the **Cards for Power Apps** connector's **Create card instance** action. In the screenshot, we created a card instance of the `Account Card` and setting the `Body` input variable to the `Account Name` of the newly created account record.
61+
1. Add an action to **Post card in a chat or channel** using the **Teams** connector.
62+
1. On the action, set **Post as** to `Power Apps`.
63+
1. On the action, set **Post in** to **Chat with Power Apps**.
64+
1. On the action, enter the **Teams user** you want to post the card to.
65+
1. On the action, set **Card** to the `Card` dynamic content from the **Cards for Power Apps** connector action you added earlier.
66+
67+
:::image type="content" source="../media/send-a-card/Send_card_to_a_Teams_user.png" alt-text="Screenshot a flow that creates a card instance when an account record is created and sends it to a specific Teams user.":::
68+
5369
## Managing your flow in a solution
5470

5571
For more details on managing your flow that uses the Card for Power Apps Connector, see [Manage cards in solutions](../manage-cards/manage-cards.md).

powerapps-docs/maker/TOC.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,7 @@
22972297
href: ./data-platform/azure-synapse-link-choices-serverless.md
22982298
- name: Export data in Delta Lake format
22992299
href: ./data-platform/azure-synapse-link-delta-lake.md
2300-
- name: View Dataverse data in Microsoft Fabric (preview)
2300+
- name: View Dataverse data in Microsoft Fabric
23012301
href: ./data-platform/azure-synapse-link-view-in-fabric.md
23022302
- name: Analyze in Azure Data Lake Storage Gen2
23032303
items:
@@ -2542,6 +2542,8 @@
25422542
href: ../cards/tutorials/simple-shopping-list.md
25432543
- name: Create a card with data from Dataverse
25442544
href: ../cards/tutorials/dataverse-card.md
2545+
- name: Building AI plugins for discovery by Copilot (preview)
2546+
href: common/build-ai-plugin-for-copilot.md
25452547
- name: AI Builder
25462548
href: ../use-ai-builder.md
25472549
- name: Sample apps and solutions
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Building AI plugins for discovery by Copilot (preview)
3+
description: Building AI plugins for discovery by Copilot.
4+
ms.date: 11/07/2023
5+
author: mduelae
6+
ms.author: mkaur
7+
ms.reviewer: mkaur
8+
ms.topic: how-to
9+
ms.subservice: common
10+
manager: tapanm
11+
ms.custom: bap-template
12+
search.audienceType:
13+
- maker, admin
14+
---
15+
16+
# Building AI plugins for discovery by Copilot (preview)
17+
18+
[This article is prerelease documentation and is subject to change.]
19+
20+
Microsoft Dataverse supports three types of AI plugins – Dataverse custom APIs, Dataverse Table Search, and Dataverse File Search. Before you start building AI plugins for discoverability by Copilots across Microsoft 365, you need to decide which one of the supported AI plugin types to create.
21+
22+
While other AI plugin types might be added as supported by Dataverse, the steps to define plugin are the same.
23+
24+
All components within AI plugins are solution-aware, and follow the standard application lifecycle management (ALM) principles.
25+
26+
In general, there's two main steps in defining AI plugins.
27+
28+
1. Define the core functionality that you want to expose as an AI plugin. <br>
29+
This is a prerequisite and an existing step in Dataverse about defining a custom API or a custom connector. This means that you can define an AI plugin for your existing custom APIs or custom connectors without any major changes.
30+
1. Define the metadata of the AI plugin that can be discovered by a Copilot.
31+
This is a new step that lets you define the metadata for your AI plugin that is used by the Copilots to discover and invoke this plugin. The process includes the following three main components:
32+
1. **AI plugin definition**: The metadata of your plugin. For example, **SalesAIPlugin/**.
33+
1. **AI plugin operation**: A list of operations supported by your plugin. For example, **GetOpportunities**, **CreateOpportunity/**.
34+
1. **AI plugin instance**: Controls the state of your plugin, which is **Enable** or **Disable**.
35+
36+
Let’s get started and define our first AI plugin. In this example, we're going to define an AI plugin of type custom API.
37+
38+
> [!Note]
39+
> A basic understanding and knowledge of application lifecycle management (ALM) in Dataverse is required to follow this example. See [Solution concepts](/power-platform/alm/solution-concepts-alm) in Power Platform ALM to learn more.
40+
41+
42+
## Defining a Dataverse custom API as an AI plugin
43+
44+
### Step 1 – Define custom API
45+
46+
You can create a custom API using the Power Apps. More information: [Create a custom API in Power Apps](../../developer/data-platform/create-custom-api-maker-portal.md)
47+
48+
The plugin infrastructure currently supports only custom APIs with ‘IsFunction=False’ and ‘IsPrivate=False’. Hence, ensure that your custom API isn't a function or private API. At this point, you can test your custom API using a Postman client.
49+
50+
### Step 2 – Define AI plugin
51+
52+
Once you define the custom API, you can define the AI plugin using Power Apps. First, [Create a solution](../data-platform/create-solution.md). Once you create a solution, follow these steps to create an AI plugin:
53+
54+
1. In your solution, select **New** > **More** > **Other** > **AI plugin** from the drop-down.
55+
1. Enter the values for the required fields.
56+
1. **Name**: Enter a name that starts with a prefix. For example, new_myAIPlugin
57+
1. **PluginType**: Dataverse
58+
1. **HumanName**, **HumanDescription**, **ModelName**, **Model Description** fields control how your plugin is discovered by the large language model (LLM). So, provide meaningful values for those for your plugins. The remaining fields you can leave blank for now.
59+
1. Select **Save**.
60+
61+
### Step 3 – Define AI operations
62+
63+
Once you have defined an AI plugin, the next step is to add the operations you want the plugin to expose. This can be done by selecting **+ New AIPluginOperation** from the top menu bar.
64+
65+
Enter the following fields in this form:
66+
67+
- **Name**: Provide a name for your operation
68+
- **OperationID**: this needs to be a value with a prefix like shown below
69+
- **Custom API**: This will be a look up to the custom API you created in Step 1.
70+
- **Description**: This field is currently used by BizChat for plugin matching, so don’t leave it blank
71+
72+
Select **Save and close**. If you have additional operations, you can add those following the same steps.
73+
74+
:::image type="content" source="media/plugin-define-ai-operation.png" alt-text="Defile AI operations":::
75+
76+
### Step 4 – Package as a solution
77+
78+
Once you add all the required plugin metadata to your solution, make sure that you add your custom API to the same solution as well. This can be done in your solution, select **Add Existing** > **More** > **Other** > **CustomAPI** from the drop-down and select the custom API you created in Step 1.
79+
80+
Go to **Solutions** section in Power apps and select your solution. Then, select **Export** from the menu > select **Managed**. You can download the exported zip file and import into another test environment and test your changes.
81+
82+
83+
62.5 KB
Loading
54.4 KB
Loading
Loading

0 commit comments

Comments
 (0)