Hi,
I'm trying to figure out how to retrieve an attachment from an e-mail into Dynamics 365.
I setup a simple flow that listens for an email arriving in Dynamics 365, then forwards the email to support.
I am using the Common Data Service, 'When a record is created' event to listen to an e-mail arrival. The Entity set is Email Message.
The next step is to email to support. However, the attachment is not sent. Troubleshooting the issue, I notice that attachmentcount is 0 when there is an attachment. How do you get the attachment to the email? Here's the output:
{
"notifications": 0,
"_notifications_label": "None",
"isunsafe": 0,
"correlationmethod": 0,
"_correlationmethod_label": "None",
"_owningbusinessunit_value": "6d92828b-e7ec-e111-930b-78e7d1622fc2",
"_owningbusinessunit_type": "businessunits",
"_sendersaccount_value": "56e16ff1-063b-e211-b5f5-78e7d162ee7d",
"_sendersaccount_type": "accounts",
"description": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n</head>\n<body>\n<div dir=\"ltr\">Test attachment</div>\n</body>\n</html>\n",
"isemailfollowed": false,
"createdon": "2021-04-16T14:54:28Z",
"attachmentcount": 0,
"followemailuserpreference": false,
"statecode": 1,
"_statecode_label": "Completed",
"isbilled": false,
"subject": "Attachment Test",
"deliveryreceiptrequested": false,
"directioncode": false,
"_ownerid_value": "8862e19e-b7b9-e211-af97-78e7d162dec2",
"_ownerid_type": "systemusers",
"modifiedon": "2021-04-16T14:54:28Z",
"readreceiptrequested": false,
"prioritycode": 1,
"_prioritycode_label": "Normal",
"compressed": false,
"timezoneruleversionnumber": 0,
"isregularactivity": true,
"_modifiedby_value": "f6fb6c97-71af-432f-8452-c8e375547010",
"_modifiedby_type": "systemusers",
"isemailreminderset": false,
"statuscode": 4,
"_statuscode_label": "Received",
"_modifiedonbehalfby_value": "f6fb6c97-71af-432f-8452-c8e375547010",
"_modifiedonbehalfby_type": "systemusers",
"_emailsender_value": "0cb98524-073b-e211-b5f5-78e7d162ee7d",
"_emailsender_type": "contacts",
"activitytypecode": "email",
"messageid": "<CAO=2aWauvqJoviFPkeRTg8yMVda-mfMcoHf3FH_EJUzymtyJ0g@mail.gmail.com>",
"submittedby": "\"Support\" support@notrealemail.com",
"sender": "support@notrealemail.com",
"isworkflowcreated": false,
"deliveryprioritycode": 1,
"_deliveryprioritycode_label": "Normal",
"_createdonbehalfby_value": "f6fb6c97-71af-432f-8452-c8e375547010",
"_createdonbehalfby_type": "systemusers",
"_createdby_value": "f6fb6c97-71af-432f-8452-c8e375547010",
"_createdby_type": "systemusers",
"actualend": "2021-04-16",
"emailreminderstatus": 0,
"_emailreminderstatus_label": "NotSet",
"emailremindertype": 0,
"_emailremindertype_label": "If I do not receive a reply by",
"torecipients": "support@notrealemail.com;",
"posp_processed": false,
"baseconversationindexhash": -86706446,
"activityid": "3d21fea1-c39e-eb11-b1ac-000d3a8f7bda",
"conversationindex": "0101D732CFD0C81AE297FD0B1F409AFB58789C5E3304",
"ItemInternalId": "3d21fea1-c39e-eb11-b1ac-000d3a8f7bda",
"SdkMessage": "Create",
"RunAsSystemUserId": "f6fb6c97-71af-432f-8452-c8e375547010",
"RowVersion": "45890156"
}
Thanks in advance.