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 / Getting error 502 when...
Power Automate
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
Categories:
I have the same question (0)
  • JmArreola Profile Picture
    Microsoft Employee on at

    Hi @JingChang. can you please share your flow id?

     

    Go to My flows, then click on the flow, and share the url with me.

     

     

  • JingChang Profile Picture
    Microsoft Employee on at

    Hi JmArreola, thanks for following up!

     

    I have two flows one saving to storage account and the other savign to one drive, they both run into the same error, on the first activity "On new email", here are the urls

    https://flow.microsoft.com/manage/flows/78c3679b-9dbd-47af-adbc-4a6754740e2d

     

    https://flow.microsoft.com/manage/flows/d4057d34-a526-474c-8cec-e49464c75b65

     

     

     

  • JingChang Profile Picture
    Microsoft Employee on at

    I left From, To, and Subject Filter empty in the intention of processign all emails, do they have to have some input?

  • JingChang Profile Picture
    Microsoft Employee on at

    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

  • JmArreola Profile Picture
    Microsoft Employee on at

    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

    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

    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

    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

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

  • JingChang Profile Picture
    Microsoft Employee on at

    @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. 

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard