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!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

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!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 386 members 5,600 guests
Please welcome our newest community members: