# X (Twitter)

> Post, reply to, delete, like, and search tweets on your Twitter account.

App · Social Media · 6 actions · 1 trigger. Web page: https://docs.lodol.com/docs/integrations/twitter

## Triggers

Start a workflow when something happens in X (Twitter). See [how triggers work](https://docs.lodol.com/docs/concepts/triggers.md).

### New Twitter mention

Triggers when someone mentions you on Twitter.

**Filters**: Narrow which events start a run.

- `keyword`

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `id` (text)
- `text` (text)

## Actions

### Delete a tweet

Delete a tweet from your Twitter account.

**Inputs**

- Tweet ID (`tweet_id`, text, required): Tweet ID to delete.

**Outputs**

- `status` (text): Action execution status.

**Example output**

```json
{
  "status": "success"
}
```

### Get my profile

Get the profile details for your connected Twitter account.

**Inputs**: None.

**Outputs**

- `status` (text): Action execution status.
- `user` (object): User profile object.

**Example output**

```json
{
  "status": "success",
  "user": {
    "id": "123456789",
    "name": "Lodol Automation",
    "username": "lodol"
  }
}
```

### Like a tweet

Like a tweet from your connected Twitter account.

**Inputs**

- Tweet ID (`tweet_id`, text, required): Tweet ID to like.

**Outputs**

- `status` (text): Action execution status.

**Example output**

```json
{
  "status": "success"
}
```

### Post a tweet

Publish a tweet from your connected Twitter account.

**Inputs**

- Text (`text`, text, required): Tweet text.

**Outputs**

- `status` (text): Action execution status.
- `tweet` (object): Posted tweet object.

**Example output**

```json
{
  "status": "success",
  "tweet": {
    "id": "1234567890",
    "text": "Just launched our new product!"
  }
}
```

### Reply to a tweet

Reply to an existing tweet.

**Inputs**

- Tweet to reply to (`in_reply_to_tweet_id`, text, required): The ID of the tweet you want to reply to.
- Text (`text`, text, required): Reply text.

**Outputs**

- `status` (text): Action execution status.
- `tweet` (object): Reply tweet object.

**Example output**

```json
{
  "status": "success",
  "tweet": {
    "id": "1234567891",
    "text": "Thanks for sharing!"
  }
}
```

### Search recent tweets

Search recent tweets for a word, phrase, or hashtag.

**Inputs**

- Search terms (`query`, text, required): What to search for, such as a word, phrase, or hashtag.
- Number of tweets (`max_results`, number): The most tweets to return, between 10 and 100. Defaults to 10.

**Outputs**

- `status` (text): Action execution status.
- `tweets` (list): Array of tweet objects.

**Example output**

```json
{
  "status": "success",
  "tweets": [
    {
      "id": "1234567890",
      "text": "Excited about the new AI features! #technology"
    }
  ]
}
```
