# Email Verification

## Before You Start:

{% hint style="info" %}
**IMPORTANT**: Please ensure the action is placed somewhere other than the Signup form itself. Adalo is still in the process of signing the user up when the action is performed, so no email address is available yet to send the verification to. Best practice is to add the action to the code screen itself or a subsequent onboarding button. Please see [Part 2](https://www.youtube.com/watch?v=SsD9vAHFCaA) of the video tutorial for more on this.
{% endhint %}

{% hint style="info" %}
Once you implement this action in your app, you and your users must use a valid email address for signup. Best practice is to build this functionality in when you are almost finished building your app or after you have created several test users with fake emails.
{% endhint %}

## Video Tutorial

Updated tutorial coming soon!

## What the Email Looks Like (Sample)

![](https://2830261229-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRcI-XJRZMjllYclp86%2F-MUP4fYJGutICxIvHHb3%2F-MUP8mHRQ_MogCLiJ8NI%2FEmail%20sample%20image.png?alt=media\&token=8f9b1705-f2a5-4a83-8b2d-1bf458654af1)

## Walkthrough

**1.** Login to [Adastacks.com](https://adastacks.com) and navigate to your dashboard  (we'll need this for your API Key in a minute)

**2.** ⚠️ Be sure that you have **added** and **verified** at least one email to send from on your Adastacks dashboard. You can learn more about verifying email addresses [here](https://docs.adastacks.com/appendix#verifying-sending-email-addresses-for-use-with-adastacks).

{% hint style="info" %}
Adastacks uses [Postmark](https://postmarkapp.com) to verify your sending addresses. You will receive an email from Postmark asking you to verify that you want to give Adastacks permission to use your email to send from.
{% endhint %}

{% hint style="info" %}
Emails you authorize Adastacks to send from **cannot** be free or third party emails such as GMail, Yahoo, Hey, Hotmail, or iCloud.  Verified emails must be legitimate emails on a different domain. \
\&#xNAN;*For example, <admin@yourwebsite.com>*
{% endhint %}

**3.** Open a new tab in your browser and open up your Adalo app in the Adalo editor

**4.** Under the "Click Actions" for the button, select **Custom Action**

**5.** Give your action a name, such as "Send Email Verification Code"

**6.** Select the **Create** option from the dropdown below the Title field, then click **Next**

**7.** Copy the following URL and paste it into the Base URL field of the Custom Action

```
https://adastacks.app.n8n.cloud/webhook/email-verify?subject=SUBJECT&from_email=FROMEMAIL&to_email=TOEMAIL&website_url=WEBSITEURL&logo_url=LOGOURL&greeting=GREETING&instructions=INSTRUCTIONS&code=CODE&opt_instructions=OPTINSTRUCTIONS&salutation=SALUTATION&signature=SIGNATURE&company_name=COMPANYNAME&company_tagline=COMPANYTAGLINE
```

**8.** Set the "Method" dropdown to **POST**

**9.** Add a query parameter called **Content-Type** with the value **application/json**

![](https://2830261229-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRcI-XJRZMjllYclp86%2F-MaZ6u50LlxKDWWKs2tn%2F-MaZ7zEwCloG89ck9zcf%2FScreen%20Shot%202021-05-25%20at%2011.27.55%20AM.png?alt=media\&token=ad43a771-35b0-49ac-a67a-4415b903bb16)

**10.** Add another query parameter called **api\_key** with your Adastacks API Key as the value

![](https://2830261229-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRcI-XJRZMjllYclp86%2F-MaZuy7JHG6ypQOLS2hK%2F-MaZwnVzXtyllh_lmNuA%2FScreen%20Shot%202021-05-25%20at%203.12.57%20PM.png?alt=media\&token=7d759e4e-f4a8-4b1c-bafc-aae383a47a0a)

**11.** Add **Inputs** to hold your data for the new Custom Action (*You can name these whatever you like, but below are some suggestions*)

| Suggested Input Name      | Input Type | Suggested Input Value                                                                      |
| ------------------------- | ---------- | ------------------------------------------------------------------------------------------ |
| **Email Subject**         | Text       | Testing, Testing, 1, 2, 3!                                                                 |
| **From Email**            | Text       | ⚠️ *This **must be** an email you have verified with Adastacks*                            |
| **To Email**              | Text       | ⚠️ *This **must be** a legitimate email or the email will bounce*                          |
| **Website URL**           | Text       | *For testing, you can use any URL here*                                                    |
| **Logo Storage URL**      | Text       | *This must be a **publicly** accessible link to an image file (.png or .jpg is preferred)* |
| **Greeting**              | Text       | Hello Adastacks Friend!                                                                    |
| **Instructions**          | Text       | Below you will find the code for logging in!                                               |
| **Code**                  | Text       | 12345                                                                                      |
| **Optional Instructions** | Text       | Please join us for virtual tea and crumpits later!                                         |
| **Salutation**            | Text       | Thanks!                                                                                    |
| **Signature**             | Text       | Your Adastacks Friends                                                                     |
| **Company Name**          | Text       | *For testing, you can use your app or company name*                                        |
| **Company Tagline**       | Text       | *For testing, you can put any tagline here*                                                |

**12.** Replace the **capitalized text** in the URL with the **Inputs** you just made using the **Magic Text** button in the top right of the URL field.

![](https://2830261229-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRcI-XJRZMjllYclp86%2F-MaZwyb4_h38PnZmCCk1%2F-MaZxLL6wB5RXzZ2Wl4N%2FScreen%20Shot%202021-05-25%20at%203.16.38%20PM.png?alt=media\&token=690aba5f-6e7e-4511-a623-fcefc0a9771f)

**13.** Run the test request. (See the success screenshot below)

{% hint style="info" %}
Even test actions that fail return a "Test Successful" message so be sure to click **Show Full Response** to ensure the action succeeded. This is by design so that you can still save the action and return to continue setting it up later if you wish.
{% endhint %}

![](https://2830261229-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRcI-XJRZMjllYclp86%2F-MUP-_Y30PnxwG3uWzca%2F-MUP1IIoMIJR23ArCdAZ%2FEmail%20Verification%20Success%20Message.png?alt=media\&token=e9625f7c-74bd-4511-9044-b05516fa71d6)

**14.** Save the custom action and use it in all of your Adalo apps.
