# Create a Zendesk Ticket

This tutorial will guide you through the process of automatically creating a ticket in Zendesk from your application.

\#Connecting your Zendesk account

In the **Console**, go to **Integrations > Connected Accounts** and make sure to connect your [Zendesk](../../integrations/zendesk) account to Airkit.

Then, once in your application, go to **Settings > Integrations**, add the Zendesk adapter in **Name** and select the connected account you have just created.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-4b87c4597b838c2decd84b8e766ffb6f8a278269%2Fzendesk-integration-v180-0.png?alt=media)

\#Building the application’s UI

In **Web Flows** Builder add a Web Flow with two Web Pages and follow these steps:

1. Rename the first Web Page to “Ticket” and the second one to “Thank you”.
2. To the Ticket Web Page, add a **Label** Control for the heading asking the user to enter the ticket details. You can choose the headingLarge Variant.
3. Then, add a **Text Input** and a **Text Area** Web Controls as well as a **Label** for each of them. One of the labels will indicate the user to enter the subject of the ticket, and the other one its description.
4. Then, add a **Button** Control and rename it to “Submit”.
5. Finally, double click on the auto-created Variables to give them a more transparent name: `subject` and `description`.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-9bc53a3c2a61ca73a75558e7f283b8824d800243%2Fzendesk-integration-v180-1.png?alt=media)

6. With the “Submit” button selected, go to **Actions** in the Inspector section and add a **Navigate to Web Page** action. Select the Thank you Web Page from the dropdown.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-23d5f3177a5bd47dcc909cd8b19a659f98719e44%2Fzendesk-integration-v180-2.png?alt=media)

7. Now go to the Thank you Web Page and add a **Label** Control to enter the thank you message. You can use a headingMedium Variant.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-2caba42846df54d6d6b07dfa973d5f58e0de30f3%2Fzendesk-integration-v180-3.png?alt=media)

8. Save the app.

## Submitting the ticket through a Data Flow

Go to **Connections** and add a Data Flow. Rename it to “Create Zendesk Ticket”. Then, in **Start**, add two Inputs of type Text, one for `subject` and one for `description`.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-5add263db8f5f2fd9f1c146d26a40c74c7ec4d34%2Fzendesk-integration-v180-4.png?alt=media)

Then add the [Zendesk Data Operation](../../data-operations/the-zendesk-data-operation).

In **Data Source**, select the integration and in **Operation**, choose **Create ticket (Create Ticket)**. Then select a requester and in **Tickets Fields > Subject** enter the `subject` variable. Choose the description’s format and enter the `description` variable in **First Comment/Description**. You can also include tags.

To make sure the Data Operation works as expected, click on **Run** and test it.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-e670cc2b8d163d865def8b7c943508bcdeef104c%2Fzendesk-integration-v180-5.png?alt=media)

\#Hooking up the connection

Go to **Web Flows** Builder and select the Ticket Web Page. Add the **Run Data Flow** action to the Submit Button and enter the `subject` and `description` Variables for the Inputs.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-b8eea1fe7a981b6a0c867c20978055eec8fb2b4c%2Fzendesk-integration-v180-6.png?alt=media)

This way, when users click on the button, the Zendesk Data Flow will run, thus creating the ticket in Zendesk before moving to the Thank You Web Page.

Check your Zendesk instance to make sure the ticket was created.
