Before you start configuring, we recommend checking out our article on the overall logic of automation rules in Deskie or watching the quick video guide on rules.
In certain situations, you may need to create a new case addressed to a client or an external recipient while working within an existing case. Most often, these cases are handled using parent and child cases – many details are filled in automatically, and a link between the cases is established.
Sometimes, having a direct link between cases isn’t essential; more important is saving time when sending repetitive messages. For example, you might often be asked for the same document link or need to forward certain cases to partners, where simple forwarding isn’t the best option. While macros can help reduce the number of steps, you can also automate this routine using rules by selecting the action "Send webhook" and sending a request directly to Deskie.
Task
Automate the creation of standardized outgoing email cases using rules, allowing agents to generate them directly from an existing case's page.
Possible use cases
Automatically send an email to the customer if their request contains a specific keyword. For example, if a customer types "!catalog" in chat, automatically send the requested file to their known email address;
When a user agrees to sign a contract, complete a survey, or requests a presentation or other materials – and you have a standard email for such cases –
the agent can add a tag to trigger sending that email to the client’s inbox (see example №1);If a certain value is selected in a custom field of the email widget, you may want to automatically forward the content of that case to partners or colleagues. For instance, selecting "Closing documents" can automatically generate a request for the accounting department;
In some situations, you need to send a standard message to partners, suppliers, or colleagues who don’t use Deskie. Here, linking another case with the parent one is not necessary or relevant (see example №2).
What type of rule do you need
The choice of the appropriate type of rule depends on the specific task you are trying to solve. If you’re unsure, we recommend reading the article on the general logic of automation rules in Deskie or watching the brief video guide on rules. You will need:
a rule for new cases if the trigger is the content of the case that initiates the conversation or the topic selected in the widget;
a rule for updated cases to create a new case when an agent adds a label or makes another change in an existing case;
a rule for existing cases if you need to create a new outgoing case after a certain period following an event.
Examples of rules
1. Create a new case addressed to the same user.
A regular customer requested the current price list via chat to be sent to their email, which is already saved in their contact information. Create a rule for updated cases that will generate a new email-based case addressed to the customer with the required text and attachments. The rule should also add a note to the original case indicating that the action has been completed.

a. If you have your own domain connected, then in the "URL for sending request to" field specify:
https://[your_domain]/api/cases.json
If you use Deskie domain, then in the "URL for sending request to" field specify:
https://[your_subdomain].deskie.io/api/cases.json
b. To send a request to our API, you need to tick the checkbox "authentication is required via" and select "login-password". In the "login" field, you need to type a login (email) of an agent with a full access level, and in the "password" field – an API-key that can be created along the path: admin account — section "Settings" — subsection "API".
c. You can use this example for "Your custom request" field:
{ "case" : { "user_email" : "[user_email]", "subject" : "[Email subject]", "content_html" : "[Email body in HTML format]", "initiator_id" : [last_staff_id], "attachment_urls": ["[link to your file]"], "case_email_id" : [id of the mailbox connected to Deskie as a channel], "status" : "waiting" } }
Explanations on using request parameters:
— [user_email] – is a variable that will automatically pull the email address specified in the user’s profile;
You can always select the variables you need through quick access in the rule creation interface:

— "content_html" – replace the values inside the square brackets with your own. Use the br tag to insert line breaks.
— "initiator_id" – helps specify on whose behalf the email will be sent. In our example, we send the email on behalf of the agent who added the label to the case, so we specify the sender using a variable. If, for instance, you want to create such cases on behalf of a specific agent, enter their ID here without brackets or quotes. You can find the agent’s ID using this method. If this parameter is not set, the case will be created on behalf of the user.
— "case_email_id" – is required to create a case on behalf of a specific email address connected to Deskie as a channel. This mailbox will also be set as the "Reply from address" address. To obtain the ID of the connected email address, use this method;
— "attachment_urls" – is used if you want to attach files to the email. To do this, list the file URLs separated by commas in the following format:
"attachment_urls": [ "https://abcompany.com/market/541322/catalog-1.pdf", "https://abcompany.com/market/541322/catalog-2.pdf" ],
— "status" – determines the status of the case you create.
Don’t forget to replace the placeholder values in the parameters subject, content_html, and case_email_id with your own data instead of the values shown in square brackets! More parameters for the request are described in the Deskie API methods.
(!) Please note that you can add your own set of actions in the rule according to your workflow.
2. Create a new case addressed to another user.
The customer sends an email with a certain request, but your partners can actually solve such issues without your participation. All you need to do is forward the case to them. Add a rule for updated cases that creates a new email case, sends the email to your partners with all the necessary information and closes the case when an agent adds a certain label to the case:

If you have your own domain connected, then in the "URL for sending request to" field specify:
https://[your_domain]/api/cases.json
If you use Deskie domain, then in the "URL for sending request to" field specify:
https://[your_subdomain].deskie.io/api/cases.json
To send a request to our API, you need to tick the checkbox "authentication is required via" and select "login-password". In the "login" field, you need to type a login (email) of an agent with a full access level, and in the "password" field – an API-key that can be created along the path: admin account — section "Settings" — subsection "API". You can use this example for "Your custom request" field:
{ "case" : { "user_email" : "[partners email]", "subject" : "[Email subject]", "content_html" : "[Email body text + link to the original case using the variable [case_number]", "initiator_id" : [last_staff_id], "case_email_id" : [id of the mailbox connected to Deskie as a channel], "status" : "closed" } }
Explanations on using request parameters:
— "user_email" – requires specifying the email address of your partners;
— "content_html" – replace the values inside the square brackets with your own. Use the br tag to insert line breaks. You can use variables to include data from the original case.
You can always select the variables you need through quick access in the rule creation interface:

— "initiator_id" – helps specify on whose behalf the email will be sent. In our example, we send the email on behalf of the agent who added the label to the case, so we specify the sender using a variable. If, for instance, you want to create such cases on behalf of a specific agent, enter their ID here without brackets or quotes. You can find the agent’s ID using this method. If this parameter is not set, the case will be created on behalf of the user.
— "case_email_id" – is required to create a case on behalf of a specific email address connected to Deskie as a channel. This mailbox will also be set as the "Reply from address" address. To obtain the ID of the connected email address, use this method;
— "attachment_urls" – is used if you want to attach files to the email. To do this, list the file URLs separated by commas in the following format:
"attachment_urls": [ "https://abcompany.com/market/541322/catalog-1.pdf", "https://abcompany.com/market/541322/catalog-2.pdf" ],
— "status" – determines the status of the case you create. In this scenario, "closed" is appropriate.
Don’t forget to replace the placeholder values in the parameters subject, content_html, and case_email_id with your own data instead of the values shown in square brackets! More parameters for the request are described in the Deskie API methods.
(!) Please note that you can add your own set of actions in the rule according to your workflow.