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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to extract key val...
Power Automate
Unanswered

How to extract key value pair through python scripting in PAD

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I need to extract particular email body content and store it in the excel sheet.
I need to extract through python scripting that is available in PAD.

If anyone having an idea then please let me know.

Thanks in advance.

 

I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Anonymous 

     

    How about outputting the results of a Python script as JSON format?

    Then you can use the action "Convert JSON to custom object" in PAD.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for your response.

    Could you please explain me in brief.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Anonymous 

     

    First of all, you already have a way to use Python to output content as key-value pairs from extracted text of the email body, right?

     

    You can do "import json" to refer the JSON library in your Python code, then you can use "json.dumps()" method to format the output text as JSON. So far, it's done on the Python side.

     

    After that, you can use action "Convert JSON to custom object" to convert your Python output from JSON format to a custom object. From now on, it is done on the PAD side.

     

    You can retrieve the value of element in custom object as below format:

    %JsonAsCustomObject['name']%
    %JsonAsCustomObject['salary']%
    %JsonAsCustomObject['skills']%

     

    All that remains is to write those values you get to the Excel cells as usual. 🙂

     

    shindomo_0-1633230575791.png

     

    I hope above is make sense for you.

    Thank you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 227

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard