# Connector / Mail Example

In this example we will create a workflow in Azure Logic App that sends out an email as soon as new response is recorded.

Start with a new logic apps in your Azure portal.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MhxQjEb3bqsv1BL1fAS%2F-MhxSxB6udaK38aTOUqF%2Fimage.png?alt=media\&token=366d3540-0ada-4cef-9eaf-8572ecc50f7c)

In the Logic app designer of your Logic app select the ngSurvey connector that you have created.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MhxQjEb3bqsv1BL1fAS%2F-MhxUFt8hGPtdtQ749Hv%2Fimage.png?alt=media\&token=c135d819-053a-4e2b-ba73-4823d606b8b1)

Select the On response submission trigger.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MhxQjEb3bqsv1BL1fAS%2F-MhxUPGI9DHWGzm6qoi8%2Fimage.png?alt=media\&token=16dabb8b-8f2b-4f49-8488-938c3ebf4121)

Attach a connection to your connector. The API key can be found in the [developer tab](https://docs.ngsurvey.com/personal-account/developer) of your [account ](https://docs.ngsurvey.com/personal-account/account-settings)page.&#x20;

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MhxQjEb3bqsv1BL1fAS%2F-MhxUXzveEvHcQ50lmup%2Fimage.png?alt=media\&token=7f015d54-f2f7-49b4-a86c-b452b3f6771d)

{% hint style="warning" %}
The API key must be prefixed by the Bearer keyword. eg:\
Bearer YourAPIKey
{% endhint %}

Now that your connection is up and running you can select the survey that you want to monitor for new submissions.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MhxVLEP30VQmpPrz06g%2F-MhxXzVQkT-Bv_ph1h0-%2Fimage.png?alt=media\&token=32af0571-1ab9-4086-a57a-d7d7fc91595e)

For this simple example we will connect a Send Email connector, this connector will be triggered each time ngSurvey records a new respondent in the selected survey.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MhxVLEP30VQmpPrz06g%2F-MhxYRsTNMbsGNimU_e2%2Fimage.png?alt=media\&token=e9d3ceeb-92df-4d91-bead-acf99f365004)

As you can see on the right you may also use any of the posted answers of the respondents in your connectors for further processing.
