Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Adding a date not in a card on a form to an automated email in a flow

(1) ShareShare
ReportReport
Posted on by 82
Hello!  I have a canvas app with a button to send an email through a power automate flow.  It works perfectly. 
 
I've been asked to add a due date that will appear in that email when the user clicks the send button in the app.  The date does not need to part of the Microsoft List that the form feeds nor do I need to keep record of it, so I simply inserted a date picker into my pop-up.  Now, I am trying to figure out how to get that date into the body of my email and I can't find a solution.
 
Any help would be appreciated!
 
 
  • Verified answer
    Jukie Profile Picture
    82 on at
    Adding a date not in a card on a form to an automated email in a flow
    @FLMike
     
    Thanks for your response.  Great questions.  It is because of those questions and trying to write out my explanation that I found the errors and made it work finally.  Below are all my missteps.  Hope it helps someone else as well.
     
     
    Steps:
    First Attempt: I tried just going to my flow and searching for the field under Dynamic Content.  It wasn't there so it dawned on me that there was nothing pulling it in from the Canvas App since it was not under Get Items.
     
    Second Attempt:
    I added it to the data being pulled in from the form. In my Canvas App, I have multiple multi-select combo boxes that I needed in my email formatted as a list.  I accomplished that by adding to my save button labeled "Send Export Email" under OnSelect the following code:
    ConferenceAttendeeEmail.Run(DataCardValue36.Text,
    Coalesce(Concat(DataCardValue23.SelectedItems, Value & "<br>"), "None"),
    Coalesce(Concat(DataCardValue19.SelectedItems, Value & "<br>"), "None"), ETC.
     
    I added them into my flow as follows.  They then appeared under my Dynamic Content in order to use in my email.
     
    I add the DueDate to the OnSelect coding above (DueDate.SelectedDate), but I got the error "Invalid number of arguments: received 12, expected 11".  When I added DueDate to the Power Apps (v2) in my flow as a date input, that error was corrected. (Took two tries since at first I added DueDate to my code in the Canvas App after DataCard Value36, not remembering that the code in the Canvas App needs to match the order of the input being added under Power Apps (V2).  It worked when I added DueDate at the end of the code.)
    ConferenceAttendeeEmail.Run(DataCardValue36.Text,
    Coalesce(Concat(DataCardValue23.SelectedItems, Value & "<br>"), "None"),
    Coalesce(Concat(DataCardValue19.SelectedItems, Value & "<br>"), "None"),
    DueDate.SelectedDate)
     
     
    However, when I went to my form to test, I get the following error: ConferenceAttendeeEmail.Run failed: { "error": { "code": "TriggerInputSchemaMismatch", "message": "The input body for trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'String '8/5/2024' does not validate against format 'date'.'." } }
     
    The format of the date field in my Canvas App is: DateTimeFormat.ShortDate
    When I added DueDate under Power Apps (V2) it shows: Please enter or select a date (YYYY-MM-DD)
    I found an article that showed how to fix it by changing how the app sends the data to the flow:
    ConferenceAttendeeEmail.Run(DataCardValue36.Text,
    Coalesce(Concat(DataCardValue23.SelectedItems, Value & "<br>"), "None"),
    Coalesce(Concat(DataCardValue19.SelectedItems, Value & "<br>"), "None"),
    Text(DueDate.SelectedDate, "yyyy-mm-dd"))
     
    I was now able to pull the DueDate into my email. :)
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    43,305 Super User 2025 Season 1 on at
    Adding a date not in a card on a form to an automated email in a flow
    Hi
     
    Can you please share what you tried and what didn't work? And what didn't work means?
     
    Your send an email V2 looks just fine to me, so 
    1) when you say it doesnt work, is it blank? or is it the wrong date/time?
    2) please, above the Send an Email add 2 compose
    In 1, put the From DateTime
    In 2, put the other probably EndDate Time
     
    Let's verify that those 2 composes have data. If not then you have a bug somewhere.
     
    Also please share the expression(s) for the date expressions

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492