# Request Approval Email

### Overview

The **Request Approval Email Component** automates email notifications for approval tasks, allowing requesters and approvers to receive structured email alerts about approval requests.

### Usage

This component sends approval request emails to designated approvers and notifies requesters when a decision is made. It is useful for workflows requiring manual review and approval steps.

#### Input Ports

| Port   | Description                                                                            |
| ------ | -------------------------------------------------------------------------------------- |
| `task` | Receives task details including title, description, requester, approver, and deadline. |

#### Output Ports

| Port       | Description                                                                      |
| ---------- | -------------------------------------------------------------------------------- |
| `approved` | Emits task details when the request is approved.                                 |
| `rejected` | Emits task details when the request is rejected.                                 |
| `due`      | Emits task details if the task reaches the decision deadline without a response. |

#### Properties

| Property      | Type     | Description                                                  |
| ------------- | -------- | ------------------------------------------------------------ |
| `title`       | `string` | Title of the approval request.                               |
| `description` | `string` | Description of the request.                                  |
| `requester`   | `string` | Email of the person requesting approval.                     |
| `approver`    | `string` | Email of the person who must approve or reject the request.  |
| `decisionBy`  | `string` | Deadline by which a decision must be made (ISO 8601 format). |

#### Processing Logic

1. **Receives Approval Request**: Accepts task details and creates an approval request.
2. **Generates Email Notifications**: Sends formatted email notifications to the approver and requester.
3. **Handles Responses**:
   * If approved, sends the task details to the `approved` port.
   * If rejected, sends the task details to the `rejected` port.
   * If the deadline passes without a decision, sends the task details to the `due` port.
4. **Stores Dashboard Links**: Provides a dashboard link in the email for approvers and requesters to manage tasks.

### Notes

* **Uses Webhooks**: Listens for approval decisions via webhook responses.
* **Email Customization**: Emails contain task details, approval/rejection buttons, and dashboard links.
* **Automated Follow-ups**: Ensures requesters and approvers receive timely notifications.

This component is essential for approval-based workflows that require structured email notifications and human validation processes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmixer.com/connector-configuration/utils/tasks/requestapprovalemail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
