I need a little direction with something I’m struggling with. One of my teammates previously wrote a webhook that triggered whenever an email was received. This works regardless of if the user opens the email.
I’m looking for a way to limit the amount of times the function executes so instead I’m trying to build functionality that will on a button click within the plugin, select some emails starting at the newest in the current email inbox and run a function on each of them.
Any chance someone can point me in the right direction?
Thanks!
Hello! The plugin context only has access to the conversations selected by the Front teammate in the UI. The plugin SDK can't modify the current selection. However, you could use information about a selection to perform server-side updates through the Core API.
--Evan
Got it, so truly the only way to access the contents of emails other than the currently selected email is via writing a webhook which listens for incoming emails?
Writing a webhook that listens for incoming emails and performs sever-side updates is one way. Definitely not the only way because you can also access all of a conversation's messages through the Core API as well:
https://dev.frontapp.com/reference/get_conversations-conversation-id-messages
For all the extra lifting to implement that, you may consider whether the Plugin SDK's multi-select feature addresses your bulk update needs. That is, an agent selects multiple conversation in-app and then clicks a button in the plugin to perform the action.
Reply
Login to the community
No account yet? Create an account
Use your Front credentials
Log in with FrontEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.