Email piping lets you, your agents, and your users reply to chat messages via email.
Activation
To activate the email piping go to Settings > Notifications > Email piping and enter your POP3/IMAP email server information, then set the email address to use for the email piping in Settings > Notifications > SMTP and you’re done! The email address must be the one to which the email piping server connects to. ParrotGPT will send all emails from this email address and you, your agents, and your users will reply to this email address.
Information
- The email address of Settings > Notifications > SMTP > Sender email must match the one used by the email piping server.
- The setting Notifications > User email notifications must be enabled to send replies to the user email.
- If you’re using the Artificial Intelligence app, and the settings Settings > Artificial Intelligence > Human takeover is active, no emails are sent if the chatbot knows the answer.
- If the setting Convert all emails is active, all emails sent to your inbox will be converted to chat messages, mind that all emails, including spam, promotional emails and more would be wrongly converted too.
- If the setting convert all emails is active, email sent by email addresses of agents and admins will be ignored, use another email address for testing.
- If the setting convert all emails is active, each email sent directly to the email piping address will generate a new user conversation.
- You can not use the same email address used for the email piping to reply. All your ParrotGPT agents and admins must use a different email address.
- Agents must reply via email from the same email address registered in ParrotGPT.
- When agents reply in ParrotGPT, emails are always sent to the user, even if user email notifications are disabled.
- The email is sent to the Agents only if they are offline. If they are online no emails are sent.
- For Google Gmail and Google Workspace emails, you need to replace your Google password with a Google app password, details on https://support.google.com/accounts/answer/185833 (Create & use App Passwords section). Enter imap.gmail.com as host and 993 as port.
- Email piping requires php5-imap module (IMAP module). If it’s not installed on your server you can install it with the command apt-get install php5-imap. If you have issues contact your hosting/server support.
- The Delimiter option add a text at the top of all emails: ### Please type your reply above this line ###. This text tells ParrotGPT to delete all the content below it and it’s usefult to cut out all of the reply quotes. Activate it if you see duplicated messages in the chat. If this option is active, you and your users can not use the string ### in the emails.
- Email attachments are supported.
- In order for email piping to work, email replies must contain the ParrotGPT recipient’s name. Ex. ParrotGPT | SB2457-4734 <[email protected]>. All major email clients like Outlook Web, Outlook, Gmail, Yahoo Mail, support the recipient’s name by default via chatbot reply or reply all buttons.
- Because of the nature of how emails work, each email client uses their personal codes, delimiters, and automatic strings, and more. For this reason, some chat messages converted from emails can contain invalid texts. We are working to optimize as many email clients as possible, for now, the following email clients are optimized and should not return any invalid text: Outlook Web, Outlook, Gmail, Yahoo Mail.
- Email piping supports departments, if the user’s conversation is assigned to a department, the email notifications are sent only to the agents assigned to that department.
- If the email includes the reply-to attribute, it will serve as the primary user email address and notifications will be sent to that email.
Cron job
- ParrotGPT tries to process emails via cron jobs every 60 seconds, details here.
- You can manually trigger execution and speed up cron jobs via API with the PHP function sb_email_piping(), or the WEB API function email-piping.
- You can create a cron job that runs the URL [ParrotGPT-URL]/include/api.php?piping=true. Use the command */59 * * * * wget [ParrotGPT-URL]/include/api.php?piping=true to run it via a command. Replace [ParrotGPT-URL] with your ParrotGPT URL. To obtain the URL, follow these steps:
If you are using the WP or PHP version, go to Settings > Miscellaneous > ParrotGPT URL. If you are using the cloud version, use this URL: https://app.parrotgpt.ai/script/include/api.php?piping=true&cloud=API-TOKEN and replace API-TOKEN with your own API Token which can be found at https://app.parrotgpt.ai/account/?tab=installation. - You can also use this cron job file: download. The cron job command is php -f YOUR-FILE-PATH/cron.php.
- If you manually run the cron job, check the setting Disable cron job to stop ParrotGPT from manually triggering it and to improve performance.