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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Email flow won't send ...
Power Automate
Suggested Answer

Email flow won't send from excel table

(1) ShareShare
ReportReport
Posted on by 12
I built a Flow where I am connecting a table in Excel and need it to send out an email based on the date column. The flow passes all test until the email portion and this is the message I get" Action 'Send_an_email_(V2)' failed. OpenApiOperationParameterTypeConversionFailed. The 'inputs.parameters' of workflow operation 'Send_an_email_(V2)' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'emailMessage/To' is required to be of type 'String/email'. The source type/format 'Object' of the value '{"ashton.coulter@htb.com":""}' is not convertible to type/format 'String/email'. "I have also included screenshots. I can't figure out what the missing issue is. I have confirmed the email is indeed correct so isn't an issue of the email not being correct and consulting with multiple sources on the internet my process has been correct. It is attempting to pull from the email column in the list because I changed the email in the table and when I did the error message reflected the updated email, so it reads the email from the table it just can't send it for some reason and I'm not sure what the issue is. This is for a urgent work project, any help would be greatly appreciated.
 
Thank you
Categories:
I have the same question (0)
  • RW-06041516-0 Profile Picture
    8 on at
    Try intialize a variable called email as string in Vairables section
    Then set the excel email in the initialized email - test it
    If it fails in that case the email from excel is not a string

    Then you need to use a conversion expression to change the value of excel email to string. If you could share the excel with some dummy email that you are using it will help to trouble shoot.
  • Suggested answer
    Riyaz_riz11 Profile Picture
    3,878 Super User 2025 Season 2 on at
    Hi,
     

    Solution 1: Email Field Extraction (Recommended)

    Method A: Extract Display Name

    Send an email (V2)
    ├── To: @{items('Apply_to_each')?['Email']?['DisplayName']}
    ├── Subject: [Your Subject]
    ├── Body: [Your Body]

    Method B: Extract Claims

    Send an email (V2)
    ├── To: @{items('Apply_to_each')?['Email']?['Claims']}
    ├── Subject: [Your Subject]
    ├── Body: [Your Body]

    Method C: Extract Email Property

    Send an email (V2)
    ├── To: @{items('Apply_to_each')?['Email']?['Email']}
    ├── Subject: [Your Subject]
    ├── Body: [Your Body]
     

    Solution 2: Using Compose to Debug and Fix

    Step 1: Add Compose Action (Before Send Email)

    Compose: Debug Email Value
    ├── Value: @{items('Apply_to_each')?['Email']}

    Step 2: Based on Compose Output, Use Appropriate Fix

    // If Compose shows: {"ashton.coulter@htb.com":""}
    Send an email (V2)
    ├── To: @{first(split(string(items('Apply_to_each')?['Email']), ':'))}
    
    // If Compose shows: {"Email":"ashton.coulter@htb.com"}
    Send an email (V2)
    ├── To: @{items('Apply_to_each')?['Email']?['Email']}
    
    // If Compose shows: {"DisplayName":"ashton.coulter@htb.com"}
    Send an email (V2)
    ├── To: @{items('Apply_to_each')?['Email']?['DisplayName']}

    Solution 3: Complete Working Flow Structure

    Get items (Excel)
    ├── Location: [Your Excel File Location]
    ├── Document Library: [Your Document Library]
    ├── File: [Your Excel File]
    ├── Table: [Your Table Name]
    
    Apply to each
    ├── Select: value (from Get items)
    ├── Actions:
        ├── Condition: Check Date
        │   ├── Expression: @{equals(formatDateTime(items('Apply_to_each')?['Date'], 'yyyy-MM-dd'), formatDateTime(utcNow(), 'yyyy-MM-dd'))}
        │   ├── IF YES:
        │   │   ├── Compose: Extract Email
        │   │   │   ├── Value: @{coalesce(items('Apply_to_each')?['Email']?['DisplayName'], items('Apply_to_each')?['Email']?['Claims'], items('Apply_to_each')?['Email']?['Email'], string(items('Apply_to_each')?['Email']))}
        │   │   │
        │   │   ├── Condition: Validate Email
        │   │   │   ├── Expression: @{and(not(empty(outputs('Extract_Email'))), contains(outputs('Extract_Email'), '@'))}
        │   │   │   ├── IF YES:
        │   │   │   │   ├── Send an email (V2)
        │   │   │   │   │   ├── To: @{outputs('Extract_Email')}
        │   │   │   │   │   ├── Subject: [Your Subject]
        │   │   │   │   │   ├── Body: [Your Body]
        │   │   │   ├── IF NO:
        │   │   │   │   ├── Send an email (V2) [Error Notification]
        │   │   │   │   │   ├── To: [Your Admin Email]
        │   │   │   │   │   ├── Subject: "Invalid Email Found"
        │   │   │   │   │   ├── Body: "Invalid email for row: @{items('Apply_to_each')}"
     

    Solution 4: Advanced Email Extraction

    For Complex Excel Objects

    Compose: Advanced Email Extraction
    ├── Value: 
        @{
          if(
            contains(string(items('Apply_to_each')?['Email']), '@'),
            if(
              contains(string(items('Apply_to_each')?['Email']), '":""'),
              first(split(string(items('Apply_to_each')?['Email']), '":"')),
              if(
                contains(string(items('Apply_to_each')?['Email']), 'DisplayName'),
                items('Apply_to_each')?['Email']?['DisplayName'],
                string(items('Apply_to_each')?['Email'])
              )
            ),
            'invalid@email.com'
          )
        }
    
    // Clean the extracted email
    Compose: Clean Email
    ├── Value: @{replace(replace(replace(outputs('Advanced_Email_Extraction'), '{"', ''), '"', ''), '}', '')}
    
    Send an email (V2)
    ├── To: @{outputs('Clean_Email')}
     

    Solution 5: Alternative Email Actions

    If Send an email (V2) continues to fail, try:

    Option A: Send an email (V2) with manual entry

    Send an email (V2)
    ├── To: [Manually type the email to test]
    ├── Subject: Test
    ├── Body: This is a test

    Option B: Use Office 365 Outlook connector

    Send an email (V2) [Office 365 Outlook]
    ├── To: @{outputs('Clean_Email')}
    ├── Subject: [Your Subject]
    ├── Body: [Your Body]
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz
  • Suggested answer
    Tomac Profile Picture
    3,951 Moderator on at
    Riyaz's solution below is almost correct, but it leaves a : symbol in the To field. Try this snippet in the To section of your Send an Email action as an expression:
    replace(replace(replace(replace(items('Apply_to_each'), '{"', ''), '"', ''), '}', ''), ':', '')
    And be sure to change the Apply_to_each text to match the name of your loop action

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard