PowerBI/PowerQuery如何在outlook中加载邮件内容?

How to load the contents of an email in outlook in PowerBI/PowerQuery?

我正在尝试使用 Power Query 将电子邮件的文本内容从 Outlook 加载到 PowerBI 中。我只想专门加载来自指定人员的电子邮件内容,具有指定的主题行,并且只加载最近的电子邮件。 到目前为止,这是我的代码:

let
    Source = Exchange.Contents("user@email.com"),
    Mail1 = Source{[Name="Mail"]}[Data],
    #"Filtered Rows" = Table.SelectRows(Mail1, each ([Folder Path] = "\Inbox\Project\")),
    #"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"DateTimeReceived", Order.Descending}}),
    #"Filtered Rows1" = Table.SelectRows(#"Sorted Rows", each Text.Contains([Subject], "Speficied Email Subject")),
    #"Expanded Sender" = Table.ExpandRecordColumn(#"Filtered Rows1", "Sender", {"Address"}, {"Sender.Address"}),
    #"Filtered Rows2" = Table.SelectRows(#"Expanded Sender", each Text.Contains([Sender.Address], "specified email sender")),
    #"Filtered Rows3" = Table.SelectRows(#"Filtered Rows2", each Text.Contains([Subject], "specified email subject")),
    #"Kept First Rows" = Table.FirstN(#"Filtered Rows3",1),
    #"Choose First Result's Content" = #"Kept First Rows"[Body],
    TextBody = #"Choose First Result's Content"[TextBody]
in
    TextBody

我遇到一个错误:

Expression.Error: We cannot apply field access to the type List.
Details:
    Value=[List]
    Key=TextBody

有人可以帮我更正这段代码吗? 谢谢!

将最后一步改为TextBody = #"Choose First Result's Content"{0}[TextBody]