Skip to main content

#Slack Developers17 debatiendo

Questions and answers about Slack APIs, SDKs and other developer tools, whether you’re building for all Slack users or just your team.

I’m working with a Salesforce Flow that processes a relatively large number of records, and I’m looking for ways to improve its performance and reliability. 

 

The Flow currently performs several record queries and updates during execution. As the amount of data increases

,

the Flow takes longer to complete and can sometimes approach Salesforce governor limits. 

 

What are some recommended approaches for optimizing a Flow in this situation? For example, would reducing Get Records operations, using collections more effectively, or moving some logic to Apex help? 

 

I’d appreciate any practical suggestions or best practices for designing scalable Salesforce Flows. 

 

#Salesforce Platform  #*saleforce Platform Basic* - Understand The Salesforce Architecture  #Flows  #Slack Developers  #Automation

3 respuestas
  1. 29 sept, 10:31

    Hi @James K.k

     

     

    The biggest win is usually reducing database operations, not just reducing Flow elements.

    I’d bulkify the Flow around collections, eliminate Get Records/DML inside loops, and query only the fields/records actually needed. If the volume or logic still pushes governor limits, I’d move that part to Apex and let Flow handle the orchestration.

0/9000

I have developed a Slack app that integrates with Salesforce. The app's Request URL currently points to my Salesforce Site endpoint, which processes Slack events using Apex. 

 

I plan to distribute this app to multiple customers. Each customer has their own Salesforce org and therefore their own Site URL. 

 

Since a Slack app supports only a single Request URL, how can a multi-tenant architecture be implemented?     What is the recommended approach for routing requests to the correct customer's Salesforce org after they install the app? 

1 respuesta
  1. 17 sept, 10:27

    This is a standard multi-tenant integration problem, and the fix is to decouple "receiving the Slack event" from "which customer org owns it":

    1. One shared gateway endpoint, not tied to any single customer's org — this can be a lightweight middleware/integration layer (or even a Salesforce org dedicated to this purpose) that owns the single Slack Request URL and does nothing except receive and route events.
    2. A mapping table (Slack team_id → customer org connection details: instance URL, auth credentials/Named Credential reference) that the gateway looks up on every incoming event. Slack always sends team_id in the payload, so this is your routing key.
    3. Outbound callout to the correct org, authenticated per customer — typically via a Named Credential (or OAuth JWT flow) configured per tenant, so the gateway calls each customer's org as an external system rather than the customer's org receiving Slack traffic directly.
    4. Verify the Slack signature per request against the shared signing secret before you even look at the payload — since one endpoint now serves multiple tenants, this check is what prevents cross-tenant spoofing.

    If you don't want to stand up separate middleware, you can implement the gateway as a small Salesforce org (or a lightweight Apex REST service in whichever org you already control) whose only job is to receive, authenticate, look up the tenant, and forward — keeping the actual business logic entirely inside each customer's own org. The two things that matter most in this shape (a single inbound entry point fanning out to multiple external systems based on a routing key) are keeping the routing/credential mapping data out of code (custom metadata or a protected custom object) and validating the source signature before any routing decision. 

0/9000

We are seeing a repeating error from the Salesforce Slack app whenever a user posts a message in Slack. The message in the channel is delivered normally, but the author also gets an ephemeral error in the Salesforce app DM. 

 

Error (Only visible to you): 

There was a problem processing the Slack event MESSAGE_EVENT ErrorType: NullPointerException 

 

This happens on every message typed directly in Slack. 

Please advise how to stop the Salesforce app from sending these errors (configuration, scopes/event subscription, or a known platform issue). If the user sends a message from Salesforce, this error does not occur and everything works correctly;  

 

 

There was a problem processing the Slack event MESSAGE_EVENT ErrorType: NullPointerException

 

 

 

#Slack  #Slack Developers  #Slack Community  #Integration

3 respuestas
  1. 17 sept, 7:37

    Hey Maksimilian, 

     That error is the Apex SDK for Slack telling you your message-event handler threw an unhandled exception — it's coming from your Apex code, not Slack itself. That's also why it only happens on inbound Slack messages: sending from Salesforce never touches that handler, so nothing throws.

    Turn on debug logs for the integration user and post one test message — the log will show the exact line that's null.

    Usual causes:

    • Message subtypes (bot messages, edits, thread replies, channel_join) hit the same handler but don't carry the same fields, so event.getUser()/getText() comes back null if you assume every message looks the same.
    • A SOQL lookup by user/channel ID returning no rows, then grabbing [0] before checking.

    Fix is null-guarding the handler itself — no need to touch scopes or event subscriptions. Happy to look at the handler class if you want to share it. 

0/9000

⛰️🛡️ New Hands-on Workshop for Premier & Signature Developers: Secure the Code: Find and Fix Vulnerabilities (DEX003) 

 

Insecure custom code is one of the leading causes of data breaches. In this 90-minute instructor-led workshop, you'll step into the role of a security-focused developer to audit and remediate critical vulnerabilities in Lightning components and Apex classes through a series of challenges.  

This hands-on workshop teaches developers how to prevent script injection, encrypt data securely, manage secrets, and control record access. You'll also learn to identify authentication flaws and data exposure risks. this practical workshop is for developers working with custom code at any stage: 

  • Build new code — learn to bake in secure patterns from the start, so vulnerabilities never make it to production
  • Review existing code — sharpen your eye for spotting injection flaws, insecure data handling, and access control gaps in code you didn't write
  • Maintain and harden production orgs — Use the Developer Console or VS Code to apply Salesforce platform security best practices that protect applications from evolving threats

Sessions are live and available! :calendar:

  • Wed Sep 2 — 3:30pm CET/Paris
  • Tues Sep 8 — 3:30pm ET/New York
  • Mon Sep 21 — 9am IST/Kolkata
  • Mon Oct 19 — 9am ET/New York
  • Check the session listings for additional workshops across regions :tada:

Interested in the Admin version of this security workshop? Check out upcoming sessions for ADX012

 

👉 Premier and Signature customers — Register today on Trailhead Academy — Course code: DEX003

 

#Salesforce Developer #Slack Developers

4 comentarios
  1. 9 sept, 5:27

    This is a great hands-on initiative for Salesforce developers. Security is often overlooked during development, so learning how to identify and fix vulnerabilities in Apex and Lightning components is extremely valuable. The practical, challenge-based approach makes this especially useful for developers working on real-world orgs. 

0/9000

We are facing a limitation with the Slack sandbox (developer environment), where the user limit is restricted to 8 members. For our use case, this is quite limiting, as we want to perform realistic UAT and integration testing that closely mirrors our production environment.

I have a couple of questions:

  1. Are there any options or recommended approaches to create a sandbox/testing environment that more closely resembles a production Enterprise Grid setup (in terms of users, apps, and integrations)?
  2. How are other organizations handling large-scale testing given the sandbox user limit?
  3. What are the best practices or enterprise-level strategies for testing Slack + Salesforce integrations before going live?

Any guidance, real-world experiences, or recommended approaches would be greatly appreciated.

Thanks in advance! 

 

#Slack Community  #Slack Developers  #Slack  #Slack Basics

4 respuestas
  1. 30 ago, 2:12

    This is a good point about the challenge of testing Slack + Salesforce integrations at enterprise scale. With an 8-member sandbox limit, using a combination of focused integration tests, representative test users, and staged UAT seems like a practical way to identify issues before production.

    For smaller customization needs during UAT, tools such as espaço invisível para copiar e colar can also be useful when testing how different text formats, usernames, or messages behave across Slack and other platforms.

0/9000

 Hi there! Happy to join this community😊 

 

I build an incident management app and I'd like to keep a channel canvas title in sync with the incident status. I've been able to create the canvas through the API but the following updates of the canvas title don't get reflected in the canvas tab name.

The only workaround I found is to manually clear the tab name so that it get in sync with the canvas title.

I couldn't find a way to do it through the API. 

 

Is this a known limitation of the API..? I guess it's a niche topic 😅 

 

Thanks for your help! 

 

#Slack Developers

3 respuestas
  1. 21 ago, 16:39

    Hey Sebastien, 

     

    Not a bug in your API usage, this is a genuine gap. The canvases.edit rename operation with title_content updates the canvas's underlying title, but Slack's channel canvas tab has a separate, independently-set "tab name" property. That tab name gets set once (typically when the canvas is first added to a tab) and doesn't automatically re-sync to the canvas title afterward, which matches exactly what you're seeing: manually clearing the tab name forces it to re-sync, but API-based title renames don't propagate to it. 

     

    I couldn't find any Slack API method (canvases.edit, canvases.sections.lookup, conversations.canvases.create) that exposes or resets the tab name specifically, only the canvas title itself. So this looks like a genuine limitation, not something you're missing, there's no documented API method for touching the tab name independently. 

     

    Worth filing this as a bug/feature request via Slack's developer support, since the manual "clear the tab name" workaround you found is really a UI-only re-sync trigger that has no API equivalent yet. 

     

    Reference:

    https://docs.slack.dev/reference/methods/canvases.edit/

0/9000

I'm developing an onboarding plans via API in slack canvas and I wanted to make an interactive element inside of a table but it seems that tables in cavases aren't supporting interactive elements, for example checkboxes 

 

any plans to enable this? 

 

#Slack Developers

3 respuestas
  1. 21 jul, 21:16

    Yes , Canvas content is Markdown-based So Slack Canvas tables don't support interactive elements like checkboxes, buttons, or dropdowns.

0/9000

Hi Everyone,

Please share the complete end-to-end details required for the setup of SlackCRM Business plus V2 edition , along with all related prerequisites. This is urgently required from my end, and I would appreciate your prompt support.

The following details are required:

  • SlackCRM setup process
  • Limitations and constraints of SlackCRM
  • Prerequisites for integrating Salesforce with Slack Business+ V2
  • Limitations related to email and storage
  • Any additional setup dependencies, configurations, licensing, or technical considerations

Please provide all available documentation and relevant details associated with this setup.

Looking forward to your response.

Thanks. 

 

#Slack Developers  #Slack Community  #Slack Certified  #Slack Basics

3 respuestas
  1. 26 jun, 12:14

    From what I've been seen so far, SlackCRM on Business+ V2 appears to require both the appropriate Slack subscription and compatible Salesforce licensing, but the publicly available documentation on the setup process and limitations seems quite limited.

    For anyone planning a deployment, I would recommend verifying:

    • Required Slack and Salesforce license types
    • Admin permissions and authentication requirements
    • Supported integration features on Business+ versus Enterprise Grid
    • Sandbox and testing limitations
    • Data retention, storage, and email-related constraints

    If anyone from Slack or someone who has already implemented SlackCRM in production could share the official documentation or real-world experience, it would be extremely helpful for the community.

0/9000

Hi Everyone, 

Please share the complete end-to-end details required for the setup of SlackCRM Business plus V2 edition , along with all related prerequisites. This is urgently required from my end, and I would appreciate your prompt support. 

The following details are required:

  • SlackCRM setup process
  • Limitations and constraints of SlackCRM
  • Prerequisites for integrating Salesforce with Slack Business+ V2
  • Limitations related to email and storage
  • Any additional setup dependencies, configurations, licensing, or technical considerations

Please provide all available documentation and relevant details associated with this setup.

Looking forward to your response.

Thanks.  

 

 

 

#Slack Community

1 respuesta
  1. 22 jun, 20:54

    Hi there! Great questions, happy to help clarify what's available with the customer management feature in the new version of Slack Business+. 

     

    What is it?

     

    Slack's built-in CRM tools let you build contact records, log customer interactions, and collaborate with your team — all within Slack. Under the hood, it relies on Salesforce Free Edition, which is automatically created when you set up a contact list.  

     

    End-to-end setup process

     

     

    Step 1 — Enable customer management 

    • Click your profile picture → Preferences → Salesforce → Create New Salesforce Org
    • This must be done by a Workspace Owner

    Step 2 — Create your contact list 

    • Import from Gmail, a CSV file, or build from scratch
    • Access via: Home tab → Salesforce section in the sidebar → All Contacts

    Step 3 — Assign access 

    • Go to Admin → Manage Salesforce Organizations → select your org → Users tab → Add users to Salesforce org
    • Up to 100 people can be granted access
    • Permission levels are available via a drop-down menu

    Key capabilities

    • Log customer interactions (calls, emails, meetings) directly from a contact record 
    • Share contacts in DMs or channels 
    • Auto-sync Google Calendar and email events via Einstein Activity Capture 
    • Customize contact fields (add priority, status, and more) 

    Known limitations / constraints 

    • Access is capped at 100 users
    • Runs on Salesforce Free Edition — advanced Salesforce features/configurations beyond what's described in the help article are not part of this offering 

    For the full setup walkthrough, check out the official help article: Manage customer contacts in Slack

0/9000

Hi All, 

 

I am simply trying to send a slack channel message whenever an opportunity moves to closed won stage.  

 

I have an opportunity record trigger asycn flow that simply runs down the 'run async' path and has a decision check on the opportunity stage. If closed won, it runs down to Send Slack Message action and I have populated the required fields, slack app, slack workspace, executive action as, slack conversation id, and the slack message. 

 

However, during debug in my developer sandbox, I keep getting the error message:  

" 

We couldn't run action

Send Slack Message because something went wrong.

 

Hide Error

 

Info

Error

An error occurred. Try again, or contact Salesforce Customer Support and provide this error ID: 1299900440-35892 (820288246)

Inputs

slackAppIdForToken = A03269G3DNE

slackWorkspaceIdForToken = T0AUVR7GZ62

userIdForToken = null

slackConversationId = C0AUUNER0PP

slackBotName = null

slackMessage = {!tt_SlackClosedWonNotification} (Hello team, A new opportunity has been marked Closed Won. Here are the details: Opportunity: Test Contract Type Account: 001WG00001AjV6DYAV Owner: Amount: Type: New Business)

viewApiName = null

recordId = {!$Record.Id} (006WG00000sl8HZYAY)

slackMessageTimestamp = null 

" 

 

Am I doing something wrong? The details appear to be grabbing the correct values from my test opportunity? Perhaps my slack conversation id is incorrect? 

 

Thanks in advance.  

 

-Roman 

 

#Slack Community  #Slack Developers  #Slack

2 respuestas
  1. 28 may, 1:43

    @Gohar Clients thanks for the message back. I was able to solve the issue FYI by using the alternative send message to slack channel DML instead. That slack action only needed a slack channel id and an email template. 

0/9000