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 Automate
Suggested Answer

Automated email error

(1) ShareShare
ReportReport
Posted on by 2
I am trying to build my first flow where the trigger is when a Form is submitted. It kicks off by filtering down an Excel Table to just the Account numbers identified in both my Table and Form. Then it will take all the emails from my Excel Table and email them an automated email. But I am running into an error where it says the To line is null. However, it contains logic to pull the emails. The account number is the same data type in both files. Copilot seems to think everything I am doing already is correct. Can you help? 
SmartSelect_20260227_161919_Teams.jpg
Categories:
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     

    In the first place, let's analyse the error: it says "the To line is null" - which usually means that the email address list we are passing to the "To" field is empty or not in the expected format.

    To address this issue let's investigate some common causes:

    Investigation step-1: The email extraction logic and the filter output - after filtering the Excel table by account numbers, make sure the resulting list of emails is not empty - what we can do here is use a Compose or "Send me an email" action temporarily to inspect the emails. This will ensure To list has exact email.

    Investigation step-2: When we pull email addresses we must concatenate correctly. The "To" field expects a semicolon-separated string of email addresses or an array of strings.  In this case we may need to join it into a string using the join() expression, e.g.:

    join(body('Filter_array'), ';')
    
    In other angle, If emails come from a Select action, we can use join(outputs('Select'), ';') to convert the array to a string.
     
    Investigation step-3: We need to confirm data type and null values, let's make sure email field in the Excel table is not empty or null for the filtered rows. We can add a safeguard by adding a filter step to exclude empty or invalid emails before sending.
     
    A simple condition can be:
    not(empty(item()?['Email']))
    
    Finally, to address the issue, let's narrow down the problem step by step. Check every step where and when data (email  addresses) coming correctly or not and is it null or empty.
     
    Please let me know if these steps help or not.
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     
     
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,204 Super User 2026 Season 1 on at
    Hi,
     
    Check Filter array output in run history—if empty, account numbers don't match exactly due to spaces or format.
    Add "Condition" after Filter array: @empty(body('Filter_array')).
     
    Use join(body('Filter_array')?['Email'], ';') in the Send email "To" field to combine emails properly.
    This turns array of emails into "email1@email.com; email2@email.com".
     
    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
  • Haque Profile Picture
    3,653 on at
     
    I was following up on this, is this issue resolved?

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard