web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / E-mail address with an...
Power Automate
Unanswered

E-mail address with an apostrophe causing flow to fail

(2) ShareShare
ReportReport
Posted on by 85

Hi there,

 

I have a flow that gets information from a SharePoint list where I am managing an onboarding tracker.  The flow sends an individual email to each of the hiring managers once per week with status updates and it's been working fine.  Please see the flow below:

 

smodkins_0-1721156869674.png

smodkins_1-1721156906891.png

smodkins_2-1721156958118.png

 

This week it's been failing on one record though everyone elses appears to have been sent successfully and the only difference I can see is the manager has an email address with an apostrophe in it.

 

This is the step it's failing at and the error (with the email address changed for privacy)

 

smodkins_3-1721157078271.png

 

Action 'Get_items_Filtered_List' failed: The expression "(LineManager/EMail eq 'Edward.O'Callaghan@powerautomate.com') and ((Status eq '1. Welcome e-mail sent (candidate to complete backchecks)') or (Status eq '2. Candidate completing consent forms') or (Status eq '3. Candidate completed consent forms, checks in production') or (Status eq '4. Backchecks complete, awaiting start date') or (Status eq '5. Start date confirmed, awaiting induction')) and ((BusinessArea eq 'London') or (BusinessArea eq 'Leeds'))" is not valid. Creating query failed. 

 

Any help you can offer would be much appreciated 

Categories:
I have the same question (0)
  • trice602 Profile Picture
    16,130 Super User 2026 Season 1 on at

    Hi @smodkins ,

     

    One way to help work with this name is to use a variable.  Then replace the apostrophe with a %27, such as:

    replace(triggerOutputs()?['body/FullName'],'''','%27')

     

    Then refer to the variable downstream.  This will help you with the apostrophe error you are getting.

     

     

     

  • smodkins Profile Picture
    85 on at
    Hi trice602,
     
    Thank you for coming back to me! I saw you replied but have been unable to access this thread in the migration to the new experience but it is back now!
     
    Thank you for the suggestion.  Can you show me how this would look in a flow?  Apologies but I am still quite new to power automate 
     
    Thanks in advance
  • Chriddle Profile Picture
    8,685 Super User 2026 Season 1 on at
    Replacing ' with %27 won't work., because you are checking for equality.
    You have to do a Power Automate encoding (which is 2 single quotes).
     
    This expression replaces one single quote with two single quotes in <email>:
    replace(<email>, '''', '''''')
  • smodkins Profile Picture
    85 on at
    Thank you Chriddle.  
     
    Do I leave the <email> in the expression just like that or do I need to replace with a field?
  • Chriddle Profile Picture
    8,685 Super User 2026 Season 1 on at
    Here <email> is a placeholder for the email address.
    In your case probaply outputs('Compose_Email_To')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard