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 thru Settings > Webhooks. All feedback forms that can be used as a source are found under Datasources. Drag the form that you want to use to Webhook Configuration.
When you click on the form that was added to the configutation you are asked to choose which application you want to send to and you need to give the webhook a name.
Create an endpoint
Creating an endpoint for the incoming webhooks differs per program:
- 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
- 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
- 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
- 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.
- The Active toggle determines if the webhook is active or paused.
- The Parameters/Aliasses field can be used to specify what data gets sent, these are 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 feedback data). You can specify parameters with an alias. In that case, you’ll select the parameter and type in the alias next to it.
- In When should a webhook be sent? the condition is set for when the results should be sent, the default value is for each survey result in the survey.
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.