cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Rashkae
Level: Powered On

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
Super User
Super User

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

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.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

1 REPLY 1
Super User
Super User

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

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.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,622)