cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rashkae
Frequent Visitor

When a new Email arrives in a shared Mailbox ID for email is not properly composing

I have come up with a new app that is suppose to send out email requests to customers to which they reply back either with attachments or not. When the customer replies back to the email they are supposed to reply all which then will be picked up by the When a new email arrives filter. When the email passes this point it is then converted from HTML to Plain text then I have a composed substring code that finds the ID indicated in the email which then is able to find the proper sharepoint entry and update it accordingly. Now it works just fine exept when the email contains the sender's signature. Then causes this error in the Get Item section of the flow. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid URL</h2>
<hr><p>HTTP Error 400. The request URL is invalid.</p>
</BODY></HTML> 

 

Here is what the ID looks like in the email ID:60~

Here is my Substring code to Find the ID substring(body('Html_to_text'),add(indexOf(body('Html_to_text'),'ID:'),3),sub(lastIndexOf(body('Html_to_Text'),'~'),add(indexOf(body('Html_to_text'),'ID:'),3)))

 

Problems.png

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Rashkae the reason for this is because when someone includes an image in their signature, it will be encoded and have an object ID associated with it e.g.

[cid:image003.png@01D536A7.C87E5AE0]

 

This is what is being picked up by your expression and breaking the subsequent get items action. It's returning a full blown string rather than just the actual ID. Simplest fix would be to expand the criteria of the text you're trying to find e.g. in my email I could change ID to CallID and then use that when trying to find the index values.

View solution in original post

1 REPLY 1

Hi @Rashkae the reason for this is because when someone includes an image in their signature, it will be encoded and have an object ID associated with it e.g.

[cid:image003.png@01D536A7.C87E5AE0]

 

This is what is being picked up by your expression and breaking the subsequent get items action. It's returning a full blown string rather than just the actual ID. Simplest fix would be to expand the criteria of the text you're trying to find e.g. in my email I could change ID to CallID and then use that when trying to find the index values.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,981)