Documentation
Launch Email Verification with Callback

How to Launch Verify Email App with Callback

Overview

This guide will walk you through the process of creating an email collection task app that uses a callback to process the collected emails.

Step 1: Create a new campaign

Create a new campaign: Start by creating a new campaign. Refer this guide to learn how to launch a new campaign: Create and launch a Campaign.

Step 2: Add the Verify Email App

Add the Verify Email App: Add the Verify Email App to your campaign. This app will be used to collect emails from users.

Verify Email App Verify Email App

Step 3: Setup Webhook Callback

Setup Webhook Callback: Add a webhook callback app to your campaign. This webhook will be triggered when the submit button is clicked on the Verify Email App.

Webhook Callback Webhook Callback

Step 4: Configure the Webhook Callback

Configure the Webhook Callback: In the webhook callback app, add the URL of your server endpoint where you want to receive and process the collected emails. Also add "Api Endpoint Secret Phrase" for security.

Webhook Callback

Step 5: Add a trigger to the webhook callback

On the verify email task trigger, add the webhook callback as a trigger. This will ensure that the webhook is triggered whenever a user submits their email.

Webhook Callback

Step 6: Process the collected emails

After setting up your server endpoint, you will start receiving data in the following format whenever a user submits their email:

{
  "userWalletAddress": "0x564534670f21e1705e424fbe51764c1194281997",
  "campaignId": 377,
  "performedAction": {
    "name": "Verify Email",
    "description": "Verify email",
    "app": {
      "id": "EMAIL",
      "actionId": "VERIFY_EMAIL"
    },
    "id": "5230a248b5884c1b9f9a05ce0d20adc4",
    "dependencies": [],
    "triggers": [
      "7c497bff43b740a9b7088cb6985f77a0"
    ],
    "segmentId": "71e49b9932614842a4e4d8daac59769c",
    "campaignId": 377,
    "isWorkingAsTrigger": false,
    "chainStats": {
      "totalSupply": 0,
      "maxSupply": 0,
      "address": "",
      "chainId": 0,
      "totalUniqueMinters": 0,
      "totalHourlyMinters": 0,
      "isMintable": false,
      "releaseDate": "0001-01-01T00:00:00Z",
      "contractType": "",
      "contractId": 0,
      "endDate": "0001-01-01T00:00:00Z"
    }
  },
  "userInputs": {
    "email": "username@gmail.com"
  }
}

In this data, the email submitted by the user can be accessed from the userInputs.email field. You can now process this email as required by your application.

That's it! You have successfully created an email collection task app with a callback.