本文へスキップ
すべてのツール

m365_move_email

Microsoft 365 · macOS · Windows

効果: 書き込み. 状態: 条件付き提供.

「条件付き提供」は、バージョン、プラットフォーム、権限、アカウント、設定に依存する可能性を示し、すべての環境で有効という意味ではありません。

macOS

目的

ユーザーが Microsoft 365 / Outlook アカウントのメールを、整理、アーカイブ、仕分けのために、Exchange サーバー上の別のフォルダに移動したいときに使います。メッセージは、message_id(1 件)または message_ids(最大 50 件)で指定します(m365_list_emails、m365_search_emails、m365_read_email から取得)。または、conversation_id(m365_list_emails または m365_search_emails から取得)で会話全体を指定します。その場合、移動するのは source_folder(既定は inbox)にあるメッセージだけで、all_folders=true を指定しない限り、送信済みアイテム、下書き、その他のフォルダにあるコピーは移動しません。destination は、m365_list_email_folders で得たフォルダの id、名前、パス、または inbox、archive、deleteditems、junkemail です。最初にプレビューを表示し、confirm=true を設定すると移動します。メッセージが移動されたとみなされるのは、2 回目の読み取りで移動先に表示され、古い id では見つからなくなった場合だけです。移動したメッセージには新しい id(new_id)が付きます。Microsoft 365 の権限 Mail.ReadWrite が必要です。この権限が求められる前に接続されたアカウントは、再接続するまで consent_required を返します。Mac の Mail アプリのメールには、move_email を使ってください。

必須入力

入力名はツールが要求する正確な形式のままです。英語の正規技術定義は下の展開可能なスキーマにあります。

権限と確認

スキーマには明示的な確認パラメータがあります。プレビューを確認し、プラットフォーム契約に従って実操作を承認してください。

英語の正規技術スキーマ — macOS
{
  "properties": {
    "account": {
      "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      "type": "string"
    },
    "all_folders": {
      "description": "With conversation_id: true moves its messages from every folder, Sent Items and Drafts included (default false).",
      "type": "boolean"
    },
    "confirm": {
      "description": "Set to true to move (default: shows a preview only).",
      "type": "boolean"
    },
    "conversation_id": {
      "description": "Move the messages of this conversation that are in source_folder.",
      "type": "string"
    },
    "destination": {
      "description": "The folder to move them to: an id, name or path from m365_list_email_folders, or inbox, archive, deleteditems, junkemail.",
      "type": "string"
    },
    "message_id": {
      "description": "The ID of one message to move.",
      "type": "string"
    },
    "message_ids": {
      "description": "IDs of up to 50 messages to move.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "source_folder": {
      "description": "With conversation_id: the folder its messages are moved from (default inbox). An id, name or path.",
      "type": "string"
    }
  },
  "required": [
    "destination"
  ],
  "type": "object"
}

ドキュメント例

m365_move_email のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。

{
  "confirm": false,
  "destination": "archive",
  "message_id": "demo-message-001"
}

Windows

目的

ユーザーが Microsoft 365 / Outlook アカウントのメールを、整理、アーカイブ、仕分けのために、Exchange サーバー上の別のフォルダに移動したいときに使います。メッセージは、message_id(1 件)または message_ids(最大 50 件)で指定します(m365_list_emails、m365_search_emails、m365_read_email から取得)。または、conversation_id(m365_list_emails または m365_search_emails から取得)で会話全体を指定します。その場合、移動するのは source_folder(既定は inbox)にあるメッセージだけで、all_folders=true を指定しない限り、送信済みアイテム、下書き、その他のフォルダにあるコピーは移動しません。destination は、m365_list_email_folders で得たフォルダの id、名前、パス、または inbox、archive、deleteditems、junkemail です。最初にプレビューを表示し、confirm=true を設定すると移動します。メッセージが移動されたとみなされるのは、2 回目の読み取りで移動先に表示され、古い id では見つからなくなった場合だけです。移動したメッセージには新しい id(new_id)が付きます。Microsoft 365 の権限 Mail.ReadWrite が必要です。この権限が求められる前に接続されたアカウントは、再接続するまで consent_required を返します。この PC のクラシック Outlook アプリのメールには、outlook_move_email を使ってください。

必須入力

入力名はツールが要求する正確な形式のままです。英語の正規技術定義は下の展開可能なスキーマにあります。

権限と確認

スキーマには明示的な確認パラメータがあります。プレビューを確認し、プラットフォーム契約に従って実操作を承認してください。

英語の正規技術スキーマ — Windows
{
  "properties": {
    "account": {
      "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      "type": "string"
    },
    "all_folders": {
      "description": "With conversation_id: true moves its messages from every folder, Sent Items and Drafts included (default false).",
      "type": "boolean"
    },
    "confirm": {
      "description": "Set to true to move (default: shows a preview only).",
      "type": "boolean"
    },
    "conversation_id": {
      "description": "Move the messages of this conversation that are in source_folder.",
      "type": "string"
    },
    "destination": {
      "description": "The folder to move them to: an id, name or path from m365_list_email_folders, or inbox, archive, deleteditems, junkemail.",
      "type": "string"
    },
    "message_id": {
      "description": "The ID of one message to move.",
      "type": "string"
    },
    "message_ids": {
      "description": "IDs of up to 50 messages to move.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "source_folder": {
      "description": "With conversation_id: the folder its messages are moved from (default inbox). An id, name or path.",
      "type": "string"
    }
  },
  "required": [
    "destination"
  ],
  "type": "object"
}

ドキュメント例

m365_move_email のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。

{
  "confirm": false,
  "destination": "archive",
  "message_id": "demo-message-001"
}