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 / Power Automate Trigger...
Power Automate
Suggested Answer

Power Automate Trigger Fails: splitOn Returns Null, Code Unmodifiable & Incomplete ZIP Export

(1) ShareShare
ReportReport
Posted on by

I'm encountering multiple issues with my Power Automate flow:

  1. Trigger Error:

    My trigger is configured with the following setting:

    "splitOn": "@triggerBody()?['body/attachments']"

    This setting instructs the flow to iterate over the attachments from incoming emails. However, if an email arrives without attachments, the attachments property returns a null value instead of an array. Since splitOn expects a valid array, the trigger fails with an error message like:

    "The splitOn expression '@triggerBody()?['body/attachments']' is of type 'Null'. The result must be a valid array."

    As a workaround, I've considered either removing the splitOn configuration altogether or wrapping it in a condition to return an empty array when there are no attachments (e.g., using if(empty(...), json('[]'), ...)). However, I'm unable to modify the code.

  2. Code Unmodifiable:

    I cannot modify the code directly in my Power Automate environment, which prevents me from applying any fixes to the splitOn expression.


  3. Incomplete ZIP Export:

    Additionally, when I download the flow as a ZIP file, the exported package does not contain the complete code (or definition) of the flow. This makes it even more challenging to troubleshoot or modify the flow as needed.

Any insights or suggestions on how to resolve these issues would be greatly appreciated.

Categories:
I have the same question (1)
  • Suggested answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    In #2 When you say the code is unmodifiable do you mean you can't edit the flow in Power Automate and turn SplitOn off in the settings?  Or that you can't modify the way SplitOn operates in the trigger to fix the null issue?
     
    To the best of my knowledge your only choice is to turn off SplitOn in the settings and then handle the attachments individually in the flow. SplitOn is designed to work in such a way that each message would trigger a separate flow instance and not each attachment within a message.  Your only real choice is to disable the way you are doing SplitOn either by editing the flow or deleting it and starting over.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard