GenAI Connect with Case Attachments

Hi all,

My requirement is where user will upload an email in msg file into the case and submit, then the flow will call GenAI connect shape and map the GenAI response as case fields.

In the Gen AI Connect rule, i have selected "Include attachment field for analysis"and added “.AttachmentFile” a single page property with page definition “Embed-Attach-File”.

In the pre-processing after attachment and before the GenAI connect rule,
I have mapped
.AttachmentFile.pxAttachmentKey = “DATA-WORKATTACH-FILE XX CaseID!20261010T162420.138 GMT”, the key which is retrieved from the file.

When the flow reaches the GenAI Connect shape, it displays “Attachment content is empty, please upload at least one attachment to perform the action.”

How do I pass the attachment from the case?

I tried various attachment files (PDF, docx, jpeg, msg).

hi, you can check if Step 13 under the “How to configure” section helps from this article. This one maps a PDF file attached to the case to an attachment field referenced in GenAI Connect rule - How to use Pega GenAI Connect to process incoming email and attached document

Just a separate note: In Pega Infinity 26.1.1, we use DocAI Connect (instead of GenAI Connect) rule to process case attachment as documented in How to use Pega GenAI Connect for intelligent document processing (updated: new "DocAI Connect" in 26.1.1) - #2 by Will_Cho

Hi Will Cho, thanks for the quick reply.

Step 13 is the one which I’m confused about, the single page has saved the key but the GenAI Connect is unable to pickup the attachment, stating the error. I have verified the reference key is stored in the pxAttachmentKey property in the clipboard.

I have also tried using the attachment property in the UI but there’s an issue saving the attachment to the property.