Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

SAP ERP CONNECTOR - how to extract output into EXCEL, CSV file or other to send via email

(1) ShareShare
ReportReport
Posted on by 4

Hello Community!

 

Thanks for your time. I would like to ask for your assistance as I have completed my connection with SAP with Power Automate using SAP ERP connector available. I am able to conect and execute flows related to Call Sap Function (v2) or Reading a Table with Parse. Once the flow is executed and completed, output data is there and I can check it by clicking on check Raw data. However, I would like to take that output and introduce it in an email. If possible in a file like Excel, CSV, PDF, it doesnt matter to me. I only need assistance on knowing the way to extract that output properly to be sent via email.

 

Thanks in advance for your assistance. Do not hesitate to contact me in case any further information is needed.

Flow.jpg

OutputData.jpg

  • PabloGuerra Profile Picture
    PabloGuerra 4 on at
    Re: SAP ERP CONNECTOR - how to extract output into EXCEL, CSV file or other to send via email

    Hello @FLMike , 

     

    Thanks for your reply and great and complete explanation. Regarding the output option data from previous step, only body is available or Row item (but it generates automatically a for each value which is not the objective as it would generate several files/emails).

     

    I have tried both option you provided with Body and the result is closer to the objective but not completely. 

     

    With create a HTML table, including body from previous step, I get the entire raw data which is not readable. (Screenshot attached).

     

    With creating a file in sharepoint or one drive with body too I get the following table output. (Screenshot attached). There, everything is in One single row instead a row for titles and then each row for each value.

     

    I hope it is clear and well explained. And, again, thanks a lot for your reply, it is very helpful.

     

    Thanks in advance. Best Regards,

     

    Pablo Guerra

  • FLMike Profile Picture
    FLMike 30,156 on at
    Re: SAP ERP CONNECTOR - how to extract output into EXCEL, CSV file or other to send via email

    Hi @PabloGuerra 

     

    There must be a Dynamic Output/Body property associated after it runs. Please read the below and feel free to share pictures as you need help etc.

     

    Just to test this, add a Compose after the above step to get the data. In the Compose, click the Input box, when the Popup Windows Appears, in the Dynamic Content scroll so you can see the Call SAP function (V2) Section and you should see something like

    body

    outputs

    value 

    something like the above. That will be the Output of the Action.

     

    Now here is the important part. There is a difference between getting the body of the Action and getting the values of the Rows.

     

    As an Example: when you use Get Items for SharePoint, you can see body and value as Dynamic Content properties. Body is actually a JSON that has ALL the output from the Get Items, where-as the value is the JSON property that has the actual row data, so we need to find the one that matches that in the Dynamic Content properties for Call SAP Function (V2)

     

    Now once you have that, you can easily either 

    A) use Create HTML Table, and pass in the (proper JSON parameter from the Call SAP Function (V2)) and it should make an nice table in the Email. But it could be very large.

     

    B) Use the Create File (SharePoint) or Create File(OneDrive) to create a new file. You would pick the location in the Action, you would pick the Folder etc. And you would supply the Content which again, is the value or other property from the Call SAP Function (V2) step.

     

    --After using Create File, that action will have a property for Content we want to use that as an Attachment in our Email.

     

    --Use Send Email V(2) or (V3 if its there).

    In the Email To: fill that out,

    Fill out the Subject

    Now in the Body

    --If you used the Create HTML Table, then you would want to put ITS Dynamic Content output here in the table

    --If you used Option B and want to attach it, then you would click Advanced options for the email. In the Attachment Name give it a name, in the Content, use the Dynamic Content property probably called Content or File Content, from either your SharePoint or OneDrive create file.

     

    And bingo done.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard

Featured topics