How to Create Scheduled Tickets Using Power Automate and REST API
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:
-
Navigate to the power automate page.
-
Click Create.
-
Select Scheduled cloud flow.
Step 2. Configure the Schedule
-
Enter a name for the flow.
-
Configure the desired frequency (minutes, hours, days, weeks, or months).
-
Click Create.
Step 3. Add an HTTP Action
-
Click the + icon.
-
Select Add an action.
-
Search for HTTP.
-
Select the HTTP action.
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.
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
-
Click Save.
-
Select Test.
-
Run the flow and verify that a ticket is created successfully in BoldDesk.
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
-
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. -
Do I need a BoldDesk API key?
Yes. Authentication is required to create tickets through the BoldDesk REST API. -
Can I create tickets in different brands?
Yes. Specify the appropriate brandId in the request payload to create tickets in the desired brand. -
What happens if the flow runs multiple times?
A new ticket is created each time the scheduled flow executes successfully. -
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.