web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Can Copilot Agent Crea...
Copilot Studio
Suggested Answer

Can Copilot Agent Create SharePoint Site & Lists from Excel Schema Dynamically?

(1) ShareShare
ReportReport
Posted on by 6

Hello Community,

We are building a solution using Copilot Studio + Power Automate where an agent already handles BRD documents from Teams meetings, approval workflows, and project folder creation.

Now we want to automate SharePoint site and list creation based on an Excel schema file stored in SharePoint, where Excel defines:

  • Site details

  • List names

  • Column names and data type.

We are exploring two options:

  1. Use Copilot Agent to read Excel schema and generate a PnP PowerShell script for site and list provisioning.

  2. Use Copilot Agent + Power Automate directly to create site, lists, and columns dynamically from Excel.

My questions:

  • Is Copilot Studio capable of generating and executing such PowerShell dynamically?

  • Can Power Automate handle complex list schemas reliably (lookup, choice, required fields)?

  • What is the recommended architecture for schema-driven SharePoint provisioning using Copilot.

Any guidance or best practices would be appreciated. Thanks!

Screenshot 2026-01-07 102800.png
Screenshot 2026-01-07 102939.png
Screenshot 2026-01-07 102909.png
Categories:
I have the same question (2)
  • Suggested answer
    Valantis Profile Picture
    2,881 on at

    here is a Quick Answers to your questions with what i have found:

    1. Can Copilot Studio generate and execute PowerShell?

    • Generate: Yes

    • Execute: No, not directly.
    • Use Power Automate with Azure Automation runbooks or Power Automate Desktop.

    •  

    2. Can Power Automate handle complex SharePoint schemas (lookups, choice fields, etc.)?

    Yes, but use Site Scripts/Site Templates or Microsoft Graph list columns API for complex fields. The standard SharePoint connector won't cover everything—use "Send an HTTP request to SharePoint" or Graph when needed.

    3. Recommended architecture for Excel-driven provisioning?


    • Copilot Studio agent collects Excel schema URL + site info → calls Power Automate flow

    • Flow reads Excel (enable pagination), creates site, provisions lists/fields via Site Scripts or Graph

    • For PnP PowerShell, trigger an Azure Automation runbook

    UI note: Add flows under "Tools" in new Copilot Studio (or "Call an action" in classic PVA).

    Resources that might help you:

  • MP-06011237-0 Profile Picture
    6 on at

    Question: End-to-End SharePoint Provisioning via Copilot Studio Using Excel Schema and PnP PowerShell

    I want to know if it is possible to build a Copilot Studio agent that can perform the following end-to-end automation:

     What the agent should do

    1. Read an Excel file stored in SharePoint (user provides the file URL)
    2. Parse the schema from the file, including:
      • Site details
      • List names
      • Column names and types
      • Permission groups and role assignments
    3. Generate a complete PnP PowerShell script dynamically based on that schema
    4. Execute the script automatically to:
      • Create a SharePoint site
      • Create lists and columns
      • Create and assign permission groups and permissions

     Key requirements

    • No hardcoded structure — everything must come from the Excel file
    • Excel is the single source of truth
    • Both script generation and execution are triggered from the Copilot agent

      (optionally via Power Automate)

     Questions

    1. Is this end-to-end automation possible using Copilot Studio alone, or does it require:
      • Power Automate, plus
      • Azure Automation Runbooks / Hybrid Worker / Azure Functions / VM, or similar services to execute PnP PowerShell?
    2. What is the recommended and secure architecture for running PnP PowerShell from a Copilot-triggered workflow?
    3. Are there any official Microsoft docs, blogs, or step-by-step guides covering:
      • Copilot Studio → Power Automate → PowerShell execution patterns
      • Secure authentication methods for PnP PowerShell (App-only, Managed Identity, etc.)
      • Schema-driven SharePoint provisioning from Excel or files
    4. What are the current limitations of this approach, for example:
      • Copilot Studio limitations in executing scripts or long-running jobs
      • Power Automate limits (timeouts, file size, Excel parsing, throttling)
      • Authentication and permission constraints
      • Governance and security considerations
      • Scalability and error-handling challenges

    Any reference architectures, examples, best practices, or known limitations would be greatly appreciated.

  • Suggested answer
    Valantis Profile Picture
    2,881 on at
     
    Sorry for the late answer i missed your reply.
     
    Copilot can help write but not run the power shell scripts and also not complex Excel binaries.
    For this you have to use a Copilot / Power Automate / Azure Automation architecture.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 619

#2
chiaraalina Profile Picture

chiaraalina 163 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 147

Last 30 days Overall leaderboard