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 pass through In...
Power Automate
Unanswered

How to pass through Initialize variable when using a control IF statement? Send email with our without attachment from Microsoft Form.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

 

I am setting up a form that will send an email with all the responses after a Microsoft form has been submitted. I have used a Parse JSON code I found online, paired it with "Initialize Variables", and then "Apply to each" (see picture). It works, BUT, it does not work if there is no attachment. I added a condition where the response detail about attachment is not 0, and the condition logic worked. I added a separate "Send email .." to the If No statement and the email is sent, but the flow fails because the "Apply to Each" does not work as it calls for the Parse JSON that has not been done. 

How can I fix this? 

 

Also, I cannot get the "Send an email... " to send a cc email to the responder's email. I add it in the CC row, but no email is sent. 

 

Parse JSON

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "name": {
                "type""string"
            },
            "link": {
                "type""string"
            },
            "id": {
                "type""string"
            },
            "type": {},
            "size": {
                "type""integer"
            },
            "referenceId": {
                "type""string"
            },
            "driveId": {
                "type""string"
            },
            "status": {
                "type""integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}
 
Screenshot 2022-06-08 094242.png
Categories:

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 July 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 2

#2
11manish Profile Picture

11manish 223 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard