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;
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;
Child Flow to sending email;
Detail of Parse JSON in Child Flow;
Result of Parse JSON in Child Flow after Test Run;
What set in Sending Email action with Parse JSON result;
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": "出席"
}
]
}
}
Solved! Go to Solution.
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.
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower 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.
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.
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsI tried to add "compose" as per your advice;
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.
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsDive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
45 | |
43 | |
38 | |
36 | |
23 |
User | Count |
---|---|
47 | |
31 | |
29 | |
29 | |
28 |