# Webflow

Webflow (opens new window) is the way to design, build, and launch powerful websites visually — without coding. And in this example, we will show how to use the EmailJS REST API to send emails from Webflow.

To simplify the example, we will use a form element and email the data from that form's text fields: to_email and message. However, there are endless options for using the EmailJS service.

# Form Settings

In the form settings, we need to change the action source from Default to Logic action. This change will allow our form to be controlled by a Logic flow.

# Flows

In the window that opens to create a new Flow, we added an Action — Make HTTP request. We also set the request method to POST and the URL to https://api.emailjs.com/api/v1.0/email/send. Then, we added the header Content-Type: application/json to the Headers.

All that remains is to add the body in JSON format. Please note that this format is very picky about correct syntax.

{
  "user_id": "YOUR_PUBLIC_KEY",
  "service_id": "YOUR_SERVICE_ID",
  "template_id": "YOUR_TEMPLATE_ID",
  "template_params": {
    "to_email": "Connect the Text Field to_email property",
    "message": "Connect the Text Field message property"
  }
}

We have to attach the template parameters to the form. To do so, we need to click on the plus sign next to the Body field. Then, choose Connect to data, Run the flow on..., Form fields, and choose the correct form field.

Run a test to complete the setup and check that the email has been delivered.
Integration completed successfully!