はじめに
SharePointリストのテナント間移行を行いたい人なんて少数かもしれませんが、この記事では以下のやり方も纏めてあります。
- Power Automateを用いて特定のSPOリストからフィールド情報を取得する
- Power Automateを用いてリストを作成する
- Power Automateを用いて特定のリストにフィールドを追加する
- Power Automateのアクションをコピペする(おまけ)
PnPとか使ってスクリプト書く方法もありますが、テナントによっては管理者に許可されていない場合もありますからね。
ざっくり構成
こんな感じで
- Tenant A(移行元)でリストのフィールド情報をPower Automateを利用して取得
- Tenant B(移行先)のPower Automateに 1. で取得した情報を設定
- Tenant Bにリストを作成
を行います。
手順2は手動ですね。
フローを作成する
リストの情報を取得する
フローの全体イメージはこんな感じです。
こちらは移行元のテナント(Tenant A)で作成して実行します。
アクションを順にみていきましょう。
リストが存在するサイトのアドレスでは取得したいリストが存在するアドレスのリンクを設定します。
リスト名では取得したいリストの表示名を設定します。
SharePoint に HTTP 要求を送信しますで上記変数で設定した情報をもとにリストのフィールドを取得します。
今回の設定では、デフォルトフィールドは取得しないように省いています。
ユーザが作成したフィールドだけが欲しいですからね。
もしすべてのフィールドを取得したければ、filter
を外してください。
このアクションの出力結果として、以下のようなbodyが取得できます。
欲しいのはd.results
なので、結果を加工して作成に格納します。
この結果は配列で取得されるのでarray関数を利用しています。
array(body('SharePoint_に_HTTP_要求を送信します')?['d']?['results'])
これで対象リストのフィールド情報が取得できました。
「作成」で得られた出力はこの後使いますので控えておいてください。
リストを作成してフィールドを作成する
フローの全体イメージはこんな感じです。
こちらは移行先のテナント(Tenant B)で作成して実行します。
まずはリスト作成に必要な情報だけみていきましょう。
リストを作成するサイトのアドレスにはリストを作成したいサイトのアドレスを設定します。
リスト名には作成したいリストの内部名(表示名にも利用します)を設定します。
残り二つの変数は、フィールド作成の時に利用するものですので、後述します。
SharePoint に HTTP 要求を送信します(リストの作成)で先ほど設定した2つの変数をもとにリストを作成します。
説明を変えたい場合は、"Description"を変更してください。
リストを作成している箇所は以上です。
続いて先ほど作成したリストに先ほど取得したフィールド情報をもとにフィールドを作成していきます。
ListFieldObjに先ほど移行元で取得したフィールド情報をコピペします。
booleanは条件分岐のtrue
or false
の判定に利用したいだけですので、true
とだけ設定しておきます。
続いてリストのフィールド作成を実行していくわけですが、フィールド作成は1フィールドずつしか行えません(多分。知らんけど。)
試しにArray情報を渡してみたらObject情報を渡せ。とのエラーで怒られました。
よって先ほど設定したArray変数からObject単位で情報を取得してアクションを実行していこうと思います。
これを実現するためにApply to eachを利用しています。
まず最初のJSON の解析ではApply to eachのitems()
つまり、1フィールドの情報に対して解析を行っています。
ここは、フィールドの型などによってサンプルから生成したスキーマが異なり、そのまま利用するとエラーになってしまうので、地味にめんどくさかったですね。
続いて、JSON の解析(metadata)では__metadata
の内容のうちtype
だけが欲しかったので、解析を行っています。
'body('JSON_の解析')?['__metadata']?['type']
でもよかったかもですね。(試してはないです)
いよいよフィールドの作成を行っていくのですが、フィールドの型が選択肢か否か。でPOSTする際のBodyが変わってきます。
今ブログを書いているときに思いましたが、型がSP.FieldChoice
どうか?で判断すればよかったかな?とは思いましたが、今回作成したフローでは選択肢が設定されているかどうか?で判断しています。
empty(body('JSON_の解析')?['Choices'])
選択肢が空であれば、Choicesを利用しません。
まずがChoicesを利用しない(Bodyに設定しない)パターンです。
SharePoint に HTTP 要求を送信します(フィールドの作成)では選択肢を作成しない場合のフィールドの作成を行っています。
リストは先ほど作成したリストを指定しています。
続いてChoicesを利用する(Bodyに設定する)パターンです。
Choiceで得られた結果は以下のようになっています。
"Choices": { "__metadata": { "type": "Collection(Edm.String)" }, "results": [ "選択肢1", "選択肢2", "選択肢3" ] }
このうち欲しいのはresults
の結果ですので、JSON の解析(Choices)で抜け出せるようにしてあげます。
SharePoint に HTTP 要求を送信します(フィールドの作成(Choicesあり))では選択肢を作成する場合のフィールドの作成を行っています。
選択肢には先ほどの解析で得られた選択肢を設定します。
リストは先ほど作成したリストを指定しています。
以上でTenant A(移行元)からTenant B(移行先)へSPOリストを移行させる仕組みを作成することができました。
とはいえ色々な型やフィールドの設定などは未検証なため正しく動かない部分があるかもです。
もしそのような場合は、どのようなフィールド設定がエラーとなったか?エラー内容はどのようなものか?を教えていただけると助かります。
フローコピペ用コード
リスト情報を取得する
リストが存在するサイトのアドレス
{ "id": "04945a9e-c1e1-4375-b190-cbe4adf3fbea", "brandColor": "#770BD6", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "connectorDisplayName": "変数", "icon": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiBmaWxsPSIjNzcwQkQ2Ii8+DQogPGcgZmlsbD0iI2ZmZiI+DQogIDxwYXRoIGQ9Ik02Ljc2MywxMy42ODV2LTMuMjA4QzYuNzYzLDguNzQ4LDcuNzYyLDgsMTAsOHYxLjA3Yy0xLDAtMiwwLjMyNS0yLDEuNDA3djMuMTg4ICAgIEM4LDE0LjgzNiw2LjUxMiwxNiw1LjUxMiwxNkM2LjUxMiwxNiw4LDE3LjE2NCw4LDE4LjMzNVYyMS41YzAsMS4wODIsMSwxLjQyOSwyLDEuNDI5VjI0Yy0yLjIzOCwwLTMuMjM4LTAuNzcyLTMuMjM4LTIuNXYtMy4xNjUgICAgYzAtMS4xNDktMC44OTMtMS41MjktMS43NjMtMS41ODV2LTEuNUM1Ljg3LDE1LjE5NCw2Ljc2MywxNC44MzQsNi43NjMsMTMuNjg1eiIvPg0KICA8cGF0aCBkPSJtMjUuMjM4IDEzLjY4NXYtMy4yMDhjMC0xLjcyOS0xLTIuNDc3LTMu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yIDAuOTM1LTAuODc1IDAuMTQ2IDAuMDk0IDAuMjE5IDAuMTkgMC4yMTkgMC4yODkgMCAwLjI2MS0wLjIwOCAwLjU3My0wLjYyNSAwLjkzOHMtMC43NzYgMC41NDctMS4wNzggMC41NDdjLTAuNjA0IDAtMS4yMjEtMC44NTItMS44NTEtMi41NTVsLTAuMjE5LTAuNTc4LTAuMjI3IDAuMzk4Yy0xLjA2MiAxLjgyMy0yLjA3OCAyLjczNC0zLjA0NyAyLjczNC0wLjM2NSAwLTAuNjc1LTAuMDkxLTAuOTMtMC4yNzFsMC45MDYtMC44ODVjMC4xNTYgMC4xNTYgMC4zMzggMC4yMzQgMC41NDcgMC4yMzQgMC41ODggMCAxLjI1LTAuNTk2IDEuOTg0LTEuNzg2bDAuNDA2LTAuNjU4IDAuMTU1LTAuMjU5eiIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgNS40OTI1IDMyLjI0NSkiIGN4PSIxOS43NTciIGN5PSIxMy4yMjUiIHJ4PSIuNzc4IiByeT0iLjc3OCIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgLTcuNTgzOSAzMC42MjkpIiBjeD0iMTIuMzY2IiBjeT0iMTkuMzE1IiByeD0iLjc3OCIgcnk9Ii43NzgiLz4NCiA8L2c+DQo8L3N2Zz4NCg==", "isTrigger": false, "operationName": "リストが存在するサイトのアドレス", "operationDefinition": { "type": "InitializeVariable", "inputs": { "variables": [ { "name": "SiteAddress", "type": "string", "value": "https://XXX.sharepoint.com/sites/YYY" } ] }, "runAfter": {}, "metadata": { "operationMetadataId": "de6adfc1-a827-4f2f-aed1-ba7487da3f17" } } }
リスト名
{ "id": "2e0dee36-b190-4bb8-82f9-288d81377764", "brandColor": "#770BD6", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.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3IDAuMzk4Yy0xLjA2MiAxLjgyMy0yLjA3OCAyLjczNC0zLjA0NyAyLjczNC0wLjM2NSAwLTAuNjc1LTAuMDkxLTAuOTMtMC4yNzFsMC45MDYtMC44ODVjMC4xNTYgMC4xNTYgMC4zMzggMC4yMzQgMC41NDcgMC4yMzQgMC41ODggMCAxLjI1LTAuNTk2IDEuOTg0LTEuNzg2bDAuNDA2LTAuNjU4IDAuMTU1LTAuMjU5eiIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgNS40OTI1IDMyLjI0NSkiIGN4PSIxOS43NTciIGN5PSIxMy4yMjUiIHJ4PSIuNzc4IiByeT0iLjc3OCIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgLTcuNTgzOSAzMC42MjkpIiBjeD0iMTIuMzY2IiBjeT0iMTkuMzE1IiByeD0iLjc3OCIgcnk9Ii43NzgiLz4NCiA8L2c+DQo8L3N2Zz4NCg==", "isTrigger": false, "operationName": "リスト名", "operationDefinition": { "type": "InitializeVariable", "inputs": { "variables": [ { "name": "ListName", "type": "string", "value": "ListName" } ] }, "runAfter": { "リストが存在するサイトのアドレス": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "f6bcab8b-4d47-4660-98f9-d932ab1cec8e" } } }
SharePoint に HTTP 要求を送信します
{ "id": "666570f4-b0d4-48ae-848c-2648e3e2cd85", "brandColor": "#036C70", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "connectorDisplayName": "SharePoint", "icon": "https://connectoricons-prod.azureedge.net/releases/v1.0.1568/1.0.1568.2757/sharepointonline/icon.png", "isTrigger": false, "operationName": "SharePoint_に_HTTP_要求を送信します", "operationDefinition": { "type": "OpenApiConnection", "inputs": { "host": { "connectionName": "shared_sharepointonline_1", "operationId": "HttpRequest", "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline" }, "parameters": { "dataset": "@variables('SiteAddress')", "parameters/method": "GET", "parameters/uri": "_api/web/lists/getbytitle('@{variables('ListName')}')/fields?$filter=Hidden eq false and ReadOnlyField eq false and CanBeDeleted eq true", "parameters/headers": { "Accept": "application/json;odata=verbose", "Content-Type": "application/json;odata=verbose" } }, "authentication": { "type": "Raw", "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']" } }, "runAfter": { "リスト名": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "41d344f7-5ea4-4a34-8fb7-bf281dfdef85" } } }
作成
{ "id": "49271b86-3284-402a-ac30-f2eb3873776f", "brandColor": "#8C6CFF", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "icon": "https://psuxjapan.azureedge.net/Content/Images/DesignerOperations/dataoperationedit.png", "isTrigger": false, "operationName": "作成", "operationDefinition": { "type": "Compose", "inputs": "@array(body('SharePoint_に_HTTP_要求を送信します')?['d']?['results'])", "runAfter": { "SharePoint_に_HTTP_要求を送信します": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "266f4ee5-237f-425f-a446-daba9e50a38a" } } }
リストを作成してフィールドを作成する
リストを作成するサイトのアドレス
{ "id": "9b6b4c29-ddd9-4f25-a04e-2fa51423f82d", "brandColor": "#770BD6", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "connectorDisplayName": "変数", "icon": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4IiBlbmFibGUtYmF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MC4yMzQgMC41ODggMCAxLjI1LTAuNTk2IDEuOTg0LTEuNzg2bDAuNDA2LTAuNjU4IDAuMTU1LTAuMjU5eiIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgNS40OTI1IDMyLjI0NSkiIGN4PSIxOS43NTciIGN5PSIxMy4yMjUiIHJ4PSIuNzc4IiByeT0iLjc3OCIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgLTcuNTgzOSAzMC42MjkpIiBjeD0iMTIuMzY2IiBjeT0iMTkuMzE1IiByeD0iLjc3OCIgcnk9Ii43NzgiLz4NCiA8L2c+DQo8L3N2Zz4NCg==", "isTrigger": false, "operationName": "リストを作成するサイトのアドレス", "operationDefinition": { "type": "InitializeVariable", "inputs": { "variables": [ { "name": "SiteAddress", "type": "string", "value": "https://XXX.sharepoint.com/sites/YYY" } ] }, "runAfter": {}, "metadata": { "operationMetadataId": "de6adfc1-a827-4f2f-aed1-ba7487da3f17" } } }
リスト名
{ "id": "8fa4a866-ff82-49e5-b2e0-3a5ac073cee7", "brandColor": "#770BD6", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "connectorDisplayName": "変数", "icon": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiBmaWxsPSIjNzcwQkQ2Ii8+DQ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N5PSIxMy4yMjUiIHJ4PSIuNzc4IiByeT0iLjc3OCIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgLTcuNTgzOSAzMC42MjkpIiBjeD0iMTIuMzY2IiBjeT0iMTkuMzE1IiByeD0iLjc3OCIgcnk9Ii43NzgiLz4NCiA8L2c+DQo8L3N2Zz4NCg==", "isTrigger": false, "operationName": "リスト名", "operationDefinition": { "type": "InitializeVariable", "inputs": { "variables": [ { "name": "ListName", "type": "string", "value": "mySampleList" } ] }, "runAfter": { "リストを作成するサイトのアドレス": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "fb257829-c7f5-4417-bd7a-6bd4c38c7016" } } }
ListFieldObj
{ "id": "00f180d2-262d-46aa-8d30-f03dd794a092", "brandColor": "#770BD6", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "connectorDisplayName": "変数", "icon": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiBmaWxsPSIjNzcwQkQ2Ii8+DQogPGcgZmlsbD0iI2ZmZiI+DQogIDxwYXRoIGQ9Ik02Ljc2MywxMy42ODV2LTMuMjA4QzYuNzYzLDguNzQ4LDcuNzYyLDgsMTAsOHYxLjA3Yy0xLDAtMiwwLjMyNS0yLDEuNDA3djMuMTg4ICAgIEM4LDE0LjgzNiw2LjUxMiwxNiw1LjUxMiwxNkM2LjUxMiwxNi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Lz4NCiA8L2c+DQo8L3N2Zz4NCg==", "isTrigger": false, "operationName": "ListFieldObj", "operationDefinition": { "type": "InitializeVariable", "inputs": { "variables": [ { "name": "ListFieldObj", "type": "array", "value": [ {} ] } ] }, "runAfter": { "リスト名": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "4fd24257-a7ef-4ebd-8cd8-8cefb537274d" } } }
boolean
{ "id": "3635ef17-d98e-4b3c-9d15-92185a0cd3ae", "brandColor": "#770BD6", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "connectorDisplayName": "変数", "icon": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiBmaWxsPSIjNzcwQkQ2Ii8+DQogPGcgZmlsbD0iI2ZmZiI+DQogIDxwYXRoIGQ9Ik02Ljc2MywxMy42ODV2LTMuMjA4QzYuNzYzLDguNzQ4LDcuNzYyLDgsMTAsOHYxLjA3Yy0xLDAtMiwwLjMyNS0yLDEuNDA3djMuMTg4ICAgIEM4LDE0LjgzNiw2LjUxMiwxNiw1LjUxMiwxNkM2LjUxMiwxNiw4LDE3LjE2NCw4LDE4LjMzNVYyMS41YzAsMS4wODIsMSwxLjQyOSwyLDEuNDI5VjI0Yy0yLjIzOCwwLTMuMjM4LTAuNzcyLTMuMjM4LTIuNXYtMy4xNjUgICAgYzAtMS4xNDktMC44OTMtMS41MjktMS43NjMtMS41ODV2LTEuNUM1Ljg3LDE1LjE5NCw2Ljc2MywxNC44MzQs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I3IDAuMzc5IDAuMTc5IDAuNDhjMC42ODQgMS44OTEgMS4yNDkgMi44MzYgMS42OTQgMi44MzYgMC40MDggMCAwLjcyLTAuMjkyIDAuOTM1LTAuODc1IDAuMTQ2IDAuMDk0IDAuMjE5IDAuMTkgMC4yMTkgMC4yODkgMCAwLjI2MS0wLjIwOCAwLjU3My0wLjYyNSAwLjkzOHMtMC43NzYgMC41NDctMS4wNzggMC41NDdjLTAuNjA0IDAtMS4yMjEtMC44NTItMS44NTEtMi41NTVsLTAuMjE5LTAuNTc4LTAuMjI3IDAuMzk4Yy0xLjA2MiAxLjgyMy0yLjA3OCAyLjczNC0zLjA0NyAyLjczNC0wLjM2NSAwLTAuNjc1LTAuMDkxLTAuOTMtMC4yNzFsMC45MDYtMC44ODVjMC4xNTYgMC4xNTYgMC4zMzggMC4yMzQgMC41NDcgMC4yMzQgMC41ODggMCAxLjI1LTAuNTk2IDEuOTg0LTEuNzg2bDAuNDA2LTAuNjU4IDAuMTU1LTAuMjU5eiIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgNS40OTI1IDMyLjI0NSkiIGN4PSIxOS43NTciIGN5PSIxMy4yMjUiIHJ4PSIuNzc4IiByeT0iLjc3OCIvPg0KICA8ZWxsaXBzZSB0cmFuc2Zvcm09Im1hdHJpeCguMDUzNiAtLjk5ODYgLjk5ODYgLjA1MzYgLTcuNTgzOSAzMC42MjkpIiBjeD0iMTIuMzY2IiBjeT0iMTkuMzE1IiByeD0iLjc3OCIgcnk9Ii43NzgiLz4NCiA8L2c+DQo8L3N2Zz4NCg==", "isTrigger": false, "operationName": "boolean", "operationDefinition": { "type": "InitializeVariable", "inputs": { "variables": [ { "name": "boolean", "type": "boolean", "value": true } ] }, "runAfter": { "ListFieldObj": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "c94aae38-b20d-4db1-9479-03208c3bb42f" } } }
SharePoint に HTTP 要求を送信します(リストの作成)
{ "id": "8b88bc95-fb91-4a7e-aa68-91af7aa6005f", "brandColor": "#036C70", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "connectorDisplayName": "SharePoint", "icon": "https://connectoricons-prod.azureedge.net/releases/v1.0.1568/1.0.1568.2757/sharepointonline/icon.png", "isTrigger": false, "operationName": "SharePoint_に_HTTP_要求を送信します(リストの作成)", "operationDefinition": { "type": "OpenApiConnection", "inputs": { "host": { "connectionName": "shared_sharepointonline_1", "operationId": "HttpRequest", "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline" }, "parameters": { "dataset": "@variables('SiteAddress')", "parameters/method": "POST", "parameters/uri": "_api/web/lists", "parameters/headers": { "Accept": "application/json;odata=verbose", "Content-Type": "application/json;odata=verbose" }, "parameters/body": "{\n \"__metadata\": {\n \"type\": \"SP.List\"\n },\n \"AllowContentTypes\": true,\n \"BaseTemplate\": 100,\n \"Description\": \"Description\",\n \"Title\": \"@{variables('ListName')}\"\n}" }, "authentication": { "type": "Raw", "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']" } }, "runAfter": { "boolean": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "9c10c75b-c6b2-416b-a3b9-4b1bb49726df" } } }
Apply to each
{ "id": "994a5a52-e2b2-4820-b273-82eabb74a7ea", "brandColor": "#486991", "connectionReferences": { "shared_sharepointonline_1": { "connection": { "id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-9ba2c90e-d56e-42fd-b7ef-38f4145015ba" } } }, "connectorDisplayName": "制御", "icon": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzQ4Njk5MSIvPg0KIDxwYXRoIGQ9Ik0xMSAyMGg3LjJsMSAxaC05LjJ2LTguM2wtMS4zIDEuMy0uNy0uNyAyLjUtMi41IDIuNSAyLjUtLjcuNy0xLjMtMS4zem0xMi4zLTJsLjcuNy0yLjUgMi41LTIuNS0yLjUuNy0uNyAxLjMgMS4zdi03LjNoLTcuMmwtMS0xaDkuMnY4LjN6IiBmaWxsPSIjZmZmIi8+DQo8L3N2Zz4NCg==", "isTrigger": false, "operationName": "Apply_to_each", "operationDefinition": { "type": "Foreach", "foreach": "@variables('ListFieldObj')", "actions": { "JSON_の解析": { "type": "ParseJson", "inputs": { "content": "@items('Apply_to_each')", "schema": { "type": "object", "properties": { "__metadata": { "type": "object", "properties": { "type": { "type": "string" } } }, "DescriptionResource": { "type": "object", "properties": { "__deferred": { "type": "object", "properties": {} } } }, "TitleResource": { "type": "object", "properties": { "__deferred": { "type": "object", "properties": {} } } }, "AutoIndexed": { "type": "boolean" }, "CanBeDeleted": { "type": "boolean" }, "ClientSideComponentId": { "type": "string" }, "ClientSideComponentProperties": {}, "ClientValidationFormula": {}, "ClientValidationMessage": {}, "CustomFormatter": {}, "DefaultFormula": {}, "DefaultValue": {}, "Description": { "type": "string" }, "Direction": { "type": "string" }, "EnforceUniqueValues": { "type": "boolean" }, "EntityPropertyName": { "type": "string" }, "Filterable": { "type": "boolean" }, "FromBaseType": { "type": "boolean" }, "Group": { "type": "string" }, "Hidden": { "type": "boolean" }, "Id": { "type": "string" }, "Indexed": { "type": "boolean" }, "IndexStatus": { "type": "integer" }, "InternalName": { "type": "string" }, "IsModern": { "type": "boolean" }, "JSLink": {}, "PinnedToFiltersPane": { "type": "boolean" }, "ReadOnlyField": { "type": "boolean" }, "Required": { "type": "boolean" }, "SchemaXml": { "type": "string" }, "Scope": { "type": "string" }, "Sealed": { "type": "boolean" }, "ShowInFiltersPane": { "type": "integer" }, "Sortable": { "type": "boolean" }, "StaticName": { "type": "string" }, "Title": { "type": "string" }, "FieldTypeKind": { "type": "integer" }, "TypeAsString": { "type": "string" }, "TypeDisplayName": { "type": "string" }, "TypeShortDescription": { "type": "string" }, "ValidationFormula": {}, "ValidationMessage": {}, "FillInChoice": { "type": "boolean" }, "Mappings": {}, "Choices": { "type": "object", "properties": { "__metadata": { "type": "object", "properties": { "type": { "type": "string" } } }, "results": { "type": "array", "items": { "type": "string" } } } }, "EditFormat": { "type": "integer" } } } }, "runAfter": {}, "metadata": { "operationMetadataId": "776f3509-365d-4ef8-b31f-6ebebcc8fc4b" } }, "JSON_の解析(metadata)": { "type": "ParseJson", "inputs": { "content": "@body('JSON_の解析')?['__metadata']", "schema": { "type": "object", "properties": { "id": { "type": "string" }, "uri": { "type": "string" }, "type": { "type": "string" } } } }, "runAfter": { "JSON_の解析": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "8b5d13ee-3303-4f15-9788-6c2f793e53a4" } }, "条件": { "type": "If", "expression": { "equals": [ "@empty(body('JSON_の解析')?['Choices'])", "@variables('boolean')" ] }, "actions": { "SharePoint_に_HTTP_要求を送信します(フィールドの作成)": { "type": "OpenApiConnection", "inputs": { "host": { "connectionName": "shared_sharepointonline_1", "operationId": "HttpRequest", "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline" }, "parameters": { "dataset": "@variables('SiteAddress')", "parameters/method": "POST", "parameters/uri": "_api/web/lists/getbytitle('@{variables('ListName')}')/fields", "parameters/headers": { "Accept": "application/json;odata=verbose", "Content-Type": "application/json;odata=verbose" }, "parameters/body": "{\n '__metadata': {\n 'type': '@{body('JSON_の解析(metadata)')?['type']}'\n },\n 'FieldTypeKind': '@{body('JSON_の解析')?['FieldTypeKind']}',\n 'Title': '@{body('JSON_の解析')?['Title']}',\n 'Required': '@{body('JSON_の解析')?['Required']}',\n 'EnforceUniqueValues': '@{body('JSON_の解析')?['EnforceUniqueValues']}',\n 'StaticName': '@{body('JSON_の解析')?['StaticName']}'\n}" }, "authentication": { "type": "Raw", "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']" } }, "runAfter": {}, "metadata": { "operationMetadataId": "ce7d2891-1db3-4cfc-8cba-5cba80210cc6" } } }, "runAfter": { "JSON_の解析(metadata)": [ "Succeeded" ] }, "else": { "actions": { "JSON_の解析(Choices)": { "type": "ParseJson", "inputs": { "content": " @{body('JSON_の解析')?['Choices']}", "schema": { "type": "object", "properties": { "__metadata": { "type": "object", "properties": { "type": { "type": "string" } } }, "results": { "type": "array", "items": { "type": "string" } } } } }, "runAfter": {}, "metadata": { "operationMetadataId": "d85cbfd1-175f-463d-ad1c-b0b464b6d4bd" } }, "SharePoint_に_HTTP_要求を送信します(フィールドの作成(Choicesあり))": { "type": "OpenApiConnection", "inputs": { "host": { "connectionName": "shared_sharepointonline_1", "operationId": "HttpRequest", "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline" }, "parameters": { "dataset": "@variables('SiteAddress')", "parameters/method": "POST", "parameters/uri": "_api/web/lists/getbytitle('@{variables('ListName')}')/fields", "parameters/headers": { "Accept": "application/json;odata=verbose", "Content-Type": "application/json;odata=verbose" }, "parameters/body": "{\n '__metadata': {\n 'type': '@{body('JSON_の解析(metadata)')?['type']}'\n },\n 'FieldTypeKind': '@{body('JSON_の解析')?['FieldTypeKind']}',\n 'Title': '@{body('JSON_の解析')?['Title']}',\n 'Required': '@{body('JSON_の解析')?['Required']}',\n 'EnforceUniqueValues': '@{body('JSON_の解析')?['EnforceUniqueValues']}',\n 'StaticName': '@{body('JSON_の解析')?['StaticName']}',\n 'Choices': { 'results': @{body('JSON_の解析(Choices)')?['results']} }\n}" }, "authentication": { "type": "Raw", "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']" } }, "runAfter": { "JSON_の解析(Choices)": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "ce7d2891-1db3-4cfc-8cba-5cba80210cc6" } } } }, "metadata": { "operationMetadataId": "ee2b0960-6a90-48eb-8616-55d8a496a6bb" } } }, "runAfter": { "SharePoint_に_HTTP_要求を送信します(リストの作成)": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "e83ef7b1-7615-4e66-8110-2cb6ac4a5f4f" } } }
なにこのコード?どうやって使うの?
いずれかのコードをクリップボードにコピーした状態でフローを開いて、
「自分のクリップボード > Ctrl + V」をすると、アクションが選択肢に追加されますので、それを選択すると、フロー内にアクションが追加されます。
便利
ここには自分のテナント内でコピーしたアクションであればCtrl + Vをしなくとも、自動でアクションが溜まっていきます。
もちろんログアウト行ったりするとリセットされます。
ただこの機能、プレビューなだけあって「条件」アクション内や「スイッチ」アクション内などにはこの方法でアクションを追加することはできない。などの制限があるようです。
残念
おわりに
短時間で作ったフローなのでちょっと作り雑だったり検証不足だったりする箇所があります。
お気づきの点があればご指摘いただければー
それでは