How do I use webhooks to send data to other applications?

Mopinion offers the possibility to integrate feedback data into other applications using webhooks. It is possible to set up a webhook to connect to Slack, Rocket.chat, Trello and Asana. There is also a possibility to create a webhook for a general JSON payload. This is useful when you want to connect to an application other than the ones listed above. In that case, you'll most likely want to connect to a third party like Zapier.

To start working with webhooks you will need three things:

  • A feedback form that acts as a data source

  • An endpoint where the feedback data will be sent to

  • A webhook in Mopinion that posts to that endpoint

We are going to assume that you already have at least one form, if that is not the case then you can follow this article to get started with that first.

Add a data source

Webhook settings are accessible through Integrations > Webhooks. Click on ‘New webhook’ and select webhook type.

Create an endpoint

Creating an endpoint for the incoming webhooks differs per program:

Slack

  • Create a Slack app

  • Enable Incoming Webhooks from the settings page

  • After the settings page refreshes, click Add New Webhook to Workspace

  • Pick a channel that the app will post to, then click Authorize

  • Use the Webhook URL to post messages to Slack

Rocket.chat

  • Go to the Rocket.chat admin page and click on Integrations

  • Create a New Integration and select Incoming WebHook

  • Select the channel where you will receive the alerts

  • Set Script Enabled to True

  • Paste your script inside the Script field

  • Save the integration

  • Use the WebHook URL to post messages to Rocket.chat

Trello

  • Log in to Trello and get an API key here: https://trello.com/app-key

  • On the Mopinion webhooks page, fill in your username and API key and connect to Trello

  • A new page will open, copy the code and paste it into the token field on the Mopinion webhook page

  • Set your token, your boards and lists will be loaded

  • Select the correct board and list for your webhook

  • Click 'generate credentials', and save your webhook

Asana

  • Make sure you are logged in to your Asana account

  • On the Mopinion webhooks page, choose Asana and press retrieve API token

  • A new page will open, copy the code and paste it into the token field on the Mopinion webhook page. your Asana workspaces will be loaded

  • Select the correct workspace and board for your webhook and click on generate credentials, and save your webhook

Setting up the webhook conditions

Now that you have created an endpoint, all that is left to do is set up the conditions for when feedback results should be sent. First, select the data source you would like to use, then, give the webhook a name.

  • The Active toggle determines if the webhook is active or paused.

  • Choose the feedback fields you want to post. For example, if you only want to send the score and the feedback comment. The default for this function is all parameters ('all data inside feedback item'). You can specify parameters with an alias. In that case, you’ll select the parameter and type in the alias next to it.

  • In Send webhook the condition is set for when the results should be sent, the default value is for all new feedback items.


That's it, you are now all set up to receive incoming feedback in the application of your choice! If you have any questions do not hesitate to ask our support team.