> For the complete documentation index, see [llms.txt](https://developers.make.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.make.com/custom-apps-documentation/best-practices/instant-triggers-scheduled.md).

# Instant triggers (scheduled)

An instant trigger is a webhook that starts a scenario whenever new data arrives.

Your app should implement a fully functional instant trigger as a [Watch module](/custom-apps-documentation/app-components/modules/instant-trigger.md), even if an API might have endpoints like Get a webhook, List webhooks, or Update a webhook.

## Connect metadata

Always save the metadata in the connection if

* the endpoint that can obtain authenticated user’s information is available, and
* the information provided is able to distinguish the connection.

When naming your connection, provide as much information as possible. This provides better identification on the connection page. The following information is suggested:

* Name
* Email
* User ID
* Organization / Company / Location / Tenant

{% tabs %}
{% tab title="Good practice" %}

<div align="left"><figure><img src="https://1562974717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNS0mCBwODiYtOVXjc6qf%2Fuploads%2Fgit-blob-92dd28a1ae032b413e2ba76d0f39704c2f27c186%2Finstanttriggers_goodpractice.png?alt=media" alt="" width="344"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Bad practice" %}

<div align="left"><figure><img src="https://1562974717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNS0mCBwODiYtOVXjc6qf%2Fuploads%2Fgit-blob-47484687f7ea21bd0e6383f13c462a703ed8528e%2Finstanttriggers_badpractice.png?alt=media" alt="" width="370"><figcaption></figcaption></figure></div>
{% endtab %}
{% endtabs %}

### Example - Constant Contact

{% tabs %}
{% tab title="Source" %}

```json
{
	"info": {
		"url": "https://api.cc.email/v3/account/summary",
		"method": "GET",
		"headers": {
			"authorization": "Bearer {{connection.accessToken}}"
		},
		"response": {
			"error": {
				"message": "[{{statusCode}}]\n{{parseError(body)}}"
			},
			"uid": "{{body.encoded_account_id}}",
			"metadata": {
				"type": "text",
				"value": "{{body.contact_email}}"
			}
		},
		"log": {
			"sanitize": ["request.headers.authorization"]
		}
	}
}
```

{% endtab %}
{% endtabs %}

## UID

Always save the UID in the connection if the service supports a single webhook URL per app (a shared webhook). The saved UID must match the ID that is included in the incoming webhook payload.

### Example - Highlevel OAuth 2.0

{% tabs %}
{% tab title="Connection" %}

```json
{
	"url": "https://services.leadconnectorhq.com/locations/{{connection.locationId}}",
	"method": "GET",
	"headers": {
		"Authorization": "Bearer {{connection.accessToken}}",
		"Version": "2021-07-28"
	},
	"response": {
		"uid": "{{connection.locationId}}",
		"metadata": {
			"type": "text",
			"value": "Location: {{body.location.name}}"
		}
	},
	"log": {
		"sanitize": [ "request.headers.authorization" ]
	}
}
```

{% endtab %}

{% tab title="Incoming webhook payload" %}

```json
{
    "type": "ContactCreate",
    "locationId": "ve9EPM428h8vShlRW1KT",
    "id": "nmFmQEsNgz6AVpgLVUJ0",
    "address1": "3535 1st St N",
    "city": "ruDolomitebika",
    "state": "AL",
    "companyName": "Loram ipsum",
    "country": "DE",
    "source": "xyz form",
    "dateAdded": "2021-11-26T12:41:02.193Z",
    "dateOfBirth": "2000-01-05T00:00:00.000Z",
    "dnd": true,
    "email": "JohnDeo@gmail.comm",
    "name": "John Deo",
    "firstName": "John",
    "lastName": "Deo",
    "phone": "+919509597501",
    "postalCode": "452001",
    "tags": [
        "id magna sed Lorem",
        "Duis dolor commodo aliqua"
    ],
    "website": "https://www.google.com/",
    "attachments": [],
    "assignedTo": "nmFmQEsNgz6AVpgLVUJ0"
}
```

{% endtab %}
{% endtabs %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.make.com/custom-apps-documentation/best-practices/instant-triggers-scheduled.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
