Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions samples/copy-list-item-from-quick-step/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Copy SharePoint List Item from Quick Step

## Summary

This sample provides a Power Automate flow that will copy a list item from one list in SharePoint Online to another, by matching internal column names and column types automatically.

This makes it extremely quick and easy to set up a Quick Step in a SharePoint list to copy a list item to another list with matching columns, with no need to struggle with difficult column types.

This flow was submitted as part of the [SharePoint Hackathon 2026](https://github.com/SharePoint/sharepoint-hackathon/issues/157).

**Features:**

* Easily set up the flow by simply selecting the target site and list in the trigger settings;
* Copies all columns where a matching column internal name and column type are found;
* Handles all column types that store values in the list (so no ratings column) including:
* Single and multi-select choice columns;
* Single and multi-select person columns;
* Date and DateTime columns, including adjusting UTC to the site's regional date settings;
* Hyperlink columns, including the display text;
* Location columns;
* Image columns;
* Single and multi-select managed metadata columns;
* Single and multi-select lookup columns;
* System columns (Created and Created By, Modified and Modified By); and
* Copies Attachments

![Flow overview](./assets/flow-overview.png "Flow overview")

## Applies to

![Power Automate](https://img.shields.io/badge/Power%20Automate-Yes-green "Yes")

## Compatibility

![Premium License](https://img.shields.io/badge/Premium%20License-Not%20Required-green.svg "Does not use Premium license")
![On-Premises Connectors](https://img.shields.io/badge/On--Premises%20Connectors-No-green.svg "Does not use on-premise connectors")
![Custom Connectors](https://img.shields.io/badge/Custom%20Connectors-Not%20Required-green.svg "Does not use custom connectors")

## Contributors

* [James Williams](https://github.com/wjamesw)

## Version history

Version|Date|Comments
-------|----|--------
1.0|April 12th, 2026|Initial release

## Prerequisites

### Connection References
The solution includes two connection references.
* SharePoint Online
* Microsoft Teams

### SharePoint Online Lists
You will need a source list and target list with matching columns, meaning each column you want to copy must have a matching:
* internal column name; and
* column type.

This is most easily achieved by creating a new target list using the source list as a template.

## Minimal Path to Awesome

### Import Solution

* [Download](./solution/copy-list-item-from-quick-step.zip) the `.zip` from the `solution` folder
* [Import](https://learn.microsoft.com/en-us/power-apps/maker/data-platform/import-update-export-solutions) the `.zip` file using **Solutions** > **Import Solution**.

### Using the source code

You can also use the [Power Apps CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli) to pack the source code by following these steps:

* Clone the repository to a local drive
* Pack the source files back into a solution `.zip` file:

```bash
pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder
```

Making sure to replace `pathtosourcefolder` to point to the path to this sample's `sourcecode` folder, and `pathtodestinationfile` to point to the path of this solution's `.zip` file (located under the `solution` folder)
* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.

### Configure the flow and quick step
Once you have imported the solution, edit the flow called "Copy List Item from Quick Step" so that the trigger has the correct Site Address and List Name for your TARGET list. This means the list to which list items will be copied.

Save the flow then go back to the flow details page and select "Edit" next to "Run-only user". Click "SharePoint" then pick the same Site and List as you added to the trigger of the flow (the TARGET list again), then click "Add". Leave both "Connections Used" set to "Provided by run-only user" and click "Save".

Then click "Export" then "Get flow identifier" and click the copy icon to copy the flow identifier to the clipboard.

In your SOURCE list (the one you want to copy items from) [add a Quick Step](https://support.microsoft.com/en-us/office/create-a-quick-step-for-your-list-or-library-b37c2c7f-2ae1-49f9-b4b0-a8d501f5f99e) for selected items of type "Execute a flow" (or add a Quick Step to a Quick Step column) and paste in the flow identifier into "Flow ID". Also add at least a Quick step name.

These configuration steps can be seen in the YouTube video accompanying the SharePoint Hackathon 2026 submission which included this flow: [Click here to view the video.](https://youtu.be/ovTHV4MxAc8?si=hlEiQT_H3ku6QbaV&t=399)

The above video also shows how the flow can be copied easily for use with another list. The actions are also contained in a single scope for easy copying to another flow.

### Trigger the flow using the quick step
Running the quick step will trigger the flow which will cause the list item to be copied to the target list. If the list item is not copied successfully, then an error notification will be received by the copying user in Microsoft Teams.

## Features

This sample illustrates the following concepts:

* Use of the SharePoint REST api
* Use of [SharePoint REST operations via the Microsoft Graph REST API](https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph)
* Use of complex and nested expressions
* Reusablility
* Use of XML & XPATH for complex automation
* Error handling

## Help

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.

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=copy-list-item-from-quick-step&authors=@wjamesw&title=copy-list-item-from-quick-step%20-%20).

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=copy-list-item-from-quick-step&authors=@wjamesw&title=copy-list-item-from-quick-step%20-%20).

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=copy-list-item-from-quick-step&authors=@wjamesw&title=copy-list-item-from-quick-step%20-%20).

## Disclaimer

**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.**

<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/copy-list-item-from-quick-step" aria-hidden="true" />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# msbuild output directories
/bin
/obj

# MSBuild Binary and Structured Log
*.binlog
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
</PropertyGroup>

<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.props')" />

<PropertyGroup>
<ProjectGuid>29a2ca0e-94da-490a-aac8-92642b318a32</ProjectGuid>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<!--Remove TargetFramework when this is available in 16.1-->
<TargetFramework>net462</TargetFramework>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<SolutionRootPath>src</SolutionRootPath>
</PropertyGroup>

<!--
Solution Packager overrides, un-comment to use: SolutionPackagerType (Managed, Unmanaged, Both)
Solution Localization Control, if you want to enabled localization of your solution, un-comment SolutionPackageEnableLocalization and set the value to true. - Requires use of -loc flag on Solution Clone or Sync
-->
<!--
<PropertyGroup>
<SolutionPackageType>Managed</SolutionPackageType>
<SolutionPackageEnableLocalization>false</SolutionPackageEnableLocalization>
</PropertyGroup>
-->

<ItemGroup>
<PackageReference Include="Microsoft.PowerApps.MSBuild.Solution" Version="1.*" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\.gitignore" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\bin\**" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\obj\**" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.cdsproj" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.cdsproj.user" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.sln" />
</ItemGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\**" Exclude="@(ExcludeDirectories)" />
<Content Include="$(SolutionPackageZipFilePath)">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets')" />

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" OrganizationVersion="9.2.26032.168" OrganizationSchemaType="Standard" CRMServerServiceabilityVersion="9.2.26032.00168">
<Entities />
<Roles />
<Workflows />
<FieldSecurityProfiles />
<Templates />
<EntityMaps />
<EntityRelationships />
<OrganizationSettings />
<optionsets />
<CustomControls />
<EntityDataProviders />
<connectionreferences>
<connectionreference connectionreferencelogicalname="wjw_sharedsharepointonline_c41d4">
<connectionreferencedisplayname>SharePoint - Copy List Item From Quick Step</connectionreferencedisplayname>
<connectorid>/providers/Microsoft.PowerApps/apis/shared_sharepointonline</connectorid>
<iscustomizable>1</iscustomizable>
<promptingbehavior>0</promptingbehavior>
<statecode>0</statecode>
<statuscode>1</statuscode>
</connectionreference>
<connectionreference connectionreferencelogicalname="wjw_sharedteams_05c52">
<connectionreferencedisplayname>Microsoft Teams - Copy List Item From Quick Step</connectionreferencedisplayname>
<connectorid>/providers/Microsoft.PowerApps/apis/shared_teams</connectorid>
<iscustomizable>1</iscustomizable>
<promptingbehavior>0</promptingbehavior>
<statecode>0</statecode>
<statuscode>1</statuscode>
</connectionreference>
</connectionreferences>
<Languages>
<Language>1033</Language>
</Languages>
</ImportExportXml>
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<ImportExportXml version="9.2.26032.168" SolutionPackageVersion="9.2" languagecode="1033" generatedBy="CrmLive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" OrganizationVersion="9.2.26032.168" OrganizationSchemaType="Standard" CRMServerServiceabilityVersion="9.2.26032.00168">
<SolutionManifest>
<UniqueName>CopyListItemFromQuickStep</UniqueName>
<LocalizedNames>
<LocalizedName description="Copy List Item From Quick Step" languagecode="1033" />
</LocalizedNames>
<Descriptions />
<Version>1.0.0.0</Version>
<Managed>2</Managed>
<Publisher>
<UniqueName>JamesWilliams</UniqueName>
<LocalizedNames>
<LocalizedName description="James Williams" languagecode="1033" />
</LocalizedNames>
<Descriptions>
<Description description="James Williams" languagecode="1033" />
</Descriptions>
<EMailAddress xsi:nil="true"></EMailAddress>
<SupportingWebsiteUrl xsi:nil="true"></SupportingWebsiteUrl>
<CustomizationPrefix>wjw</CustomizationPrefix>
<CustomizationOptionValuePrefix>65195</CustomizationOptionValuePrefix>
<Addresses>
<Address>
<AddressNumber>1</AddressNumber>
<AddressTypeCode>1</AddressTypeCode>
<City xsi:nil="true"></City>
<County xsi:nil="true"></County>
<Country xsi:nil="true"></Country>
<Fax xsi:nil="true"></Fax>
<FreightTermsCode xsi:nil="true"></FreightTermsCode>
<ImportSequenceNumber xsi:nil="true"></ImportSequenceNumber>
<Latitude xsi:nil="true"></Latitude>
<Line1 xsi:nil="true"></Line1>
<Line2 xsi:nil="true"></Line2>
<Line3 xsi:nil="true"></Line3>
<Longitude xsi:nil="true"></Longitude>
<Name xsi:nil="true"></Name>
<PostalCode xsi:nil="true"></PostalCode>
<PostOfficeBox xsi:nil="true"></PostOfficeBox>
<PrimaryContactName xsi:nil="true"></PrimaryContactName>
<ShippingMethodCode>1</ShippingMethodCode>
<StateOrProvince xsi:nil="true"></StateOrProvince>
<Telephone1 xsi:nil="true"></Telephone1>
<Telephone2 xsi:nil="true"></Telephone2>
<Telephone3 xsi:nil="true"></Telephone3>
<TimeZoneRuleVersionNumber xsi:nil="true"></TimeZoneRuleVersionNumber>
<UPSZone xsi:nil="true"></UPSZone>
<UTCOffset xsi:nil="true"></UTCOffset>
<UTCConversionTimeZoneCode xsi:nil="true"></UTCConversionTimeZoneCode>
</Address>
<Address>
<AddressNumber>2</AddressNumber>
<AddressTypeCode>1</AddressTypeCode>
<City xsi:nil="true"></City>
<County xsi:nil="true"></County>
<Country xsi:nil="true"></Country>
<Fax xsi:nil="true"></Fax>
<FreightTermsCode xsi:nil="true"></FreightTermsCode>
<ImportSequenceNumber xsi:nil="true"></ImportSequenceNumber>
<Latitude xsi:nil="true"></Latitude>
<Line1 xsi:nil="true"></Line1>
<Line2 xsi:nil="true"></Line2>
<Line3 xsi:nil="true"></Line3>
<Longitude xsi:nil="true"></Longitude>
<Name xsi:nil="true"></Name>
<PostalCode xsi:nil="true"></PostalCode>
<PostOfficeBox xsi:nil="true"></PostOfficeBox>
<PrimaryContactName xsi:nil="true"></PrimaryContactName>
<ShippingMethodCode>1</ShippingMethodCode>
<StateOrProvince xsi:nil="true"></StateOrProvince>
<Telephone1 xsi:nil="true"></Telephone1>
<Telephone2 xsi:nil="true"></Telephone2>
<Telephone3 xsi:nil="true"></Telephone3>
<TimeZoneRuleVersionNumber xsi:nil="true"></TimeZoneRuleVersionNumber>
<UPSZone xsi:nil="true"></UPSZone>
<UTCOffset xsi:nil="true"></UTCOffset>
<UTCConversionTimeZoneCode xsi:nil="true"></UTCConversionTimeZoneCode>
</Address>
</Addresses>
</Publisher>
<RootComponents>
<RootComponent type="29" id="{7ad2bc5d-8e2e-f111-88b4-6045bd0dd356}" behavior="0" />
</RootComponents>
<MissingDependencies />
</SolutionManifest>
</ImportExportXml>
Loading
Loading