The first uses variables and an array of column names and loops through the creation of the columns: https://www.alanps1.io/power-platform/flow/flow-create-sharepoint-list-text-fields-using-rest-api-wi...
The second provides option on how to do a myriad REST options which I used to tweet the Creation flow above to delete multiple columns:
http://www.ludovicperrichon.com/sharepoint-rest-api-call-with-powerautomate/#removelistfields
This page gives examples on many other useful REST API options too.
This being said, for some reason, neither with the create or update flows work in setting the Default Value on the Yes/No columns. in my array. Here is the information for both:
1. Create Flow:
Headers:
{
"Content-Type": "application/json;odata=verbose",
"Accept": "application/json;odata=verbose"
}
Body:
{
"__metadata": {
"type": "SP.FieldText"
},
"FieldTypeKind": 8,
"Title": "@{items('Apply_to_each_Create_Each_New_Column_String')}",
"Required": "false",
"EnforceUniqueValues": "false",
"DefaultValue": "No",
"StaticName": "@{items('Apply_to_each_Create_Each_New_Column_String')}"
}
2. Update Flow:
Header:
{
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
}
Body:
{
'__metadata': {
'type': 'SP.FieldMultiLineText'
},
'DefaultValue': 'No'
}
Any help would be appreciated.