Skip to content

Commit 820b744

Browse files
authored
Merge pull request #156 from jan-chlebek/main
sharepoint-site-creation-bot
2 parents 6755621 + e4cdf6f commit 820b744

File tree

43 files changed

+1759
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1759
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# SharePoint Site Creation Bot
2+
3+
## Summary
4+
5+
Sample Bot that creates a SharePoint Site by calling Power Automate and using Microsoft Graph/SharePoint Rest APIs.
6+
7+
This bot can create either a blank Communication site or a blank Team site (Group connected).
8+
9+
This solution was built and targeted to be used in Dataverse for Teams.
10+
11+
![picture of the sample](assets/bot-create-site.png)
12+
13+
## Applies to
14+
15+
![Power Apps](https://img.shields.io/badge/Power%20Apps-No-red "No")
16+
![Power Automate](https://img.shields.io/badge/Power%20Automate-Yes-green "Yes")
17+
![Power BI](https://img.shields.io/badge/Power%20BI-No-red "No")
18+
![Power Pages](https://img.shields.io/badge/Power%20Pages-No-red "No")
19+
![Power Virtual Agents](https://img.shields.io/badge/Power%20Virtual%20Agents-Yes-green "Yes")
20+
![Dataverse](https://img.shields.io/badge/Dataverse-No-red "No")
21+
![AI Builder](https://img.shields.io/badge/AI%20Builder-No-red "No")
22+
![Custom Connectors](https://img.shields.io/badge/Custom%20Connectors-No-red "No")
23+
![Power Fx](https://img.shields.io/badge/Power%20Fx-No-red "No")
24+
25+
26+
## Compatibility
27+
28+
![Premium License](https://img.shields.io/badge/Premium%20License-Not%20Required-red.svg "Premium license not required")
29+
![Experimental Features](https://img.shields.io/badge/Experimental%20Features-No-red.svg "Does not rely on experimental features")
30+
31+
32+
## Contributors
33+
<!--
34+
We use this section to recognize and promote your contributions. Please provide one author per line -- even if you worked together on it.
35+
36+
We'll only use the info you provided here. Make sure to include your full name, not just your GitHub username.
37+
38+
Provide a link to your GitHub profile to help others find more cool things you have done. The only link we'll accept is a link to your GitHub profile.
39+
40+
If you want to provide links to your social media, blog, and employer name, make sure to update your GitHub profile.
41+
-->
42+
43+
* [Michel Mendes](https://github.com/michelcarlo) ([@michelcarlo](https://twitter.com/michelcarlo))
44+
45+
## Version history
46+
47+
Version|Date|Comments
48+
-------|----|--------
49+
1.0|July 16, 2022|Initial release
50+
2.0|July 16, 2022|Migration from poverva-samples repository with codebase change to copilot studio by [Jan Chlebek](https://github.com/jan-chlebek)
51+
52+
53+
## Minimal path to awesome
54+
* [Download](solution/SharePointSiteCreationBot_2_0_0_0.zip) the `.zip` from the `solution` folder
55+
* Import the `.zip` file to Copilot Studio
56+
* Configure the connection References, and proceed importing.
57+
* After the import has suceeded, you can edit the chatbots from Copilot Studio, and publish it to any Team you have permissions to, or submit it to be published to your tenant if you have the rights.
58+
59+
60+
61+
62+
## Features
63+
64+
This is a bot built and targeted to be used within a Dataverse for Teams environments. No premium licenses are required.
65+
66+
The bot is triggered by any of the phrases:
67+
* Create a site
68+
* Create a SharePoint site
69+
* I want a site
70+
* I want a SharePoint site
71+
* Give me a site
72+
73+
You can then choose to create a Communication site or a Team site.
74+
75+
After specifiying your site name, the bot will then trigger a Power Automate flow that handles the SharePoint site creation (part of the solution package).
76+
77+
Before creating the site, the flow checks if a site with the same destination URL exists. If it does not exist then if the site to be created is a Communication Site, it will use the SharePoint REST API to create it, if it is a Team site we use Microsoft Graph (using the Send an HTTP request - Preview action from the Office 365 Groups connector).
78+
79+
## Help
80+
81+
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
82+
83+
If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=sharepoint-site-creation-bot&authors=@michelcarlo&title=sharepoint-site-creation-bot%20-%20).
84+
85+
For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=sharepoint-site-creation-bot&authors=@michelcarlo&title=sharepoint-site-creation-bot%20-%20).
86+
87+
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=sharepoint-site-creation-bot&authors=@michelcarlo&title=sharepoint-site-creation-bot%20-%20).
88+
89+
## Disclaimer
90+
91+
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
92+
93+
<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/sharepoint-site-creation-bot" aria-hidden="true" />
45.7 KB
Loading
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
[
2+
{
3+
"name": "pnp-powerplatform-samples-sharepoint-site-creation-bot",
4+
"source": "pnp",
5+
"title": "SharePoint Site Creation Bot",
6+
"shortDescription": "Sample Bot that creates a SharePoint Site by calling Power Automate and using Microsoft Graph/SharePoint Rest APIs.",
7+
"url": "https://github.com/pnp/powerplatform-samples/tree/main/samples/sharepoint-site-creation-bot",
8+
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/powerplatform-samples/tree/main/samples/sharepoint-site-creation-bot",
9+
"longDescription": [
10+
"Sample Bot that creates a SharePoint Site by calling Power Automate and using Microsoft Graph/SharePoint Rest APIs."
11+
],
12+
"creationDateTime": "2022-07-16",
13+
"updateDateTime": "2025-07-10",
14+
"products": [
15+
"Power Automate",
16+
"Power Virtual Agents",
17+
"Power Platform",
18+
"PowerPlatform-samples"
19+
],
20+
"tags": [
21+
"SharePoint",
22+
"Site Creation",
23+
"Agent"
24+
],
25+
"categories": [
26+
"CLOUD-FLOW",
27+
"CHATBOT"
28+
],
29+
"metadata": [
30+
{
31+
"key": "POWERAPPS-EXPERIMENTAL",
32+
"value": "No"
33+
},
34+
{
35+
"key": "POWERAPPS-PREMIUM",
36+
"value": "Yes"
37+
},
38+
{
39+
"key": "POWERAPPS-ONPREM",
40+
"value": "No"
41+
},
42+
{
43+
"key": "POWERAPPS-CUSTOMCONNECTOR",
44+
"value": "No"
45+
}
46+
],
47+
"thumbnails": [
48+
{
49+
"type": "image",
50+
"order": 100,
51+
"url": "https://github.com/pnp/powerplatform-samples/raw/main/samples/sharepoint-site-creation-bot/assets/bot-create-site.png",
52+
"alt": "App preview"
53+
}
54+
],
55+
"authors": [
56+
{
57+
"gitHubAccount": "michelcarlo",
58+
"pictureUrl": "https://github.com/michelcarlo.png",
59+
"name": "Michel Mendes"
60+
}
61+
],
62+
"references": [
63+
{
64+
"name": "Microsoft Power Platform documentation",
65+
"description": "Discover how to make the most of Microsoft Power Platform products with online training courses, docs, and videos covering product capabilities and how-to guides.",
66+
"url": "https://learn.microsoft.com/power-platform/"
67+
}
68+
]
69+
}
70+
]
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<botcomponent_workflowset>
2+
<botcomponent_workflow botcomponentid.schemaname="cr3f8_sharePointSiteCreation.topic.CreateaSharePointSite" workflowid.workflowid="fe41089d-04cf-ec11-a7b5-6045bd8e353d">
3+
<iscustomizable>1</iscustomizable>
4+
</botcomponent_workflow>
5+
</botcomponent_workflowset>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" OrganizationVersion="9.2.25065.144" OrganizationSchemaType="Full" CRMServerServiceabilityVersion="9.2.25065.00146">
3+
<Entities />
4+
<Roles />
5+
<Workflows />
6+
<FieldSecurityProfiles />
7+
<Templates />
8+
<EntityMaps />
9+
<EntityRelationships />
10+
<OrganizationSettings />
11+
<optionsets />
12+
<CustomControls />
13+
<EntityDataProviders />
14+
<connectionreferences>
15+
<connectionreference connectionreferencelogicalname="m365pnp_sharedoffice365groups_b1cdb">
16+
<connectionreferencedisplayname>Office 365 Groups SharePointSiteCreationBot-b1cdb</connectionreferencedisplayname>
17+
<connectorid>/providers/Microsoft.PowerApps/apis/shared_office365groups</connectorid>
18+
<iscustomizable>1</iscustomizable>
19+
<promptingbehavior>0</promptingbehavior>
20+
<statecode>0</statecode>
21+
<statuscode>1</statuscode>
22+
</connectionreference>
23+
<connectionreference connectionreferencelogicalname="m365pnp_sharedoffice365users_c6163">
24+
<connectionreferencedisplayname>Office 365 Users SharePointSiteCreationBot-c6163</connectionreferencedisplayname>
25+
<connectorid>/providers/Microsoft.PowerApps/apis/shared_office365users</connectorid>
26+
<iscustomizable>1</iscustomizable>
27+
<promptingbehavior>0</promptingbehavior>
28+
<statecode>0</statecode>
29+
<statuscode>1</statuscode>
30+
</connectionreference>
31+
<connectionreference connectionreferencelogicalname="m365pnp_sharedsharepointonline_ffdb8">
32+
<connectionreferencedisplayname>SharePoint SharePointSiteCreationBot-ffdb8</connectionreferencedisplayname>
33+
<connectorid>/providers/Microsoft.PowerApps/apis/shared_sharepointonline</connectorid>
34+
<iscustomizable>1</iscustomizable>
35+
<promptingbehavior>0</promptingbehavior>
36+
<statecode>0</statecode>
37+
<statuscode>1</statuscode>
38+
</connectionreference>
39+
</connectionreferences>
40+
<Languages>
41+
<Language>1033</Language>
42+
</Languages>
43+
</ImportExportXml>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ImportExportXml version="9.2.25065.144" SolutionPackageVersion="9.2" languagecode="1033" generatedBy="CrmLive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" OrganizationVersion="9.2.25065.144" OrganizationSchemaType="Full" CRMServerServiceabilityVersion="9.2.25065.00146">
3+
<SolutionManifest>
4+
<UniqueName>SharePointSiteCreationBot</UniqueName>
5+
<LocalizedNames>
6+
<LocalizedName description="SharePoint Site Creation Bot" languagecode="1033" />
7+
</LocalizedNames>
8+
<Descriptions />
9+
<Version>2.0.0.0</Version>
10+
<Managed>0</Managed>
11+
<Publisher>
12+
<UniqueName>m365pnp</UniqueName>
13+
<LocalizedNames>
14+
<LocalizedName description="PnP Samples" languagecode="1033" />
15+
</LocalizedNames>
16+
<Descriptions />
17+
<EMailAddress xsi:nil="true"></EMailAddress>
18+
<SupportingWebsiteUrl xsi:nil="true"></SupportingWebsiteUrl>
19+
<CustomizationPrefix>m365pnp</CustomizationPrefix>
20+
<CustomizationOptionValuePrefix>71837</CustomizationOptionValuePrefix>
21+
<Addresses />
22+
</Publisher>
23+
<RootComponents>
24+
<RootComponent type="29" id="{fe41089d-04cf-ec11-a7b5-6045bd8e353d}" behavior="0" />
25+
</RootComponents>
26+
<MissingDependencies />
27+
</SolutionManifest>
28+
</ImportExportXml>

0 commit comments

Comments
 (0)