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 use add a new r...
Power Automate
Answered

how to use add a new row in selected environment action to add work queue item directly

(4) ShareShare
ReportReport
Posted on by 67
Hi ,
 
in power automate desktop, am trying add a new row in selected environment action 
my use case is - I want to add a new queue item using this Dataverse action - i have passed environment, table as work queue item, work queue Id, name, input as json , status, status reason  But every time m getting cloud connector failed bad request error 
 
Could anyone plz help me on it.
I have the same question (0)
  • chiaraalina Profile Picture
    2,425 Super User 2026 Season 1 on at
    Hi 
     
    Can you please share your action input (screenshot or JSON body) and the exact error details?
     
    Thanks!
  • sumit_artesian Profile Picture
    261 on at
     
    You get a bad request error when you have incorrectly bound your inputs to the action. Formatting mismatch, missing mandatory fields, stuff like that. Could you please share a screenshot or JSON of how you have configured your inputs for the action? It would greatly help us debug your issue.
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    Based on your scenario, the error is most likely due to one of these:
    • Queue Name used instead of Queue GUID
    • Raw JSON object passed into Input field
    • Invalid Status / Status Reason values
    These are the most common reasons for:
     
    Cloud connector failed: Bad Request
  • Suggested answer
    Haque Profile Picture
    3,653 on at

    Can you please check these items?

    Correct Table Name: The table name should be the logical name of the Dataverse table, e.g., workqueueitems (not "work queue item" with spaces). Confirm the exact table name in your Dataverse environment.

    Required Fields and Data Types: Ensure you provide all required fields for the workqueueitems table.  Common required fields include:

    • workqueueid (lookup to the parent work queue, must be a valid GUID)
    • name (string)
    • input (JSON string or text)
    • statuscode (status reason, integer)
    • statecode (status, integer)

           Note: The workqueueid must be passed as a GUID string, not just a name.

     

    JSON Input Format: The input field expects a JSON string. Make sure it is properly serialized and escaped if needed.

    Field Names and Values: Use the exact schema names for fields (e.g., workqueueid, name, input, statecode, statuscode). Avoid spaces or display names.

    Environment and Connection: Confirm the environment parameter matches the target Dataverse environment. Ensure your connection has permissions to create records in the workqueueitems table. Example of Adding a Work Queue Item:
    • Environment: Your environment name or ID
    • Table: workqueueitems
    • Fields:
      • workqueueid: "GUID-of-work-queue"
      • name: "Item Name"
      • input: "{\"key\":\"value\"}" (JSON string)
      • statecode: 0 (Active)
      • statuscode: 1 (Ready)
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!

     
  • NA-03061633-0 Profile Picture
    67 on at
    @Haque if i am selecting status as queued/hold then it working fine adding item into the queue but when i am selecting status as error then its throwing error. Can we add queue item with error status code
  • Verified answer
    Haque Profile Picture
    3,653 on at
     
    In Dataverse, when adding a new queue item via Power Automate Desktop, setting the status to "Error" often causes a bad request error.
     
    What you can do 
    1. Create the queue item with a valid initial status like Queued or Hold.
    2. Then, if needed, update the status to Error later via a separate update action or through the system’s error handling.
    3. Alternatively, check if your environment or customizations allow setting the error status on creation (rare and usually not recommended).
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • Verified answer
    Valantis Profile Picture
    6,735 on at
     
    To answer your specific question: no, you cannot create a new work queue item directly with Error status.
    This is by design in how Dataverse enforces state transitions for the workqueueitem table.

    The Error status (statuscode 4) is a processing state that items transition into during or after processing when something fails. Items can only be created with Queued status (statuscode 0) or On Hold (statuscode 2). Attempting to create directly with Error status violates the state machine rules and Dataverse returns Bad Request.

    The correct approach is what Haque suggested: create the item with Queued status first, then use a separate Update a row action immediately after to change the status to Error if you need it in that state from the start.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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 Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard