Quick overview This workflow runs daily, pulls campaign stats and reply conversations from HeyReach, sends them to Twain for performance analysis, and posts a digest to Slack with optional one-click approval to apply Twain’s suggested agent updates. How it works Scheduled run Iterates through the configured pairs of Twain campaign IDs and HeyReach campaign IDs. Fetches the HeyReach campaign details, overall performance stats, and recent inbox conversations for each campaign. Packages key metrics and recent message threads and sends them to Twain’s /v2/Campaign/Analyze endpoint for analysis and optimization suggestions. Builds a Slack digest with health signals, reply themes, step diagnostics, and proposed agent changes (plus a link to the campaign in Twain when available). If there are actionable agent changes, posts the digest to Slack with Approve/Skip buttons and applies the approved changes via Twain’s /v2/Agent/Update, then confirms success or errors in Slack. If there are no changes, posts the digest only when the analysis is meaningful (for example, analyzed results or alerts), then moves on to the next campaign.
Tags
Related workflows
See all Slack→Receive and analyze emails with rules in Sublime Security
This n8n workflow provides a comprehensive automation solution for processing email attachments, specifically targeting enhanced security protocols for organizations that use platforms like Outlook. It starts with the IMAP node, which is set to ingest emails and identify those with .eml attachments. Once an email with an attachment is ingested, the workflow progresses to a conditional operation where it checks for the presence of attachments. If an attachment is found, the binary data is moved and converted to JSON format, preparing it for further analysis. This meticulous approach to detecting attachments is crucial for maintaining a robust security posture, allowing for the proactive identification and handling of potentially malicious content. In the subsequent stage, the workflow leverages the capabilities of Sublime Security by analyzing the email attachment. The binary file is scrutinized for threats, and upon detection, the information is split to matched and unmatched data. This process not only speeds up the threat detection mechanism but also ensures compatibility with other systems, such as Slack, resulting in a smooth and efficient workflow. This automation emphasizes o
Manage Slack channel and users automatically
Explore this workflow on its official n8n template page.
Uploading a file to a Slack channel
This workflow shows you how to post a message to a Slack channel and add a file attachment. It also shows you the general pattern for working with Binary data in n8n (any file like a PDF, Image etc). Specifically, this workflow shows how to download a file from a URL into your workflow, and then upload it to Slack. Video walkthrough Watch this 3 min Loom video for a walkthrough and more context on this general pattern: