๐ŸŽ‰ 1Flow is proudly backed by Y Combinator.
logo

Introduction

Our webhooks make it simple to receive real-time user response data from 1Flow, and for your systems to communicate back.
When you enable webhook alerts, each time a new survey response is collected by 1Flow, we will send you the response data, along with contextual information (such as the user identity and the details of the trigger event).
For example, let's say you are developing a meditation ๐Ÿง˜โ€โ™€๏ธ app, and have implemented a post-meditation survey for user to rate their experience (expand to read more).

Subscribing to Alerts

Before you receive any events, you need to define the URL that we should send the HTTP POST requests to. POST requests will have aย content-typeย ofย application/json.
  • Step 2: Click on the Project Setting tab. On this page go to Project webhook alerts section.
  • Step 3: Enter a URL that we should send the HTTP POST requests to.
  • Step 4: Check the checkbox that enables us to send you alerts.
  • Step 5: Click the โ€œSaveโ€ button to confirm your alerts.
Note: make sure to check the box that enables us to send alerts to you. If the checkbox is un-selected, you will not receive any alerts.

Responding to Alerts

For webhook events/alerts, your server should respond within 10 seconds with a HTTP 200 status code to indicate you have successfully received the message. If we receive anything other than a HTTP 200 (or if there is no response within 10 seconds) we will retry the call to your webhook URL every 60 minutes for a maximum of 3 days.

Webhook Payload

Here is an example of webhook data you can expect to receive from our server.
json
{ alert_name: "xxx", alert_id: "xxxxx", project_name: "xxx", survey_id: "xxx", platform: "xxx", survey_info: { name: "xxxx", description: "xxxx", platforms:"[iOS,android,....]", trigger_event_name: "xxx,xxx,.....", screens:[ { title: "xxxxx", answer: "xxxxxx", type: "xxxxxx" }, .... ] } user: { user_system_id: "xxx", parameters: { xxx: "yyy" } } trigger_event: { event_name: "xxx", //submited trigger event name created_on: "xxxx", //event created timestramp(Miliseconds) parameters: { //event extra parameters if submited then { key:value } else {} xxx: "yyy" } } }

Webhook Implementation

Object (Webhook Response object in details)

survey_id: string
alert_id: hexadecimal string
project_name: string
platform: string
survey_info: object
user: object
trigger_event: object

Helpful?