cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Create a new column in SharePoint list from Flow

Hello all,

 

So I have pre-existing lists that I would like to automate the process of creating a new column on. Can you automate this process with Microsoft Flow?

 

More Details:

I have about thirty lists that I would like to not have to manually go into and create two new columns, as mulitple sources will continue to create more lists overtime. The photo attached shows the two columns I create highlighted in red ink.screenshot.PNGScreenshot of Columns

All help is appreciated!

 

Update: This link provides great examples for accomplishing this type of thing https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/dn6001...

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Create a new column in SharePoint list from Flow

Hi @Anonymous ,

 

Yes need to include the JSON request. Please see below. Here I am creating a new text column called 'Country' with field length 25 under the list called 'aj'.

 

sp2.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

4 REPLIES 4
Super User
Super User

Re: Create a new column in SharePoint list from Flow

Hi @Anonymous 

 

Creating a column in a sharepoint list is not supported as a direct action in flow currently. What you can do is, to create the two columns in every list in your sharepoint site, you can invoke the rest api using the "send an http request" to sharepoint action and create those columns. Here is an example of how you can invoke the rest api to create a column:

https://www.c-sharpcorner.com/article/how-to-create-column-in-a-list-using-rest-api-in-sharepoint/

More on SharePoint rest api options: 

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints

 

The flow configuration can be: Manual button trigger -> Get Lists from Sharepoint Action -> Apply to each on the List returned -> send an http request to sharepoint.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Anonymous
Not applicable

Re: Create a new column in SharePoint list from Flow

So, I can include non-JSON code into the body of a "Send Https request to Sharepoint" and populate the list with the two newly created columns (ex. pulling code from the link's example)? Or, are you saying I need to use the request to call an outside SharePoint Custom Add-in that is created similar to this: https://www.c-sharpcorner.com/article/how-to-create-column-in-a-list-using-rest-api-in-sharepoint/ to achieve the creation of columns?

 

@yashag2255 

Super User
Super User

Re: Create a new column in SharePoint list from Flow

Hi @Anonymous ,

 

Yes need to include the JSON request. Please see below. Here I am creating a new text column called 'Country' with field length 25 under the list called 'aj'.

 

sp2.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

Super User
Super User

Re: Create a new column in SharePoint list from Flow

Hi @Anonymous 

 

You can refer to @abm 's suggestion for the send an HTTP request to sharepoint action. You can variabalise the column names / use the dynamic selector if you want to extract those from elsewhere.  

 

You can get more details on the column types and sending http request to invoke the SharePoint REST API from the URL's that I have shared earlier. 

 

More on column types etc. here: 

https://support.office.com/en-gb/article/list-and-library-column-types-and-options-0d8ddb7b-7dc7-414d-a283-ee9dca891df7

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 189 members 4,708 guests
Please welcome our newest community members: