web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How can convert Store ...
Power Automate
Unanswered

How can convert Store procedure body in table and sent via email in power automate

(0) ShareShare
ReportReport
Posted on by 20

How can convert Store procedure body in table and sent via email in power automate, below is the sample from store procedure

Manojpatidar840_0-1711651328400.png

 

Categories:
I have the same question (0)
  • Andrew_J Profile Picture
    1,962 Moderator on at

    @Manojpatidar840 

     

    Okay so you have some JSON in the following:

     

    Andrew_J_0-1711654130831.png

    I do not understand what you want to do with the above.  I can see from your question that you mention Store which has a field of Department.    Can you pleas give me some more detail in what you want to do.

     

    Regards,

     

    Andrew

  • Manojpatidar840 Profile Picture
    20 on at

    @Andrew_J  Hi there! I'm retrieving data from a stored procedure, which includes fields such as ID, GRVNumber, GRVDate, PONumber, and Department. I'm trying to convert this data into a table format and send it via email. However, I'm facing some issues with JSON formatting. Can you please assist me in resolving this? Thank you!

     

    Or can you please tell me what is the process to sent email as table after retrieving data in store procedure...

  • Andrew_J Profile Picture
    1,962 Moderator on at

    @Manojpatidar840 

     

    Thanks that makes better sense for me now.

     

    The data is in JSON so I would think taking this through a select would then enable you to construct a HTML table that you could insert into an email and send.

     

    Perhaps if you have time you can try and let me know how you get on.

     

    Regards,

     

    Andrew

  • Manojpatidar840 Profile Picture
    20 on at

    @Andrew_J , I am getting below error in Parse JSON "
    ValidationFailed
    The schema validation failed"

     

    I  wrote the below schema, can you please check anything is wrong with that..

    {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "ID": {
    "type": "integer"
    },
    "GRVNumber": {
    "type": "string"
    },
    "GRVDate": {
    "type": "string",
    "format": "date-time"
    },
    "Department": {
    "type": "string"
    },
    "SupplierName": {
    "type": "string"
    },
    "GRVStatus": {
    "type": "string"
    },
    "CreatedBy": {
    "type": "string"
    },
    "PONumber": {
    "type": "string"
    }
    },
    "required": ["ID", "GRVNumber", "GRVDate", "Department", "SupplierName", "GRVStatus", "CreatedBy", "PONumber"]
    }
    }

     

    Thank You 

    Manoj

  • Andrew_J Profile Picture
    1,962 Moderator on at

    @Manojpatidar840 

     

    That looks fine to me but I am concern that all you have done is to take JSON from the body of the image above and put into anther JSON which has not worked.  Imeadilty below the step in the image can you please add a SELECT, then below that a CREATE HTML TABLE.  I assume you are okay with the dynamics of that.

     

    SELECT - use body from image above then map the fields that you want.

    HTML - use the body of the SELECT above.

     

    Once you have tested can you please send me an image of the steps expanded to show the dynamic links and the results of any test in classic UI.

     

    Andrew

     

     

     

     

     

  • Manojpatidar840 Profile Picture
    20 on at

    @Andrew_J Which i shared earlier image it was Body from store procedure not JSON.

     

    Kindly find the below for better understanding.

     

    1:  -Body from SP

    Manojpatidar840_0-1711658251269.png

    2:  - JSON

    Manojpatidar840_1-1711658300614.pngManojpatidar840_2-1711658318895.png

     

    Getting Error in JSON Output

  • Andrew_J Profile Picture
    1,962 Moderator on at

    @Manojpatidar840 

     

    Now I understand better, so it SQL to JSON, I have not delt with this before and have no knowledge of SQL, I am hoping the below may assist if you know more about SQL.

     

    https://powerusers.microsoft.com/t5/Building-Flows/Build-JSON-object/td-p/112517

     

    Andrew

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard