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

# Actions

### Overview ℹ️

Actions are the tasks executed when the criteria are satisfied. Each action can be delayed, allowing it to be executed at a specific time.

Available Actions:

1. **Send Message** - Send a message to a chat or group.
2. **Forward Message** - Forward a message to another chat.
3. **Flag Message** - Flag a message in Periskope.
4. **Unflag Message** - Unflag a message in Periskope.
5. **Delete Message** - Delete a message from a chat.
6. **Create Ticket** - Create a new ticket in Periskope.
7. **Assign Ticket** - Assign a ticket to a user.
8. **Close Ticket** - Close a ticket in Periskope.
9. **Add Ticket Label** - Add one or more labels to a ticket.
10. **Add Chat Label** - Add one or more labels to a chat.
11. **Assign Chat** - Assign a chat to a user.
12. **Send Email** - Send an email to a user.

<Note>
  The available actions may vary based on the triggers selected. Not all actions are available for all triggers.

  You can add multiple actions to a rule and set delays for each action.
</Note>

### 1. Send Message To Chat 📩

The **Send Message** action allows you to send a message to a chat or group. You can customize the message content and choose the chat or group to send the message to.

<Frame caption="Send Message Action">
  <img className="block border rounded-xl shadow mx-auto mt-4" src="https://mintcdn.com/bharatkumarramesh/TZOTyuhW_rLmN--9/integrations/workflows/images/actions/send-message-to-chat.png?fit=max&auto=format&n=TZOTyuhW_rLmN--9&q=85&s=3156e36de753d1026e9fcd500e2f68a0" alt="Send Message Action" width="40%" data-path="integrations/workflows/images/actions/send-message-to-chat.png" />
</Frame>

**Action Inputs**

<ParamField path="Select Chat" type="<number> <seconds/minutes/hours/days>">
  The chat or group to send the message to. You can search for the chat from the dropdown.

  If you want to send the message to the same chat in which the workflow is triggered, you can select trigger chat from the dropdown.
</ParamField>

<ParamField path="Message" type="editor">
  The message content to be sent. You can add variables to personalize the message.

  Example: `Hello {{ chat.chat_name || '<fallback>' }}, your request has been received.`
</ParamField>

<ParamField path="Media" type="file">
  Optional media file to attach to the message. You can upload an image, video, document, or other supported file type.
</ParamField>

<ParamField path="Debounce messages for same chat" type="boolean (true/false)">
  Whether to enable a cooldown period after sending the message. You can set a
  cooldown period to prevent sending multiple messages in quick succession.
</ParamField>

<ParamField path="Debounce time" type="<number> <seconds/minutes/hours/days>">
  The duration of the cooldown period. You can specify the period in seconds,
  minutes, hours, or days.
</ParamField>

<ParamField path="Unflag chat after sending message" type="boolean (true/false)">
  Option to maintain the flag status of the previous messages after sending the
  message.
</ParamField>

<Tip>
  You can add variables to the message content to personalize the message.
  Variables are placeholders that are replaced with actual values when the
  message is sent and if the variable is not available, the fallback value is
  used. Use variables to include dynamic information in the message, such as the
  chat name, sender name, or ticket ID.
</Tip>

### 2. Forward Message 📩⏩

The **Forward Message** action allows you to forward a message to another chat.

<Frame caption="Forward Message Action">
  <img className="block border rounded-xl shadow mx-auto mt-4" src="https://mintcdn.com/bharatkumarramesh/TZOTyuhW_rLmN--9/integrations/workflows/images/actions/forward-message.png?fit=max&auto=format&n=TZOTyuhW_rLmN--9&q=85&s=24adb44af44544df700235a04737b216" alt="Forward Message Action" width="40%" data-path="integrations/workflows/images/actions/forward-message.png" />
</Frame>

**Action Inputs**

<ParamField path="Select Chat" type="dropdown">
  The chat or group to forward the message to.
</ParamField>

### 3. Flag Message  🚩

The **Flag Message** action allows you to flag or unflag a message in Periskope.

### 4. Unflag Message  🚩

The **Unflag Message** action allows you to unflag a message in Periskope.

### 5. Delete Message  🗑️

The **Delete Message** action allows you to delete a message from a chat.

<Warning>
  This action is irreversible. Once a message is deleted, it cannot be recovered.

  You can only delete messages if you have the necessary permissions.
</Warning>

### 6. Create Ticket  🎫

The **Create Ticket** action allows you to create a new ticket in Periskope.

<Frame caption="Create Ticket Action">
  <img className="block border rounded-xl shadow mx-auto mt-4" src="https://mintcdn.com/bharatkumarramesh/TZOTyuhW_rLmN--9/integrations/workflows/images/actions/create-ticket.png?fit=max&auto=format&n=TZOTyuhW_rLmN--9&q=85&s=08ce923707226078a943a80c66efa891" alt="Create Ticket Action" width="40%" data-path="integrations/workflows/images/actions/create-ticket.png" />
</Frame>

**Action Inputs**

<ParamField path="Priority" type="radio">
  The priority of the ticket. You can choose from No Priority, Low, Medium, High, or
  Urgent. Only applicable when creating a new ticket.
</ParamField>

<ParamField path="Labels" type="dropdown">
  The labels to add to the ticket. You can add multiple labels by selecting from
  the dropdown. Only applicable when creating a new ticket.
</ParamField>

<ParamField path="Assignee" type="dropdown">
  The user to assign the ticket to. You can select the user from the dropdown. Only applicable when creating a new ticket.

  You can assign ticket to user from a list on round-robin basis as well.
</ParamField>

### 7. Assign Ticket 🎫👤

The **Assign Ticket** action allows you to assign a ticket to a user.

<Frame caption="Assign Ticket Action">
  <img className="block border rounded-xl shadow mx-auto mt-4" src="https://mintcdn.com/bharatkumarramesh/TZOTyuhW_rLmN--9/integrations/workflows/images/actions/assign-ticket.png?fit=max&auto=format&n=TZOTyuhW_rLmN--9&q=85&s=6248a83785d0fbea7ea27082a3cda6b8" alt="Assign Ticket Action" width="40%" data-path="integrations/workflows/images/actions/assign-ticket.png" />
</Frame>

**Action Inputs**

<ParamField path="Enable Round Robin" type="boolean (true/false)">
  Whether to assign the ticket using the round-robin method. You can enable
  round-robin assignment to distribute tickets evenly among users.
</ParamField>

<ParamField path="Assignee(s)" type="dropdown">
  The user(s) to assign the ticket to. You can select multiple users by selecting from the dropdown.

  If round-robin assignment is enabled, you can select multiple users to assign tickets to.
</ParamField>

### 8. Close Ticket  ❌

The **Close Ticket** action allows you to close a ticket in Periskope.

**Action Inputs**

<ParamField path="Closing Note" type="textarea">
  The note to add when closing the ticket.
</ParamField>

### 9. Add Ticket Label Action 🎫🏷️

The **Add Ticket Label** action allows you to add one or multiple label to a ticket.

<Frame caption="Add Ticket Label Action">
  <img className="block border rounded-xl shadow mx-auto mt-4" src="https://mintcdn.com/bharatkumarramesh/TZOTyuhW_rLmN--9/integrations/workflows/images/actions/add-ticket-label.png?fit=max&auto=format&n=TZOTyuhW_rLmN--9&q=85&s=0499adc7e6d01273b35ede1ef2a51150" alt="Add Ticket Label Action" width="40%" data-path="integrations/workflows/images/actions/add-ticket-label.png" />
</Frame>

**Action Inputs**

<ParamField path="Labels" type="dropdown">
  The labels to add to the ticket. You can add multiple labels by selecting from
  the dropdown.
</ParamField>

### 10. Add Chat Label Action 💬🏷️

The **Add Chat Label** action allows you to add a label to a chat.

<Frame caption="Add Chat Label Action">
  <img className="block border rounded-xl shadow mx-auto mt-4" src="https://mintcdn.com/bharatkumarramesh/TZOTyuhW_rLmN--9/integrations/workflows/images/actions/add-chat-label.png?fit=max&auto=format&n=TZOTyuhW_rLmN--9&q=85&s=1360a5fefc0730413d5a2a051083cdef" alt="Add Chat Label Action" width="40%" data-path="integrations/workflows/images/actions/add-chat-label.png" />
</Frame>

**Action Inputs**

<ParamField path="Labels" type="dropdown">
  The labels to add to the chat. You can add multiple labels by selecting from
  the dropdown.
</ParamField>

### 11. Assign Chat Action 💬👤

The **Assign Chat** action allows you to assign a chat to a user.

<Frame caption="Assign Chat Action">
  <img className="block border rounded-xl shadow mx-auto mt-4" src="https://mintcdn.com/bharatkumarramesh/TZOTyuhW_rLmN--9/integrations/workflows/images/actions/assign-chat.png?fit=max&auto=format&n=TZOTyuhW_rLmN--9&q=85&s=ced05b631b14ba5b87071746c894978d" alt="Assign Chat Action" width="40%" data-path="integrations/workflows/images/actions/assign-chat.png" />
</Frame>

**Action Inputs**

<ParamField path="Enable Round Robin" type="boolean (true/false)">
  Whether to assign the chat using the round-robin method. You can enable
  round-robin assignment to distribute chats evenly among users.
</ParamField>

<Info>
  Round-robin assignment assigns chats to users in a circular order. Each user
  receives a chat in turn, ensuring an even distribution of chats among users.
</Info>

<ParamField path="Assignee" type="dropdown">
  The user to assign the chat to. If round-robin assignment is enabled, you can
  select multiple users to assign chats to.
</ParamField>

### 12. Send Email Action 📧

The **Send Email** action allows you to send an email notification to any email address.

<Frame caption="Send Email Action">
  <img className="block border rounded-xl shadow mx-auto mt-4" src="https://mintcdn.com/bharatkumarramesh/TZOTyuhW_rLmN--9/integrations/workflows/images/actions/send-email.png?fit=max&auto=format&n=TZOTyuhW_rLmN--9&q=85&s=f38de59f53bc4dfdc979dd7eb4d107a8" alt="Send Email Action" width="40%" data-path="integrations/workflows/images/actions/send-email.png" />
</Frame>

**Action Inputs**

<ParamField path="Email" type="string">
  The email address to send the email to.
</ParamField>

<ParamField path="Subject" type="string">
  The subject of the email. You can add variables to personalize the subject.

  Example: `New ticket created: {{ ticket.ticket_id || '<fallback>' }}`
</ParamField>

<Tip>
  You can add variables to the subject to personalize the email. Variables
  are placeholders that are replaced with actual values when the email is sent
  and if the variable is not available, the fallback value is used. Use
  variables to include dynamic information in the subject, such as the ticket ID
  or chat name.
</Tip>

<ParamField path="Body" type="editor">
  The email content to be sent. You can add variables to personalize the email.

  Example: `Hello, new ticket {{ ticket.ticket_id || '<fallback>' }} has been assigned to you.`
</ParamField>

<Tip>
  You can add variables to the email body to personalize the email. Variables
  are placeholders that are replaced with actual values when the email is sent
  and if the variable is not available, the fallback value is used. Use
  variables to include dynamic information in the email, such as the ticket ID,
  chat name, or sender name.
</Tip>
