> For the complete documentation index, see [llms.txt](https://docs.hablla.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hablla.com/hablla-docs-en/automation-flows/all-components/instagram-components/send-opt-in.md).

# Send Opt-in

### Overview

The **Instagram Opt-in Request Component** (identified in the system by the technical name `instagram_opt_in`) is a compliance-focused action node (*compliance*) and channel authorization. Its main function is to trigger a structured message block in the user's DM, formally requesting that they authorize the company to send future notifications and active messages to their profile. It serves to mitigate blocking risks and ensure that the business account is aligned with Meta's spam policies.

### Configuration Parameters

The block's configuration defines the scope of consent and the destination of the request:

* **Credential:** Drop-down menu used to select the authenticated Instagram Business account that will send the opt-in card.<br>
* **Page Token (\* Required Field):** The access token or security identifier associated with the Facebook page connected to the Instagram profile, required to authenticate the permission request in Meta's graph.<br>
* **User's Instagram ID (\* Required Field):** Text field that receives the client's unique numeric identifier (usually mapped via a dynamic variable such as `{{instagram_id}}`) to whom the consent request will be sent.<br>

### Visual Builder

The builder interface was designed to ensure the filling in of the essential security parameters for the API:

* **Security Key Validation:** The presence of the asterisk (`*`) in the fields of *Page Token* and *User's Instagram ID* prevents the node from being saved incompletely, mitigating submission errors rejected by Meta due to lack of scope authentication.<br>
* **Conditional Output Structure:** In the visual editor, attaching this component usually opens physical branching doors based on the client's immediate response or the success of the consent card trigger (e.g., authorized / declined).<br>

### Special Operators

The logical properties of this component deal with token persistence, privacy policy control, and profile flag updates:

* **Recipient Tag Injection:** The parameter *User's Instagram ID* accepts tags in double-brace format `{{...}}`. This allows the flow engine to dynamically capture the ID generated in the input trigger (whether a comment or a direct message) and direct the opt-in card exactly to that user.<br>
* **Modification of Consent Status in the CRM:** When the user clicks the native confirmation button sent by this block on Instagram, Meta's API returns a validation webhook. The platform engine intercepts this signal and automatically changes a logical flag in the contact's profile, authorizing the system to trigger future informational or promotional flows for them.<br>

### Practical Examples

The table below demonstrates practical scenarios for structuring the use of the opt-in component throughout the customer's journey:

| **Selected Credential** | **User ID (Variable)** | **Page Token**          | **Trigger Objective**                  | **Practical Use Case**                                                                                                                                                                      |
| ----------------------- | ---------------------- | ----------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **@fictitious\_brand**  | `{{instagram.id}}`     | `{{page_token_global}}` | Post-comment authorization collection. | The user commented on a post. The bot starts the conversation in the DM and the first action is to send the Opt-in to ensure they agree to receive updates before sending the product link. |
| **@fictitious\_store**  | `{{instagram.id}}`     | `{{page_token_global}}` | Contact window renewal.                | At the end of a technical support session, the bot sends the opt-in card asking whether the user agrees to receive weekly promotion alerts directly in the DM.                              |
| **@fictitious\_brand**  | `{{instagram.id}}`     | `{{page_token_global}}` | Registration in a broadcast list.      | Flow focused on launches of digital products. The component is used so that the lead subscribes to the live notification list directly by                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.hablla.com/hablla-docs-en/automation-flows/all-components/instagram-components/send-opt-in.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
