Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Getting error 502 when saving email attachment

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a flow to save email attachments when new email arrives. But I am getting 500 unknown error yesterday and then today I am getting 502, could someone please help?

 

I am using save email attachment flow but I am getting

Inputs
  • Folder Path
    Inbox
  • Importance
    Normal
  • Has Attachments
    True
  • Include Attachments?
    True
Outputs
  • Headers
    { "Pragma": "no-cache", "x-ms-datasourceerror": "True", "x-ms-request-id": "4158810d-6bba-40c6-94e7-10ebd05ebd42", "X-Content-Type-Options": "nosniff", "Connection": "close", "Cache-Control": "no-cache", "Date": "Tue, 09 Aug 2016 19:59:55 GMT",
  • Body
    { "status": 502, "message": "The service returned invalid JSON.", "source": "127.0.0.1" }

 

 
Create
  • balakrn Profile Picture
    2 on at
    Re: Getting error 502 when saving email attachment

    Hi, I am getting the same error. Do we have an answer to this?

  • JingChang Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    I will connect with you offline

  • JmArreola Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    can you share a screenshot of the CreateFile step?

  • JingChang Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    @JmArreola is that error a data size limit error? what is the supported data size limit for an email attachment? This is a highly asked customer scenario and we have some customer trying to automate their data pipeline using this. 

  • JmArreola Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    Ok @JingChang. Let me take a look on the error

  • JingChang Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    Hi @JmArreola it failed again,but not on the first "on new email" activity, but on the second "Create File" activity. I am seeign a new error below, what does it mean? could you please help?

     

    Meanwhile, I havn't had any success when saving to storage account. I will send out details soon,

     

     

    thanks

    Jing

     

     

    On new email
    2s
     
    Create file
    0s
    Error
    • Code
      InvalidTemplate
    • Message
      Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '11': 'The template language function 'concat' parameter values is out of range: evaluating the function would result in a literal of length '226477' which exceeds the limit of '131072'. Please see https://aka.ms/logicexpressions#concat for usage details.'.
  • JmArreola Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    Yes @JingChang, I mean the From, To and Subject filter, if you can just modify the flow to be the same as it failed yesterday.

  • JingChang Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    Hi @JmArreola sure thing! I will validate and let you know. just to make sure, you mean with From, To, and Subject filter all empty (default to accept all), it should work?  do you just want me to remove subject filters or remove all three?

  • JmArreola Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    Hi @JingChang the filters are not required. The flow should work with and without them. I already have the logs for the failures of your Flows and we will investigate the reason why they failed.

     

    Yesterday we had an issue related to this connector, i will see if your issue is related. In the meantime, just to double check, can you please modify the flow, remove the filters and test it again now?

  • JingChang Profile Picture
    Microsoft Employee on at
    Re: Getting error 502 when saving email attachment

    okay, @JmArreola, I forgot to tag you in previous conversations, Now with all From, To, Subject Filter specified, I had a successful save of email attachment to one drive.

     

    What is the right way to save all email attachments without specifying sender and subject filter?

     

    thanks

    Jing

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow