Skip to content

Commit a3166b3

Browse files
authored
Merge pull request #18 from pnp/alexc-msft/promptbuddy-integration
Prompt Buddy integration
2 parents 595f800 + fa63e7d commit a3166b3

12 files changed

+118
-8
lines changed

Documentation/Architecture.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The below documentation details the architecture of the Prompt Pulse solution. Prompt Pulse is provided as a Power Apps solution file (**unmanaged**), this allows easy updates when new versions are released.
44

5+
The Prompt Buddy integration is provided as a Dataverse for Teams solution file (**unmanaged**) and is deployed separately from the Prompt Pulse solution.
6+
57
## Connectors
68

79
The following connectors are used in the Prompt Pulse solution:
@@ -18,6 +20,11 @@ It's worth noting that Group Chats and Viva Engage Communities are pulled into t
1820

1921
The above connectors are also used in the Power Automate flows.
2022

23+
The following connectors are used in the Prompt Buddy Integration solution:
24+
25+
- Dataverse
26+
- SharePoint
27+
2128
## Service Account
2229

2330
**It is highly recommended to deploy Prompt Pulse using a dedicated service account/M365 user** and share the app across the organization/with the required users. The UPN for this service account is stored in the configuration list.
@@ -26,6 +33,8 @@ Adaptive cards and Viva Engage notifications are sent using the account that dep
2633

2734
In addition, in order to post the cards/notifications, the user account sending them needs to be member of the Team, Group Chat, Viva Engage community, this is handled automatically (with the exception of Group Chats) through the app. **Bear this in mind because not using a service account would result in the user who deployed the solution being added to these locations**.
2835

36+
This service account can also be used to deploy the Prompt Buddy integration.
37+
2938
## Power App
3039

3140
The Prompt Pulse Power App is a canvas app using mostly **modern** controls where possible. Prompts that are shared/scheduled are stored in the **Prompts** SharePoint list.
@@ -34,6 +43,10 @@ The app uses the above connectors (and flows listed below) to interact with the
3443

3544
The app can be customized if you wish, though it's worth noting that customizations will be lost if you attempt to update the solution in the future when new releases are available.
3645

46+
## Prompt Buddy Integration
47+
48+
Integration with Prompt Buddy is provided through a single flow (details can be found below) which adds Prompt Buddy prompts to the **Prompts** list and Prompt Pulse prompts to the relevant dataverse tables used by Prompt Buddy. This keeps both solutions in sync and ensures prompts can be accessed from both apps.
49+
3750
# Flows
3851

3952
Detailed information about the flows used in the solution can be found below:
@@ -102,6 +115,14 @@ This flow is required because the native Viva Engage connector does not return t
102115

103116
This flow is triggered from the Power App when the user clicks the **Upload** button. It parses the content of the csv file and returns it as JSON.
104117

118+
## Prompt Pulse Sync
119+
120+
This flow is triggered on a recurrent scheduled inside the Dataverse for Teams environment in which the Prompt Buddy app resides. It performs the following high-level steps:
121+
122+
- Get Prompt Buddy Microsoft 365 Copilot prompts.
123+
- Loop through prompts and create a list item in the Prompts list, set the value of the 'SyncedToPulse' column to true and set the 'BuddyId' column to the unique id of the dataverse record.
124+
- Loop through prompts in the Prompts list and create the relevant records in the Prompt Buddy dataverse tables, set the 'SyncedToBuddy' column to true.
125+
105126
## Data Source
106127

107128
As detailed in the [Overview](Overview.md) documentation, there are 3 SharePoint lists used in prompt pulse. Please see the details of each list below and what each column is used for:
@@ -122,6 +143,10 @@ As detailed in the [Overview](Overview.md) documentation, there are 3 SharePoint
122143
| Scheduled | Yes/No | Whether or not the prompt has been scheduled.
123144
| ScheduledDateTime | Date and time | Date/Time to send the prompt.
124145
| Status | Choice | Status of the prompt.
146+
| SyncedToBuddy | Yes/No | Whether or not the prompt has been synced to Prompt Buddy (only used if the Prompt Buddy integration is deployed).
147+
| SyncedToPulse | Yes/No | Where or not the prompt has been synced from Prompt Buddy to Pulse (only used if the Prompt Buddy integration is deployed).
148+
| BuddyId | Single line of text | Unique id of the prompt in the Prompt Buddy dataverse prompts table.
149+
125150

126151
### Users list
127152

Documentation/Deployment-guide.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ To begin, you will need:
1919
- Regional settings set correctly on the SharePoint site for your timezone and locale (this is important for the scheduling to work correctly).
2020
- The [latest release](https://github.com/pnp/prompt-pulse/releases/latest) of Prompt Pulse.
2121

22+
### Prompt Buddy Integration
23+
24+
If you wish to integrate with Prompt Buddy, it must be deployed and set up in a Teams Team before deploying Prompt Pulse.
25+
26+
Once Prompt Pulse is deployed, follow 'Step 5' below to deploy the Prompt Buddy integration, this requires deployment of an additional Power Apps solution.
27+
28+
Note - You must create ALL of the columns below even if you are not deploying the integration.
29+
2230
## Step 1: Create SharePoint Lists
2331

2432
1. Navigate to the SharePoint site.
@@ -39,6 +47,10 @@ To begin, you will need:
3947
| Scheduled | Yes/No | Default value = No |
4048
| ScheduledDateTime | Date and time | Include time |
4149
| Status | Choice | Not Sent, Send, Sent, Failed | Default value = Not Sent
50+
| Source | Choice | Pulse, Buddy
51+
| SyncedToBuddy | Yes/No | Default value = No
52+
| SyncedToPulse | Yes/No | Default value = No
53+
| BuddyId | Single line of text |
4254

4355
4. Create a list named 'Users'.
4456
5. Create the following columns:
@@ -68,6 +80,12 @@ Title: ServiceAccountUPN
6880

6981
Value: UPN (Email) of your service account
7082

83+
9. Create a third list item in the above list with the following details:
84+
85+
Title: PromptBuddyInstalled
86+
87+
Value: 'true' (if you wish to integrate with Prompt Buddy) or 'false'.
88+
7189
## Step 2: Deploy Power Apps solution
7290

7391
1. Navigate to **Power Apps** as the service account.
@@ -113,4 +131,31 @@ Before rolling out Prompt Pulse, it is neccessary to configure the permisions on
113131
3. Break permission inheritance on the **Prompts** and **Users** lists and add only users/groups that will use Prompt Pulse.
114132
4. Ensure that admins who may need to read, edit and delete all list items have **Full Control**/**Owner** permissions on the SharePoint site.
115133

134+
## Step 5: Deploy Prompt Buddy Integration
135+
136+
These steps deploy the integration between Prompt Pulse and Prompt Buddy. This integration is provided in the form of a single Flow which is responsible for syncronizing items from the Prompt Buddy dataverse tables to the Prompts SharePoint list and visa versa.
137+
138+
You may use any account to deploy this flow (it will need to be a member of the Teams Team in which Buddy is deployed), however it is worth noting that any prompts synced to Buddy will be created as the user who deploys this flow. Therefore you may wish to use the service account.
139+
140+
This flow runs on a recurrent schedule and by default runs every hour, feel free to edit the flow and update the interval as needed.
141+
142+
1. Launch Microsoft Teams.
143+
2. Open the Power Apps app in Teams.
144+
3. Navigate to the **Build** tab.
145+
4. Select the environment in the left pane in which Prompt Buddy is deployed.
146+
5. Click **See all** in the list items created in the environment.
147+
6. Click **Import > Import solution** from the menu bar.
148+
7. Click **Browse** and locate the **PromptPulseBuddyIntegration_1.0.0.0.zip** solution zip file (if there is a newer version please use that).
149+
8. Click **Next**.
150+
9. Click **Next**.
151+
10. Click **Sign in** next to each of the connectors and wait for the green tick.
152+
11. Click **Next**.
153+
12. On the **Environment Variables** pane, select the SharePoint site you created and the **Prompts** List.
154+
13. Click **Import**.
155+
14. A message should be displayed to say the solution has been imported successfully.
156+
15. Locate the **Prompt Pulse Sync** flow and click on it.
157+
16. Click **Run** from the menu bar and click **Run flow**.
158+
18. Verify the run completes without errors.
159+
19. The integration is now deployed and the flow will automatically sync the prompts in both solutions.
160+
116161
### Deployment is now complete - enjoy using Prompt Pulse!
9.39 KB
Loading
95.6 KB
Loading
9.18 KB
Loading
52.6 KB
Loading
21 KB
Loading

Documentation/Overview.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Prompt Pulse consists of the following components:
66
- 6 x Power Automate flows.
77
- 3 x SharePoint lists for data storage
88

9+
Separate Dataverse for Teams solution for integration with Prompt Buddy containing 1 Power Automate flow.
10+
911
For more details on what each of these does please check out the [Architecture](Architecture.md) documentation.
1012

1113
## The App
@@ -16,6 +18,8 @@ The app is fully responsive, works on mobile devices 📱 and supports dark mode
1618

1719
To get the most out of Prompt Pulse, we recommend using the app in Microsoft Teams either as a pinned app and/or add the app into individual teams as a tab.
1820

21+
Prompt Pulse integrates with Prompt Buddy, follow the [Deployment guide](Deployment-guide.md) to deploy the integration.
22+
1923
When a user launches Prompt Pulse for the first time, they will be taken through a tutorial explaining how to use the app.
2024

2125
## Using the app
@@ -49,7 +53,7 @@ From the main screen, users can view the latest 20 prompts. To use a prompt simp
4953

5054
You can then paste the prompt into Microsoft 365 Copilot.
5155

52-
The **All Prompts** tab allows you to view all prompts that have been shared, text can also be copied by clicking the tile.
56+
The **All Prompts** tab allows you to view all prompts that have been shared, text can also be copied by clicking the tile. If the integration with Prompt Buddy is deployed, an icon will be visible showing the 'source' of the prompt (Pulse or Buddy).
5357

5458
The adaptive card also has a button which will take a user straight to the **All Prompts** screen. Please note - this will open the app as a 'personal' app due to restrictions with deeplinking, if the user does not have the app installed they will be prompted to install it.
5559

@@ -80,21 +84,39 @@ The **Send Now** option sends the prompt straight away and removes it from the s
8084

8185
Prompts can be imported into Prompt Pulse in bulk, enabling you to easily schedule and send prompts right away, encouraging the use of Copilot from the get go.
8286

87+
Prompts can be imported from CSV or Prompt Buddy.
88+
8389
A csv file has been provided [Prompts.csv](../Prompts.csv) with pre-built prompts for you to import. Feel free to edit the csv and add/remove as many prompts as you like (you will also be able to remove when importing). The pre built csv will be update periodically with new prompts so please keep an eye out for changes.
8490

85-
To import prompts, follow the steps below:
91+
#### Import from CSV
92+
93+
To import prompts from CSV, follow the steps below:
8694

8795
1. Navigate to the import screen by clicking the **Import Prompts** tab.
88-
2. Use the attachment control to upload the csv file (only csv files are supported AND the csv file must be in the same format as the provided sample).
89-
3. Click **Upload**.
90-
4. The table will update to show all the prompts from the csv.
91-
5. For each row/prompt, choose whether to schedule or send the prompt (**send** will send the prompt straight away when imported). Also choose the locations to share the prompt to.
92-
6. Once ready, click **Import**, this will import the prompts into the SharePoint list and send/schedule them as per your selections.
96+
2. Click the **CSV file** button.
97+
3. Use the attachment control to upload the csv file (only csv files are supported AND the csv file must be in the same format as the provided sample).
98+
4. Click **Upload**.
99+
5. The table will update to show all the prompts from the csv.
100+
6. For each row/prompt, choose whether to schedule or send the prompt (**send** will send the prompt straight away when imported). Also choose the locations to share the prompt to.
101+
7. Once ready, click **Import**, this will import the prompts into the SharePoint list and send/schedule them as per your selections.
93102

94103
**To delete prompts that you do not wish to import, use the trash icon.**
95104

96105
<img src="https://github.com/pnp/prompt-pulse/blob/main/Documentation/Images/prompt-pulse-import-screenshot.png?raw=true" alt="Prompt Pulse Import Prompts Screenshot"><br/>
97106

107+
#### Import from Prompt Buddy
108+
109+
To import prompts from Prompt Buddy, follow the steps below:
110+
111+
1. Navigate to the import screen by clicking the **Import Prompts** tab.
112+
2. Click the **Prompt Buddy** button.
113+
3. Use the table at the top to add prompts to import by clicking the **+** icon. This table shows Prompt Buddy prompts that have not yet been imported into Prompt Pulse.
114+
4. Prompts added will appear in the **Selected Prompts** table.
115+
6. For each row/prompt, choose whether to schedule or send the prompt (**send** will send the prompt straight away when imported). Also choose the locations to share the prompt to.
116+
7. Once ready, click **Import**, this will import the prompts and send/schedule them as per your selections.
117+
118+
<img src="https://github.com/pnp/prompt-pulse/blob/main/Documentation/Images/prompt-pulse-import-buddy-screenshot?raw=true" alt="Prompt Pulse Import Prompt Buddy Prompts Screenshot"><br/>
119+
98120
### Tips
99121

100122
- Use a dedicated service account/M365 user when deploying Prompt Pulse (adaptive cards will be sent from this account).
@@ -117,12 +139,15 @@ Bear the above in mind when using Prompt Pulse, in a future iteration we will lo
117139

118140
There are 6 flows that are part of the Prompt Pulse solution, these are listed below along with a brief description of what these do, for more details please view the [Architecture](Architecture.md) documentation.
119141

142+
As mentioned earlier there is an additional flow for the Prompt Buddy integration.
143+
120144
- Send Prompt: This flow executes when a list item is created or modified in the 'Prompts' list and sends the prompt to the specified location using adaptive cards or in the case of Viva Engage, a message.
121145
- Send Scheduled Prompt: This flow runs on a recurrent schedule (5 minutes by default) and is responsible for checking for scheduled prompts in the list and sending these.
122146
- Like Prompt: This flow runs when a user clicks the **Like Prompt** button in the adaptive cards and adds the prompt to the users' liked prompts.
123147
- Get Group Chats: This flow is used in the Power App and retrieves a list of group chats that the current user is a member of where the Prompt Pulse account is a member of the chat.
124148
- Get Engage Communities: This flow is used in the Power App and returns a list of Viva Engage Communities that the current user is a member of.
125149
- Parse Prompt CSV: This flow is used in the Power App and parses the content of the uploaded csv file and returns it in JSON format.
150+
- Prompt Pulse Sync: This flow is used when Prompt Buddy is deployed, it syncronizes prompts from Prompt Buddy to Prompt Pulse and visa versa.
126151

127152
## Data Storage
128153

6.79 KB
Binary file not shown.

PromptPulse_1_0_0_3.zip

-2.06 MB
Binary file not shown.

0 commit comments

Comments
 (0)