> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuple.app/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

## Universal arguments

When Tuple executes your trigger, it passes in useful information via environment variables. These take the form `TUPLE_TRIGGER_[name]`.

These arguments vary by trigger; however, there are two universal arguments that are available to every trigger that gets executed:

| Argument                               | Details        |
| -------------------------------------- | -------------- |
| `TUPLE_TRIGGER_CURRENT_USER_EMAIL`     | Your email     |
| `TUPLE_TRIGGER_CURRENT_USER_FULL_NAME` | Your full name |

## Events

The complete list of lifecycle events that you can respond to with triggers.

### Call initiated

`call-initiated`

Fired when you start an outgoing call to another person via the popover interface.

<img src="https://mintcdn.com/tuple-0f82e5be/KrzhTF2unbKcB628/images/triggers/call-initiated-popover.png?fit=max&auto=format&n=KrzhTF2unbKcB628&q=85&s=53c40aa982529961d17a0d922d3a46c2" alt="Calling someone via the popover UI" width="690" height="379" data-path="images/triggers/call-initiated-popover.png" />

| Argument                         | Details                                     |
| -------------------------------- | ------------------------------------------- |
| `TUPLE_TRIGGER_CALLEE_EMAIL`     | The email of the person you're calling.     |
| `TUPLE_TRIGGER_CALLEE_FULL_NAME` | The full name of the person you're calling. |

### Call incoming

`call-incoming`

Fired when another participant calls your machine.

<img src="https://mintcdn.com/tuple-0f82e5be/KrzhTF2unbKcB628/images/triggers/call-incoming.png?fit=max&auto=format&n=KrzhTF2unbKcB628&q=85&s=00f9ec89e9d720704162a0d3acd83f07" alt="Receiving an incoming call" width="412" height="521" data-path="images/triggers/call-incoming.png" />

| Argument                         | Details                                  |
| -------------------------------- | ---------------------------------------- |
| `TUPLE_TRIGGER_CALLER_EMAIL`     | The email of the person calling you.     |
| `TUPLE_TRIGGER_CALLER_FULL_NAME` | The full name of the person calling you. |

### Call rejected

`call-rejected`

Fired when the person you're calling rejects your call.

| Argument                         | Details                                     |
| -------------------------------- | ------------------------------------------- |
| `TUPLE_TRIGGER_CALLEE_EMAIL`     | The email of the person you're calling.     |
| `TUPLE_TRIGGER_CALLEE_FULL_NAME` | The full name of the person you're calling. |

### Call timed out

`call-timed-out`

Fired when your outgoing call times out.

| Argument                         | Details                                     |
| -------------------------------- | ------------------------------------------- |
| `TUPLE_TRIGGER_CALLEE_EMAIL`     | The email of the person you're calling.     |
| `TUPLE_TRIGGER_CALLEE_FULL_NAME` | The full name of the person you're calling. |

### Call connected

`call-connected`

Fired when your call is fully connected.

(Receives no additional arguments)

### Call ended

`call-ended`

Fired when your call ends.

| Argument                    | Details                                            |
| --------------------------- | -------------------------------------------------- |
| `TUPLE_TRIGGER_CALL_LENGTH` | The duration that you were on the call in seconds. |

### Call transcription started

`call-transcription-started`

Fired when a call transcription starts.

| Argument                                 | Details                                                                           |
| ---------------------------------------- | --------------------------------------------------------------------------------- |
| `TUPLE_TRIGGER_CALL_ARTIFACTS_DIRECTORY` | The filesystem path to the directory containing the call transcription artifacts. |

### Call transcription complete

`call-transcription-complete`

Fired when a call transcription finishes, either because the call ended or transcription was disabled.

| Argument                                 | Details                                                                           |
| ---------------------------------------- | --------------------------------------------------------------------------------- |
| `TUPLE_TRIGGER_CALL_ARTIFACTS_DIRECTORY` | The filesystem path to the directory containing the call transcription artifacts. |

### Room joined

`room-joined`

Fired when you or someone else joins one of your team's rooms.

| Argument                  | Details                                                                                      |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| `TUPLE_TRIGGER_IS_SELF`   | "true" when this is being fired because you joined a room. "false" when it was someone else. |
| `TUPLE_TRIGGER_ROOM_NAME` | The name of the room being joined.                                                           |
| `TUPLE_TRIGGER_EMAIL`     | The email of the person joining the room.                                                    |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person joining the room.                                                |

### Room left

`room-left`

Fired when you or someone else leaves one of your team's rooms.

| Argument                  | Details                                                                                  |
| ------------------------- | ---------------------------------------------------------------------------------------- |
| `TUPLE_TRIGGER_IS_SELF`   | "true" when this event was fired because you left a room. "false" when someone else did. |
| `TUPLE_TRIGGER_ROOM_NAME` | The name of the room being left.                                                         |
| `TUPLE_TRIGGER_EMAIL`     | The email of the person leaving the room.                                                |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person leaving the room.                                            |

### Screen share started

`screen-share-started`

Fired when you or someone else starts sharing their screen on a call.

| Argument                  | Details                                                                                                 |
| ------------------------- | ------------------------------------------------------------------------------------------------------- |
| `TUPLE_TRIGGER_IS_SELF`   | "true" when the event was fired because you started sharing your screen. "false" when someone else did. |
| `TUPLE_TRIGGER_EMAIL`     | The email of the person sharing their screen.                                                           |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person sharing their screen.                                                       |

### Screen share ended

`screen-share-ended`

Fired when you or someone else stops sharing their screen on a call.

| Argument                  | Details                                                                     |
| ------------------------- | --------------------------------------------------------------------------- |
| `TUPLE_TRIGGER_IS_SELF`   | "true" when you stopped sharing your screen. "false" when someone else did. |
| `TUPLE_TRIGGER_EMAIL`     | The email of the person stopping their screen share.                        |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person stopping their screen share.                    |

### Webcam share started

`webcam-share-started`

Fired when you or someone else starts sharing their webcam on a call.

| Argument                  | Details                                                                     |
| ------------------------- | --------------------------------------------------------------------------- |
| `TUPLE_TRIGGER_IS_SELF`   | "true" when you started sharing your webcam. "false" when someone else did. |
| `TUPLE_TRIGGER_EMAIL`     | The email of the person sharing their webcam.                               |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person sharing their webcam.                           |

### Webcam share ended

`webcam-share-ended`

Fired when you or someone else stops sharing their webcam on a call.

| Argument                  | Details                                                                     |
| ------------------------- | --------------------------------------------------------------------------- |
| `TUPLE_TRIGGER_IS_SELF`   | "true" when you stopped sharing your webcam. "false" when someone else did. |
| `TUPLE_TRIGGER_EMAIL`     | The email of the person no longer sharing their webcam.                     |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person no longer sharing their webcam.                 |

### Participant joined

`participant-joined`

Fired whenever someone joins your call, whether it's a call starting, someone being added, or someone joining the room you're in.

| Argument                  | Details                                            |
| ------------------------- | -------------------------------------------------- |
| `TUPLE_TRIGGER_EMAIL`     | The email of the person that joined your call.     |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person that joined your call. |

### Participant left

`participant-left`

Fired whenever someone leaves your call.

| Argument                  | Details                                          |
| ------------------------- | ------------------------------------------------ |
| `TUPLE_TRIGGER_EMAIL`     | The email of the person that left your call.     |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person that left your call. |
