Category

How to Create Scheduled Tickets Using Power Automate and REST API

Updated:

This article explains how to automatically create tickets at specific intervals using Microsoft Power Automate and the BoldDesk REST API. By using a scheduled cloud flow, you can generate tickets daily, weekly, monthly, or at any custom interval without manual intervention. Explore this article to learn how to create a scheduled flow in Microsoft.

Prerequisites

Before you begin, ensure that you have:

  • A BoldDesk account with API access.
  • A valid BoldDesk API key.
  • Access to Microsoft Power Automate.
  • Permission to create tickets in the target brand.
  • The required Brand, Category, Requester, and Type IDs.

Create a Scheduled Flow

Step 1. Open Power Automate

To generate the tickets in a scheduled flow, follow the given steps:

  1. Navigate to the power automate page.

  2. Click Create.

  3. Select Scheduled cloud flow.

    Scheduled flow.png

Step 2. Configure the Schedule

  1. Enter a name for the flow.

  2. Configure the desired frequency (minutes, hours, days, weeks, or months).

  3. Click Create.

    Flow Name.png

Step 3. Add an HTTP Action

  1. Click the + icon.

  2. Select Add an action.

  3. Search for HTTP.

  4. Select the HTTP action.

    Add an HTTP.gif

Configure the Create Ticket Request

Step 4. Configure the HTTP Request

In the HTTP action, enter the required API details, including the request method, endpoint URL, authentication headers, and request body.

Enter_details.png

Sample Payload below:

{
 "brandId": 1,
 "subject": "Subject of the ticket",
 "categoryId": 11,
 "isVisibleInCustomerPortal": true,
 "requesterId": 1002,
 "description": "Description of the ticket",
 "typeId": 2,
 "tag": "test",
 "priorityId": 1
}

Use your portal values for the categoryId, requesterId, typeId, and brandId.

Test the Flow

Step 5. Save and Test

  1. Click Save.

  2. Select Test.

  3. Run the flow and verify that a ticket is created successfully in BoldDesk.

    Save_and_test.png

If you have selected a flow interval in minutes, make sure to turn off the scheduled flow after the time has elapsed. Otherwise, it will keep generating the tickets continuously.

Troubleshooting

Ticket Is Not Created When the Flow Runs

Possible causes:

  • Invalid API endpoint URL.
  • Incorrect API authentication credentials.
  • Missing required fields in the request payload.

Resolution:

  • Verify the API URL used in the HTTP action.
  • Confirm that the API key and authorization headers are configured correctly.
  • Ensure all required fields such as brandId, requesterId, categoryId, typeId, and subject are included in the request body.

Unauthorized (401) Error

Possible causes:

  • Invalid API key.
  • Missing authorization header.

Resolution:

  • Generate a new API key if necessary.
  • Ensure the authorization header is properly configured in the HTTP request.
  • Confirm that the API key has the necessary permissions to create tickets.

Bad Request (400) Error

Possible causes:

  • Incorrect payload format.
  • Invalid field values.

Resolution:

  • Validate the JSON payload structure.
  • Verify that the provided IDs exist in your BoldDesk account.
  • Ensure data types match the API requirements.

Tickets Are Created Repeatedly

Possible cause:
The scheduled flow remains active and continues to execute based on the configured interval.

Resolution:

  • Review the recurrence settings in the flow.
  • Disable the flow when it is no longer required.
  • Consider adding conditions to prevent duplicate ticket creation.

Invalid Brand, Category, Requester, or Type ID

Possible cause:
IDs used in the payload do not exist or have been deleted.

Resolution:
Retrieve and verify the latest values from your BoldDesk portal before configuring the request.

Flow Runs Successfully but No Ticket Is Created

Possible causes:

  • API response contains validation errors.
  • Required values are missing from dynamic content.

Resolution:

  • Review the flow run history.
  • Inspect the HTTP response body for error details.
  • Ensure all dynamic values are populated correctly before sending the request.

HTTP Action Is Not Available in Power Automate

Possible cause:
The current Power Automate license does not support premium connectors.

Resolution:

  • Verify your Power Automate licensing plan.
  • Ensure the HTTP action is available in your environment before creating the flow.

Frequently Asked Questions

  1. Can I create tickets daily, weekly, or monthly?
    Yes. Power Automate allows you to configure scheduled cloud flows with custom frequencies, including daily, weekly, monthly, or minute-based intervals.

  2. Do I need a BoldDesk API key?
    Yes. Authentication is required to create tickets through the BoldDesk REST API.

  3. Can I create tickets in different brands?
    Yes. Specify the appropriate brandId in the request payload to create tickets in the desired brand.

  4. What happens if the flow runs multiple times?
    A new ticket is created each time the scheduled flow executes successfully.

  5. Can I include dynamic content in the ticket subject or description?
    Yes. Power Automate supports dynamic content, allowing you to populate ticket fields using variables, expressions, or data from other connectors.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied
Access denied
Access denied

No articles or sections found
No articles or sections found