> For the complete documentation index, see [llms.txt](https://docs.simplespa.net/simplespa-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.simplespa.net/simplespa-documentation/api/simplespa-enterprise-api/integrations/integrately.md).

# Integrately

## Create a new Automation

* Click Create Automation.
* Search for “Webhook” (because you are using your own API).
* Choose “Webhook” as the Trigger (if pulling), or App Action (if sending).

## Use the “Webhook” App

* Select Webhook → Custom Webhook.
* Integrately supports sending requests (outbound) and receiving requests (inbound).
* Because you want to pull appointments, you should send a webhook request to your API.

## Set up the Webhook Request (HTTP Request)

| Field        | What to put                                                                                              |
| ------------ | -------------------------------------------------------------------------------------------------------- |
| Method       | POST (or GET if you change your API to accept GET)                                                       |
| Webhook URL  | <https://my.simplespa.com/api/appointments.php>                                                          |
| Headers      | <p>Add 2 headers:  </p><p>Authorization: Bearer YOUR\_API\_KEY </p><p>Content-Type: application/json</p> |
| Body Type    | Raw (application/json)                                                                                   |
| Request Body | JSON like:                                                                                               |

```json
{
  "start": "2025-04-01",
  "end": "2025-04-30",
  "status": 0,
  "page": 1,
  "per_page": 100
}
```

## Test the Webhook

* Press Send Test Request inside Integrately.
* If successful, Integrately will show the JSON response from your API.
* You can now map the fields (appointments) to another app.

## How it fits Integrately

| Scenario              | Example                                       |
| --------------------- | --------------------------------------------- |
| Pull Appointments     | Send API Request to your endpoint             |
| Send to Google Sheets | Map appointment fields to spreadsheet columns |
| Send SMS              | Map client mobile field to Twilio or SMS App  |
| Send Email            | Map appointment details to Email Automation   |

## Summary Steps:

1. Create Automation
2. Choose Webhook > Custom Webhook
3. Set Method = POST
4. Set URL = your API
5. Add Authorization and Content-Type Headers
6. Set JSON body
7. Test
8. Connect to next app (Google Sheets, Email, Slack, CRM, etc.)

## Bonus Tip:

If you want to schedule it, Integrately lets you “Run Every Hour”, or “Every Day”, without needing a Cronjob.


---

# 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.simplespa.net/simplespa-documentation/api/simplespa-enterprise-api/integrations/integrately.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.
