Flow Designer - Email Attachments

Community Alums
Not applicable

Hi Team,

We have an inbound action using Flow Designer which creates incident from emails received from a particular account say AccountABC. We want our flow to create a ticket only if the email attachment is at least 50KB and if no attachment then it shouldn't create a ticket.

Current flow is as below:

Inbound Action
Create Record/Ticket
Lookup Email Attachments
For Each Item in Email Attachment Records
    If Content Disposition is Attachment
         Lookup Attachment Record
         Copy Attachment

Now we need to create a ticket after checking the attachments in the email. 

Inbound Action
Lookup Email Attachments
For Each Item in Email Attachment Records
    If Content Disposition is Attachment
        Lookup Attachment Record

Create Record/Ticket should be used before Copy Attachment and we can not use this inside the for each because it will create multiple records if there are multiple attachments in the same email.

Please assist us with this modifications.

Thank you.

8 REPLIES 8

Hi,

you just need to flow variable and set it with flag as either true or false

Based on the flag value outside the for each check the flag and do further processing

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Community Alums
Not applicable

Hi Ankur,

If an email has 2 attachments but one passes the condition of size then it should attach only that attachment to ticket.

If we set value in loop, it can hold only True/False. But outside of loop how do we know which attachment we need to attach to ticket?

Thank you.

Sorry I may not be clear with the understanding.

I doubt you can do that via flow.

Better you use inbound email action with script

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Community Alums
Not applicable

Thank you.