> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/relate/segments/segments-removing-leads-from-segments-based-on-the-calendar.md).

# Segments - Removing leads from segments based on the calendar

In this example, you have a meeting calendar created in SprintHub, and you want to include in segments the leads who schedule a meeting, the leads who attend the meeting, and those who do not attend. In addition, you want these leads to be removed automatically if they no longer fit that segment.<br>

**For this strategy, we will use SprintHub Calendar and Segments.**

Follow the tutorial below:

* First, we will create the calendar. [To learn how to create a calendar, click here.](https://docs.sprinthub.com/topicos/relacionar/calendario-publico)

Next, we will **create the segments:** Scheduled Meetings, Attended the meeting, Did Not Attend the meeting.

1 - Access Segments

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FA5DTlp0HcBzeSqnQVWrO%2Fseg1.png?alt=media&amp;token=6342a635-2b79-4774-b4ba-4a5cc8cdc396" alt=""><figcaption></figcaption></figure>

2 - Click +New, add a Name: Scheduled Meetings.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FA4ayS34fMs95kO4siiYy%2Fseg2.png?alt=media&amp;token=31e94f63-64f4-440c-84ca-47f312b2b6fe" alt=""><figcaption></figcaption></figure>

3 - In the Filters tab, choose the following filter: “Does the lead have a scheduled meeting? >> YES >> And indicate the calendar.

4 - Select YES for the option “Remove leads that no longer meet the filter?”

This feature ensures that leads who no longer have a meeting scheduled in this calendar are automatically removed from this segment.\
Click Save and Close.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FxeKjmddI3eAMC9tsflNP%2Fseg4.png?alt=media&amp;token=92a0543c-82b5-41cd-b9e5-b910d392f9c4" alt=""><figcaption></figcaption></figure>

**Now let’s set up the next segment: Attended the meeting.**

Repeat steps 1 and 2, and in the segment Filter tab, click +New and add the filters:

* Click +New Filter and add the filter “The lead attended a meeting” >> Yes and indicate the calendar.
* Select YES for “Remove leads that no longer meet the filter?”.

Click Save and Close

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FmuaHnCVK7GXyLAPjgAYl%2Fsgg.png?alt=media&amp;token=54e2742b-8a99-4c30-8cc9-eb641ceaf48b" alt=""><figcaption></figcaption></figure>

**Finally, let’s create the last segment: Did Not Attend the meeting.**&#x20;

Repeat steps 1 and 2, and in the segment Filter tab, click +New Filter and add the filters:

* Click +New Filter and add the filter “The lead did NOT attend a meeting” >> Yes and indicate the calendar.
* Select YES for “Remove leads that no longer meet the filter?”.

Click Save and Close.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FnhN8FoawRIbshGs8vMMA%2Fsegg2.png?alt=media&amp;token=e685f62c-2cce-4dac-9831-47d89a598065" alt=""><figcaption></figcaption></figure>


---

# 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.sprinthub.com/en/topics/relate/segments/segments-removing-leads-from-segments-based-on-the-calendar.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.
