Venafi Cloud Slack Cert Bot n8n Workflow Template

n8n workflow template · 23 nodes · Venafi TLS Protect Cloud

Venafi Cloud Slack Cert Bot is a free n8n workflow template that starts when its webhook receives an HTTP request and works with Venafi TLS Protect Cloud, OpenAI and Slack. It has 23 nodes, 1 of them AI nodes (OpenAI). The notes inside the workflow say: “The first node receives all messages from Slack API via Subscription Events API. You can find more information about setting up the subscription events API by clicking here.” To run it, you add your own credentials for OpenAI API, Slack API, Venafi TLS Protect Cloud API and Virus Total API.

At a glance

Trigger
Webhook (Webhook)
Nodes
23
Apps
Venafi TLS Protect Cloud, OpenAI and Slack
AI nodes
1
Credentials
4 types
Category
IT, security and DevOps

Apps and integrations

  • Venafi TLS Protect Cloud
  • OpenAI
  • Slack

Node types used

  • Venafi TLS Protect Cloud
  • Edit Fields (Set)
  • Respond to Webhook
  • HTTP Request
  • Execute Workflow
  • If
  • Merge
  • OpenAI
  • Slack
  • Switch
  • Webhook

How it works

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

Events Webhook Trigger

The first node receives all messages from Slack API via Subscription Events API. You can find more information about setting up the subscription events API by clicking here.

The second node extracts the payload from slack into an object that n8n can understand.

Efficient Slack Interaction Handling with n8n

This section of the workflow is designed to efficiently manage and route messages and submissions from Slack based on specific triggers and conditions. When a Slack interaction occurs—such as a user triggering a vulnerability scan or generating a report through a modal—the workflow intelligently routes the message to the appropriate action

  • Dynamic Routing: Uses conditions to determine the nature of the Slack interaction, whether it's a direct command to initiate a scan or a request to generate a report.
  • Modal Management: Differentiates actions based on modal titles and callback_ids, ensuring that each type of submission is processed according to its context.
  • Streamlined Responses: After routing, the workflow promptly handles the necessary responses or actions, including closing modal popups and responding to Slack with appropriate confirmation or data.

Purpose: This mechanism ensures that all interactions within Slack are handled quickly and accurately, automating responses and actions in real-time to enhance user experience and workflow efficiency.

Display Modal Popup

This section pops open a modal window that is later used to send data into Virustotal, then depending on those results, to Venafi or Slack for manual approval.

Modals can be customized to perform all sorts of actions. And they are natively mobile! Additionally, messages themselves can perform actions if you include inputs like buttons or field inputs.

Learn more about them by clicking here

URL Analysis with VirusTotal

The first node receives all messages from Slack API via Subscription Events API. You can find more information about setting up the subscription events API by clicking here.

The second node extracts the payload from slack into an object that n8n can understand.

Run Workflows within other Workflows like Functions

This section of the workflow contains 2 subworkflows that translate the Slack User ID to an email and name, and the Slack Team ID into the team name and Avatar of the team to make the slack messages more visual. This allows you to reuse these flows like you would use a function in code.

These nodes run parallel to each other so they will not override the data generated by each thread, and then are joined using the Merge nodes.

Manual CSR Generation via Venafi

Contextual data from the Slack user's webhook is used to gather the needed contextual data, such as the name of the Slack team/group the user is in and their email and name if needed. Please note this section is still a proof of context and may not work exactly as expected.

For automatic CSR Generation to work, ensure you have a Vsatelite deployed and active.

Efficient Slack Interaction Handling with n8n

This section of the workflow is designed to efficiently manage and route messages and submissions from Slack based on specific triggers and conditions. When a Slack interaction occurs—such as a user triggering a vulnerability scan or generating a report through a modal—the workflow intelligently routes the message to the appropriate action

Automatic CSR Generation via Venafi

Contextual data from the Slack user's webhook is used to gather the needed contextual data, such as the name of the Slack team/group the user is in and their email and name if needed.

For automatic CSR Generation to work, ensure you have a Vsatelite deployed and active.

Send Contextual Message to Slack

This section pops open a modal window that is later used to send data into TheHive.

Modals can be customized to perform all sorts of actions. And they are natively mobile! You can see a screenshot of the Slack Modals on the right.

Learn more about them by clicking here

Setup notes

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

Enhance Security Operations with the Venafi Slack CertBot!

Our Venafi Slack CertBot is strategically designed to facilitate immediate security operations directly from Slack. This tool allows end users to request Certificate Signing Requests that are automatically approved or passed to the Secops team for manual approval depending on the Virustotal analysis of the requested domain. Not only does this help centralize requests, but it helps an organization maintain the security certifications by allowing automated processes to log and analyze requests in real time.

  • Interactive Modals: Utilizes Slack modals to gather user inputs for scan configurations and report generation, providing a user-friendly interface for complex operations.
  • Dynamic Workflow Execution: Integrates seamlessly with Venafi to execute CSR generation and if any issues are found, AI can generate a custom report that is then passed to a slack teams channel for manual approval with the press of a single button.
  • Parse Webhook Data: Captures and parses incoming data from Slack to understand user commands accurately.
  • Execute Actions: Depending on the user's selection, the workflow triggers other actions within the flow like automatic Virustotal Scanning.
  • Respond to Slack: Ensures that every interaction is acknowledged, maintaining a smooth user experience by managing modal popups and sending appropriate responses.
  • Verify that Slack and Qualys API integrations are correctly configured for seamless interaction.
  • Customize the modal interfaces to align with your organization's operational protocols and security policies.
  • Test the workflow to ensure that it responds accurately to Slack commands and that the integration with Qualys is functioning as expected.
  • Explore Venafi's Documentation or get help from the n8n Community for more detailed guidance on setup and customization.

Deploy this bot within your Slack environment to significantly enhance the efficiency and responsiveness of your security operations, enabling proactive management of CSR's.

Don't forget your slack credentials!

Thankfully n8n makes it easy, as long as you've added credentials to a normal slack node, these http nodes are a snap to change via the drop down.

Parse Response with AI Model

This workflow currently uses OpenAI to power it's responses, but you can replace the AI Agent node below and set your own local AI LLM using the n8n options offered.

Nodes in this workflow

The 23 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. Venafi TLS Protect Cloud (Venafi TLS Protect Cloud)
  2. Parse Webhook (Edit Fields (Set))
  3. Close Modal Popup (Respond to Webhook)
  4. Respond to Slack Webhook - Vulnerability (Respond to Webhook)
  5. Venafi Request Certificate (HTTP Request)
  6. Extract Fields (Edit Fields (Set))
  7. Get Slack User ID (Edit Fields (Set))
  8. Translate Slack User ID to Email (Execute Workflow)
  9. VirusTotal HTTP Request (HTTP Request)
  10. Summarize output to save on tokens (Edit Fields (Set))
  11. Auto Issue Certificate Based on 0 Malicious Reports (If)
  12. Get Slack Team ID (Edit Fields (Set))
  13. Execute Workflow (Execute Workflow)
  14. Merge User and Team Data (Merge)
  15. OpenAI (OpenAI)
  16. Merge Requestor and VT Data (Merge)
  17. Send Auto Generated Confirmation (Slack)
  18. Send Message Request for Manual Approval (Slack)
  19. Route Message (Switch)
  20. Venafi TLS Protect Cloud1 (Venafi TLS Protect Cloud)
  21. Send Auto Generated Confirmation1 (Slack)
  22. Webhook (Webhook)
  23. Respond to webhook success (Respond to Webhook)

Credentials you need

  • OpenAI API – used by OpenAI
  • Slack API – used by Send Auto Generated Confirmation, Send Auto Generated Confirmation1, Send Message Request for Manual Approval and Venafi Request Certificate
  • Venafi TLS Protect Cloud API – used by Venafi TLS Protect Cloud and Venafi TLS Protect Cloud1
  • Virus Total API – used by VirusTotal HTTP Request

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
  3. Open each node that shows a warning and select or create its credential.
  4. Read the notes on the canvas, test the workflow with sample data, then activate it.

Do you need somewhere to run it? Read our guide to self-hosted n8n.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us