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 Apps / Can't pass date input ...
Power Apps
Answered

Can't pass date input from adaptive card to Excel "Add a row into a table" flow

(2) ShareShare
ReportReport
Posted on by 14
In Copilot Studio I have a topic that triggers when a user wants to add a new row to an excel spreadsheet in sharepoint. The topic has an adaptive card that users enter several fields including DateLoaned, ExpectedReturnDate and ActualReturnDate. When the submit button is clicked, the next node is an Excel "Add a row into a table" flow and I map all the parameters from the adaptive card into the flow inputs. All the parameters are passed as strings, including the 3 date fields. If I just run the flow by itself, it works fine and Excel row is added successfully. However, when I test the topic and enter the data using the adaptive card, I always get an error saying type mismatch. Can anyone help me to fix this? Below are the details:
 
Adaptive Card Payload
{
    "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.5",
    "body": [
        {
            "type": "TextBlock",
            "text": "New Equipment Loan Entry",
            "size": "Large",
            "weight": "Bolder"
        },
        {
            "type": "Input.ChoiceSet",
            "id": "Category",
            "label": "Category",
            "isRequired": true,
            "errorMessage": "Category is required",
            "choices": [
                {
                    "title": "USB Video Bars",
                    "value": "USB Video Bars"
                },
                {
                    "title": "Android Video Bars",
                    "value": "Android Video Bars"
                },
                {
                    "title": "Room PCs",
                    "value": "Room PCs"
                },
                {
                    "title": "Touch Controllers",
                    "value": "Touch Controllers"
                },
                {
                    "title": "Conference Phones",
                    "value": "Conference Phones"
                },
                {
                    "title": "Desk Phones",
                    "value": "Desk Phones"
                }
            ]
        },
        {
            "type": "Input.Text",
            "id": "Model",
            "label": "Model",
            "errorMessage": "Model is required"
        },
        {
            "type": "Input.Text",
            "id": "SerialNumber",
            "label": "Serial Number",
            "isRequired": true,
            "errorMessage": "Serial Number is required"
        },
        {
            "type": "Input.Number",
            "id": "Quantity",
            "label": "Quantity",
            "min": 1,
            "isRequired": true,
            "errorMessage": "Quantity must be at least 1"
        },
        {
            "type": "Input.Date",
            "id": "DateLoaned",
            "label": "Date Loaned",
            "isRequired": true,
            "errorMessage": "Date Loaned is required"
        },
        {
            "type": "Input.Date",
            "id": "ExpectedReturnDate",
            "label": "Expected Return Date",
            "isRequired": true,
            "errorMessage": "Expected Return Date is required"
        },
        {
            "type": "Input.Date",
            "id": "ActualReturnDate",
            "label": "Actual Return Date"
        },
        {
            "type": "Input.ChoiceSet",
            "id": "LoanStatus",
            "label": "Loan Status",
            "errorMessage": "Loan Status is required",
            "choices": [
                {
                    "title": "Available",
                    "value": "Available"
                },
                {
                    "title": "On Loan",
                    "value": "On Loan"
                },
                {
                    "title": "Returned",
                    "value": "Returned"
                }
            ]
        },
        {
            "type": "Input.Text",
            "id": "CustomerCompany",
            "label": "Customer Company",
            "isRequired": true,
            "errorMessage": "Customer Company is required"
        },
        {
            "type": "Input.Text",
            "id": "CustomerContact",
            "label": "Customer Contact",
            "isRequired": true,
            "errorMessage": "Customer Contact is required"
        },
        {
            "type": "Input.Text",
            "id": "CustomerEmail",
            "label": "Customer Email",
            "style": "Email",
            "isRequired": true,
            "errorMessage": "Valid email is required"
        },
        {
            "type": "Input.Text",
            "id": "CustomerPhone",
            "label": "Customer Phone",
            "style": "Tel",
            "errorMessage": "Customer Phone is required"
        },
        {
            "type": "Input.Text",
            "id": "AccountManager",
            "label": "Account Manager",
            "errorMessage": "Account Manager is required"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Submit",
            "data": {
                "action": "createRecord",
                "entity": "EquipmentLoan"
            }
        }
    ]
}
 
Adaptive Card Schema
kind: Record
properties:
  AccountManager: String
  action: String
  actionSubmitId: String
  ActualReturnDate: String
  Category: String
  CustomerCompany: String
  CustomerContact: String
  CustomerEmail: String
  CustomerPhone: String
  DateLoaned: String
  entity: String
  ExpectedReturnDate: String
  LoanStatus: String
  Model: String
  Quantity: Number
  SerialNumber: String
 
Flow Step 1: When an agent calls the flow
{
  "type": "Request",
  "kind": "Skills",
  "inputs": {
    "schema": {
      "type": "object",
      "properties": {
        "text": {
          "description": "Please enter your input",
          "title": "Category",
          "type": "string",
          "x-ms-content-hint": "TEXT",
          "x-ms-dynamically-added": true,
          "enum": [
            "Video Bars",
            "USB Video Bars",
            "Touch Controllers",
            "Room PCs",
            "Conference Phones",
            "Desk Phones"
          ]
        },
        "text_1": {
          "description": "Please enter your input",
          "title": "Model",
          "type": "string",
          "x-ms-content-hint": "TEXT",
          "x-ms-dynamically-added": true
        },
        "text_2": {
          "description": "Please enter your input",
          "title": "SerialNo",
          "type": "string",
          "x-ms-content-hint": "TEXT",
          "x-ms-dynamically-added": true
        },
        "number": {
          "description": "Please enter a number",
          "title": "Quantity",
          "type": "number",
          "x-ms-content-hint": "NUMBER",
          "x-ms-dynamically-added": true
        },
        "date": {
          "description": "Please enter or select a date (YYYY-MM-DD)",
          "format": "date",
          "title": "DateLoaned",
          "type": "string",
          "x-ms-content-hint": "DATE",
          "x-ms-dynamically-added": true
        },
        "date_1": {
          "description": "Please enter or select a date (YYYY-MM-DD)",
          "format": "date",
          "title": "ExpectedReturnDate",
          "type": "string",
          "x-ms-content-hint": "DATE",
          "x-ms-dynamically-added": true
        },
        "date_2": {
          "description": "Please enter or select a date (YYYY-MM-DD)",
          "format": "date",
          "title": "ActualReturnDate",
          "type": "string",
          "x-ms-content-hint": "DATE",
          "x-ms-dynamically-added": true
        },
        "text_3": {
          "description": "Please enter your input",
          "title": "LoanStatus",
          "type": "string",
          "x-ms-content-hint": "TEXT",
          "x-ms-dynamically-added": true,
          "enum": [
            "On Loan",
            "Returned",
            "In Transit"
          ]
        },
        "text_4": {
          "description": "Please enter your input",
          "title": "CustomerOrganization",
          "type": "string",
          "x-ms-content-hint": "TEXT",
          "x-ms-dynamically-added": true
        },
        "text_5": {
          "description": "Please enter your input",
          "title": "CustomerContact",
          "type": "string",
          "x-ms-content-hint": "TEXT",
          "x-ms-dynamically-added": true
        },
        "email": {
          "description": "Enter an email address.",
          "format": "email",
          "title": "CustomerEmail",
          "type": "string",
          "x-ms-content-hint": "EMAIL",
          "x-ms-dynamically-added": true
        },
        "text_6": {
          "description": "Please enter your input",
          "title": "CustomerPhone",
          "type": "string",
          "x-ms-content-hint": "TEXT",
          "x-ms-dynamically-added": true
        },
        "text_7": {
          "description": "Please enter your input",
          "title": "AccountManager",
          "type": "string",
          "x-ms-content-hint": "TEXT",
          "x-ms-dynamically-added": true
        }
      },
      "required": [
        "text",
        "text_1",
        "text_2",
        "date",
        "text_4",
        "text_5"
      ]
    }
  },
  "metadata": {
    "operationMetadataId": "b8f61c18-7224-4f8a-9c5f-72fbce5df764"
  }
}
 
Flow Step 2: Add a row into a table
{
  "type": "OpenApiConnection",
  "inputs": {
    "parameters": {
      "source": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "drive": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "file": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "table": "{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}",
      "dateTimeFormat": "ISO 8601",
      "item/Category": "@triggerBody()?['text']",
      "item/Model": "@triggerBody()?['text_1']",
      "item/SerialNumber": "@triggerBody()?['text_2']",
      "item/Quantity": "@triggerBody()?['number']",
      "item/DateLoaned": "@triggerBody()?['date']",
      "item/ExpectedReturnDate": "@triggerBody()?['date_1']",
      "item/ActualReturnDate": "@triggerBody()?['date_2']",
      "item/LoanStatus": "@triggerBody()?['text_3']",
      "item/CustomerCompany": "@triggerBody()?['text_4']",
      "item/CustomerContact": "@triggerBody()?['text_5']",
      "item/CustomerEmail": "@triggerBody()?['email']",
      "item/CustomerPhone": "@triggerBody()?['text_6']",
      "item/AccountManager": "@triggerBody()?['text_7']"
    },
    "host": {
      "apiId": "/providers/Microsoft.PowerApps/apis/shared_excelonlinebusiness",
      "connection": "shared_excelonlinebusiness",
      "operationId": "AddRowV2"
    }
  },
  "runAfter": {},
  "metadata": {
    "01D25EZCEPRXLWEILCGFBYNPFCSRST4LKX": "/EquipmentLoanTracking/SG_Poly_Customer_Loan_Equipment_Tracking_SampleData.xlsx",
    "tableId": "{6BBFE4C9-4107-4007-885D-4FE415F0426A}"
  }
}
 
The error message I get:
Error Message: The flow 'SGLoanInvAddNew' ('b6f0cf76-f816-f111-8341-00224802e9a7') failed to run with response code 'BadRequest', error code: TriggerInputSchemaMismatch. Error Code: FlowActionBadRequest Conversation Id: b9db9393-1169-419c-b2ca-292c35115db6 Time (UTC): 2026-03-05T02:19:23.877Z
 
Any help would be much appreciated
Categories:
I have the same question (0)
  • Suggested answer
    SebS Profile Picture
    4,826 Super User 2026 Season 1 on at

    Most likely this is caused by the Date_1 and Date_2 fields.

    The Adaptive Card returns the dates in UTC string format, but the Excel table column expects a serialised date value. Because of that mismatch, the flow fails when trying to insert the row.

    You need to convert the incoming value inside the flow before sending it to Excel. For example:

    @if(empty(triggerBody()?['date']), null, formatDateTime(triggerBody()?['date'], 'yyyy-MM-dd'))

    This expression checks if the date is empty and returns null if it is. Otherwise, it converts the incoming value to a format Excel can accept (yyyy-MM-dd).


     
  • Suggested answer
    DP_Prabh Profile Picture
    381 on at

    I think the flow schema and the adaptive card schema the fields should match that's the error you are facing.Copilot Studio sends fields using the Adaptive Card IDs, but your flow expects text/date auto-generated names, causing TriggerInputSchemaMismatch.

    I think these steps would work, please give it a try:

    1. Edit the Flow trigger “When an agent calls the flow”.
    2. Replace the auto-generated parameters (text, text_1, date, etc.) with the same names as the Adaptive Card IDs:
    Category (string)
    Model (string)
    SerialNumber (string)
    Quantity (number)
    
    and other fields...
    3. Update the Excel mapping to use these names:
    Category           -> triggerBody()?['Category']
    Model              -> triggerBody()?['Model']
    SerialNumber       -> triggerBody()?['SerialNumber']
    Quantity           -> triggerBody()?['Quantity']
    all other fields as well.
    
    4. Make ActualReturnDate optional (allow null) in flow or leave it blank in Excel.
    Matching the names may resolves the error.

    I hope this works for you!

  • Suggested answer
    11manish Profile Picture
    3,333 on at
    The error TriggerInputSchemaMismatch means the data coming from the adaptive card in Microsoft Copilot Studio does not match the schema expected by the flow trigger in Power Automate.

    Your flow works when run manually, but fails from the topic because Copilot sends the adaptive card payload differently than the flow schema expects.
  • Verified answer
    CU05030153-0 Profile Picture
    14 on at
    Thanks folks. I managed to resolve the issue using this method Fix Adaptive Card Date Issues with Power Automate

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard