cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Value could not be input via Parse JSON Object to String

I'm developing PowerApps and PowerAutomate;

PowerApps trigger => [JSON] => Parent Flow => [Add Data] => [JSON] => Child Flow => Sending Email

At the final, "Sending Email" had error;

ks4050kt_4-1596377687622.png

It simply says "To" value (=email address) to be filled. (but not only "To" also other string not be shown in sending email action)

The value was generated by Parse JSON, but not appeared in Sending Email action...

What is incorrect to set and run Parse JSON??

Parent Flow after receive JSON from PowerApps;

 

ks4050kt_0-1596378565302.png

 

 

ks4050kt_0-1596377658089.png

Child Flow to sending email;

ks4050kt_1-1596377668478.png

Detail of Parse JSON in Child Flow;

ks4050kt_2-1596377675546.png

Result of Parse JSON in Child Flow after Test Run;

ks4050kt_3-1596377681874.png

What set in Sending Email action with Parse JSON result;

ks4050kt_5-1596377697196.png

Input Content of Parse JSON;

 

{
  "body": {
    "Email": "ks4050kt@power.com",
    "Applicant": "ks4050kt",
    "Dept": "PowerAutomate",
    "DateOfApplication": "2020-08-02 23:05:41Z",
    "Cur_1": [
      {
        "CurriculumCategory": "1. Alteryx",
        "Selection": "欠席"
      },
      {
        "CurriculumCategory": "2. Power BI",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "3. Power Automate",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "4. UiPath",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "5. Data Analysis",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "6. Power Apps",
        "Selection": "出席"
      }
    ]
  }
}

 

Scheme of Parse JSON;

 

{
  "type": "object",
  "properties": {
    "Email": {
      "type": "string"
    },
    "Applicant": {
      "type": "string"
    },
    "Dept": {
      "type": "string"
    },
    "DateOfApplication": {
      "type": "string"
    },
    "Cur_1": {
      "type": "array"
    }
  }
}

 

 Output of Parse JSON;

 

{
  "body": {
    "Email": "ks4050kt@power.com",
    "Applicant": "ks4050kt",
    "Dept": "PowerAutomate",
    "DateOfApplication": "2020-08-02 23:05:41Z",
    "Cur_1": [
      {
        "CurriculumCategory": "1. Alteryx",
        "Selection": "欠席"
      },
      {
        "CurriculumCategory": "2. Power BI",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "3. Power Automate",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "4. UiPath",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "5. Data Analysis",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "6. Power Apps",
        "Selection": "出席"
      }
    ]
  }
}

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @ks4050kt 

 

Thanks for your quick reply.

 

Try to regenerate the schema of your Parse JSON again.

 

See below how to add a compose and map. Once it failed you can check the run history and see the compose value.

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

6 REPLIES 6
Super User III
Super User III

Hi @ks4050kt 

 

I have tested using your sample data using Parse JSON. Yes it is extracting the email attribute as expected. 

 

You haven't shown the runtime failures and run history values of your child flow. The screen shot you provided is the parent flow and its difficult to analyse the error.

 

Add a compose above the send email and map the email attribute. Check the run history and see what it returned.

 

For me it looks like there are situations email is not passed to child flow hence you getting the error. Check your PowerApp and see if email is mandatory or not? Looks like there is a data quality issue here.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

@abm Thank you for your respond.

Actually below is the result what Child Flow ran and got;

{
  "body": {
    "Email": "ks4050kt@power.com",
    "Applicant": "ks4050kt",
    "Dept": "PowerAutomate",
    "DateOfApplication": "2020-08-02 23:05:41Z",
    "Cur_1": [
      {
        "CurriculumCategory": "1. Alteryx",
        "Selection": "欠席"
      },
      {
        "CurriculumCategory": "2. Power BI",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "3. Power Automate",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "4. UiPath",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "5. Data Analysis",
        "Selection": "出席"
      },
      {
        "CurriculumCategory": "6. Power Apps",
        "Selection": "出席"
      }
    ]
  }
}

Hence variable "Email" received the value, but it could not be passed to Email Sending action.

If I need to use compose to convert it, I'm not sure how to use compose action.

Previously the same child flow was working well, but changed the parent flow JSON. Originally PowerApps gave information with string directly by each items, but now PowerApps provided Array in JSON, then information is once parsed and initialized again in parent flow.

I assume this operation caused current matter, but I'm not sure what did it.

Thank you for your further advice.

Super User III
Super User III

Hi @ks4050kt 

 

Thanks for your quick reply.

 

Try to regenerate the schema of your Parse JSON again.

 

See below how to add a compose and map. Once it failed you can check the run history and see the compose value.

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

@abm 

I tried to add "compose" as per your advice;

ks4050kt_0-1596414253628.png

Originally my variable contain Array in Object, is it possible to handle this type nesting variable??

{
  "": "",
  "Cur_1": [
    {
      "": "",
      "": ""
    }
  ]
}

Finally I got the successful result;

{
  "type": "object",
  "properties": {
    "body": {
      "type": "object",
      "properties": {
        "Email": {
          "type": "string"
        },
        "Applicant": {
          "type": "string"
        },
        "Dept": {
          "type": "string"
        },
        "DateOfApplication": {
          "type": "string"
        },
        "Cur_1": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "CurriculumCategory": {
                "type": "string"
              },
              "Selection": {
                "type": "string"
              }
            },
            "required": [
              "CurriculumCategory",
              "Selection"
            ]
          }
        }
      }
    }
  }
}

Parse JSON scheme was incorrect, to be generated from sample.

Thank you so much everyone's support.

Super User III
Super User III

Hi @ks4050kt 

 

Thanks for your message.  The schema you provided was returning the email. I did mentioned earlier to generate the schema again. If you happy with the response please mark it as solution accepted.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,045)