PowerAutomate: クリップボードでフローをコピー＆ペーストして簡単共有

# 背景

Power Automate の共有の仕方としては、以下のような共有方法がありますが、クリップボードを使うと JSON で共有出来まるので、Qiitaなどと相性がいいですね、というお話。
1. 所有者共有
1. 実行専用共有
1. Zip Export/Import
1. メールで送付して、Zip Import
1. Template 化して
1. Solution 化して

Desktop 版の JSON 共有は以下で

https://qiita.com/baku2san/items/be89e206a6280cb84406

:::note info

ついに、New Designer でも Neste Items の Copy ＆ Paste が対応されました！

:::

# クリップボードの使い方
1. クリップボードにコピー
   - 新 Designer
      ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/120072/0d0ea91f-f08c-e2df-d9cb-5006e2e4ffdf.png)

   - 旧 Designer<br>![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/120072/678b780b-b207-4798-0e85-aaccec30e877.png)
1. 以下のような JSON が取得出来てる<br>![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/120072/ca74f1ab-0dbf-d549-abe5-b13a988e5cb3.png)
1. アクション選択する際の Tab を MyClipboard に切り替えて貼り付け
   - 新 Designer
      ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/120072/dcb78289-efbd-3832-d559-505a2262c03a.png)

   - 旧 Designer<br>![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/120072/6b175e8c-0548-f7be-2ce4-a7c72d936f21.png)
1. あとは、普通の Action と同様に選択すると、展開されます<br>![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/120072/f4528765-c0f3-c717-f825-0e5247242b73.png)

:::note
Scope で囲っておくことで、Trigger以外の全Actions をコピペ対象に出来ます。
:::


# 貼り付けSample
```json:貼り付けSample_InputValidation
{
  "id": "1316db62-ad5b-4102-965a-5e4b-1ce905c7",
  "brandColor": "#8C3900",
  "connectionReferences": {
    "shared_teams": {
      "connection": {
        "id": "/providers/Microsoft.PowerApps/apis/shared_teams/connections/shared-teams-864099d5-54a7-4002-93b6-565ecf481128"
      }
    }
  },
  "connectorDisplayName": "Control",
  "icon": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=",
  "isTrigger": false,
  "operationName": "Scope",
  "operationDefinition": {
    "type": "Scope",
    "actions": {
      "Post_adaptive_card_in_a_chat_or_channel": {
        "type": "OpenApiConnection",
        "inputs": {
          "host": {
            "connectionName": "shared_teams",
            "operationId": "PostCardToConversation",
            "apiId": "/providers/Microsoft.PowerApps/apis/shared_teams"
          },
          "parameters": {
            "poster": "Flow bot",
            "location": "Chat with Flow bot",
            "body/recipient": "@{triggerOutputs()['headers']['x-ms-user-email-encoded']};",
            "body/messageBody": "{\n    \"type\": \"AdaptiveCard\",\n    \"version\": \"1.3\",\n    \"msteams\": {\n        \"width\": \"full\"\n    },\n    \"body\": [\n        {\n            \"type\": \"Input.Text\",\n            \"label\": \"ItemName を入れてください\",\n            \"isRequired\": true,\n            \"id\": \"InputName\",\n            \"placeholder\": \"Alphabetical12\",\n            \"regex\": \"^\\\\w+\\\\d{2}$\",\n            \"errorMessage\": \"アルファベット一文字以上に続き二桁の数字を入れてください。\",\n            \"maxLength\": \"8\"\n        },\n        {\n            \"type\": \"Input.Number\",\n            \"placeholder\": \"25\",\n            \"label\": \"年齢を入れてください\",\n            \"id\": \"InputAge\",\n            \"errorMessage\": \"20-99歳で\",\n            \"isRequired\": true,\n            \"min\": \"20\",\n            \"max\": \"99\"\n        },\n        {\n            \"type\": \"Input.Date\",\n            \"errorMessage\": \"2021/11/1 より後で\",\n            \"min\": \"2021/11/1\",\n            \"max\": \"2021/12/1\",\n            \"id\": \"InputDate\"\n        },\n        {\n            \"type\": \"Input.Time\",\n            \"errorMessage\": \"12:00 - 14:00 で\",\n            \"min\": \"12:00\",\n            \"max\": \"14:00\",\n            \"id\": \"InputTime\"\n        },\n        {\n            \"type\": \"ActionSet\",\n            \"actions\": [\n                {\n                    \"type\": \"Action.Submit\",\n                    \"title\": \"Action.Submit\"\n                }\n            ]\n        }\n    ],\n    \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\"\n}"
          },
          "authentication": {
            "type": "Raw",
            "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
          }
        },
        "runAfter": {}
      }
    },
    "runAfter": {}
  }
}
```

https://qiita.com/baku2san/items/bc69fc547c618eb45cb9

# keyword

to share with clipboard