Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article, you can see an example of the output of the webhooks and the API. We used Pipedream to create an endpoint for our test. For more information on how to create an outgoing webhook, please take a look at this article: How do I create an outgoing webhook?

Example of an outgoing JSON webhook

Code Block
{
  "body": {
    "_event": {
      "type": "feedback.created",
      "created": 1606898800
    },
    "feedback": {
      "_type": "object",
      "_data": {
        "id": 3759277,
        "project_id": 1329,
        "created": "2020-12-02",
        "survey_id": 15479,
        "active": true,
        "anonymised": 0,
        "fields": {
          "_type": "list",
          "_data": [
            {
              "label": "RATING0",
              "value": "1"
            },
            {
              "label": "TEXTAREA1",
              "value": "gfhfgh"
            },
            {
              "label": "RADIO2",
              "value": "radio 1"
            },
            {
              "label": "check 2",
              "value": "true"
            },
            {
              "label": "User Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0"
            },
            {
              "label": "url",
              "value": "https://app.mopinion.com/survey/manage/preview/8ad09e3a04b8d1f7e3109a0be590daf9f660eac9"
            },
            {
              "label": "Page title",
              "value": "Survey Preview"
            },
            {
              "label": "Survey",
              "value": "Difference API Webhook"
            },
            {
              "label": "Viewport",
              "value": "1280x551"
            },
            {
              "label": "Form trigger",
              "value": "passive"
            },
            {
              "label": "Form completion percentage",
              "value": "100"
            },
            {
              "label": "Survey ID",
              "value": "dd41gql41f"
            },
            {
              "label": "Datetime",
              "value": "2020-12-02 16:55:17"
            },
            {
              "label": "OS",
              "value": "Windows 10"
            },
            {
              "label": "Browser",
              "value": "Firefox 83.0"
            }
          ]
        },
        "customer": {
          "_type": "object",
          "_data": {
            "firstname": "gf",
            "lastname": "dfg",
            "email": "dfg@gmail.com",
            "phone": "1478900987654"
          }
        }
      }
    }
  }
}

Easy html macro
theme{"label":"solarized_dark","value":"solarized_dark"}
contentByMode{"html":"<div id=\"surveyContent\"></div>","javascript":"var confluenceData = {};\nvar pageId;\nvar pageTitle;\n\ntry {\n confluenceData = JSON.parse(parent.window.name);\n var pageId = confluenceData.options.productContext['page.id'];\n var pageTitle = confluenceData.options.productContext['page.title'];\n} catch(e) {}\n\nvar src = 'https://collect.mopinion.com/assets/surveys/2.0/js/survey.min.js';\n\nvar vars = {\n key:'211a4fdb96626776846147095cc335b448e20458', \n domain:'app.mopinion.com', \n divName:'surveyContent', \n button:false, \n use_collect:false, \n useQuerySelectorAll:false\n};\n\nvar s = document.createElement('script');\ns.async = 'async';\ns.id = 'mopinionFeedbackScript';\ns.src = src;\ns.onload = s.onreadystatechange = function() {\n if (!s.readyState || s.readyState === 'loaded' || s.readyState === 'complete') {\n try {\n srv.loadSurvey(vars);\n } catch (e) {}\n }\n}\ndocument.head.appendChild(s);","css":""}