> For the complete documentation index, see [llms.txt](https://guides.d7networks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.d7networks.com/integrations/direct7-integration-with-n8n.md).

# Direct7 Integration with n8n

Direct7 is now available as an official node in n8n Cloud. This guide walks you through every capability of the node — sending SMS, sending WhatsApp messages (text, media, contacts, location, interactive, and templates), checking number look-ups, and retrieving message status reports — so your team can start building workflows right away.

***

### Getting Started

#### Step 1: Add the Direct7 node and connect your accountWe are pleased to invite you to a demonstration of the Direct7 integration with the n8n platform.

<figure><img src="/files/3CVhwfoIZ8bEZEmvLeXU" alt=""><figcaption></figcaption></figure>

**Details:**

1. **Add the node:** In any workflow, click the **+** button, search for "Direct7," and drag it onto the canvas.
2. **Create a credential:** Click **Create New Credential** on the node and enter your Direct7 API key/token.
   * **API Key:** Found in your Direct7 dashboard under API settings — copy it exactly as shown.
3. **Test the connection:** Use the **Test** button on the credential dialog to confirm n8n can reach the Direct7 API before continuing.
4. **Choose a Resource:** Once connected, use the node's **Resource** dropdown to pick what you want to work with — Message, WhatsApp, Lookup, or Status/Reports.

***

### Sending SMS Messages

#### Step 1: Configure the Send SMS operation

<figure><img src="/files/QvtUUN2mN4kRQFvtAL78" alt=""><figcaption></figcaption></figure>

**Details:**

1. **Resource:** Select "Message."
2. **Operation:** Select "Send SMS."
3. **Recipient Number:** Enter the destination number in international format (e.g. `+9471XXXXXXX`).
4. **Sender ID:** Choose your approved originator/sender ID from the dropdown, or type it if it's a free-text field.
5. **Message:** Enter the SMS text. You can use an expression, e.g. `={{ $json.message }}`, to send dynamic content from earlier nodes.

***

### Sending WhatsApp Messages

The Direct7 node supports six WhatsApp message types: **Text**, **Media**, **Contacts**, **Location**, **Interactive**, and **Template**. All of them share the same starting point below, then branch based on the message type you choose.

#### Step 1: Select the WhatsApp resource and message type

<figure><img src="/files/blZUzsalHpsVXwKegyWo" alt=""><figcaption></figcaption></figure>

**Details:**

1. **Resource:** Select "WhatsApp."
2. **Operation:** Select "Send Message."
3. **Message Type:** Choose the type of WhatsApp message you want to send:
   * **Text —** a plain chat message.
   * **Media —** an image, video, audio clip, document, or sticker.
   * **Contacts —** one or more shared contact cards.
   * **Location —** a pinned map location.
   * **Interactive —** buttons or a selectable list.
   * **Template —** a pre-approved Meta template message.
4. **To:** Enter the recipient's WhatsApp number in international format for every message type below.

#### Sending a Text Message

**Details:**

1. **Body:** Type the message text, or use an expression to pull it from a previous node.
2. **Preview URL (optional):** Toggle this on if your message contains a link and you want WhatsApp to render a link preview.

#### Sending a Media Message

**Details:**

1. **Media Type:** Choose Image, Video, Audio, Document, or Sticker.
2. **Media Source:** Provide either:
   * **Media URL —** a publicly reachable link to the file, or
   * **Media ID —** an ID from a file already uploaded to Direct7's media store.
3. **Caption (optional):** Add a short caption — supported for images, videos, and documents.
4. **Filename:** For Document type, set the filename shown to the recipient (e.g. `invoice.pdf`).

#### Sending a Contact Card

**Details:**

1. **Contact Name:** Enter the contact's first and last name.
2. **Phone Numbers:** Add one or more numbers for the contact, each with an optional type label (Home, Work, Mobile).
3. **Additional Fields (optional):** Expand to add extra details:
   * **Organization —** company and job title.
   * **Email —** one or more email addresses.
   * **Address —** street, city, and country.

#### Sending a Location

**Details:**

1. **Latitude / Longitude:** Enter the coordinates of the point you want to share.
2. **Name (optional):** A short label for the place, e.g. "Office HQ."
3. **Address (optional):** A readable address to display alongside the pin.

#### Sending an Interactive Message

**Details:**

1. **Interactive Type:** Choose **Button** (up to 3 quick-reply buttons) or **List** (a scrollable menu of options).
2. **Header / Body / Footer:** Body text is required; header and footer are optional.
3. **Action:** Depending on the type chosen above:
   * **Buttons —** add each button's display text and a unique ID used to identify the reply.
   * **List —** add one or more Sections, each containing Rows with a title, optional description, and a unique row ID.

#### Sending a Template Message

**Details:**

1. **Template Name:** Select from templates already approved in your Direct7/Meta account.
2. **Language:** Choose the language variant of the approved template.
3. **Components (optional):** Fill in placeholders the template was built with:
   * **Header parameters —** for templates with a dynamic image, video, or text header.
   * **Body parameters —** the variable values that fill in `{{1}}`, `{{2}}`, etc. in the template body.
   * **Button parameters —** dynamic values for call-to-action or quick-reply buttons, if the template uses them.

***

### Number Look-Up

#### Step 1: Configure the Look-Up operation

<figure><img src="/files/UEusH5SpDadJdENR8gTW" alt="Resource set to Lookup, Operation set to Number Lookup, with a phone number field and the returned network/country details."><figcaption></figcaption></figure>

**Details:**

1. **Resource:** Select "Lookup."
2. **Operation:** Select "Number Lookup."
3. **Phone Number:** Enter the number to check, in international format.
4. **Response fields returned:** A successful look-up typically returns:
   * **Network / Operator —** the carrier currently serving the number.
   * **Country —** the number's country of origin.
   * **Number Status —** whether the number is active, reachable, or invalid.
   * **Ported status —** whether the number has been ported to another carrier, if available.

***

### Checking Status Reports

#### Step 1: Retrieve delivery status for a sent message

<figure><img src="/files/gqrFEYJdkzjVwAOKXHUi" alt=""><figcaption></figcaption></figure>

**Details:**

1. **Resource:** Select "Status" (or "Reports," depending on your node version).
2. **Operation:** Select "Get Message Status."
3. **Message ID:** Enter the ID returned when the message was originally sent — capture this from the previous node's output using an expression such as `={{ $json.messageId }}`.
4. **Status values returned:** Depending on the channel, expect one of the following:
   * **Pending / Submitted —** accepted by Direct7, not yet delivered.
   * **Delivered —** successfully delivered to the handset.
   * **Read —** WhatsApp only: the recipient has opened the message.
   * **Failed / Undelivered —** delivery was unsuccessful, usually with an error code.
