# Event-based Zendesk workflow

You can also reuse the workflow created by the "Send post-resolution email campaign' or Create an event-based workflow in Qwary to map your response data into Zendesk.

**Generate a token for the Zendesk account**

1. Log into your Zendesk account and go to 'Admin Center'
2. Go to Apps & Integrations --> API --> Zendesk API
3. Enable 'Token Access' --> Click on 'Add API Token'

<figure><img src="https://200033457-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFuOzEbrJHuJpXBuk7JJ%2Fuploads%2Fb2dGBKbDJ8Rp2YKA1BhW%2Fimage.png?alt=media&#x26;token=b825944e-28ad-4b5b-b614-852091e6d626" alt=""><figcaption></figcaption></figure>

4. Enter the API token description and copy Token Value. Make sure to copy and store this token. We won't show it again after you click Save or leave this page.

**Create event-based workflow**

1. Create an event-based workflow from Workflow --> Create new workflow --> Enter name --> and click "Create".
2. Click on Add a Trigger and select the survey you created for "the post-resolution[ email survey campaign.](https://help.qwary.com/product-guide/workflows/zendesk-workflow/send-post-resolution-email-surveys-campaign)
3. Add 'Salesforce - Update a case/opportunity with rating and survey response in SalesForce.'
4. Connect your Zendesk account with the API Token, which you copied in step 4 of "**Generate a token for the Zendesk account."**
5. Select score and comment questions for the task. Depending on the matrix you are collecting, the score questions can be NPS, Satisfaction Score, or Effort Score questions from your survey. A comment question is an open-ended comment question from your survey.

<figure><img src="https://200033457-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFuOzEbrJHuJpXBuk7JJ%2Fuploads%2FywnS8O35UEhviHZd1hyC%2Fimage.png?alt=media&#x26;token=7ab7045d-7236-477f-a60b-24c20d16010a" alt=""><figcaption></figcaption></figure>

1. Click on save.
2. Active the workflow.

Once the workflow is active, when a new response is received for a ticket survey, response data will be mapped to Zendesk.
