Skip to main content
Reference — lookup information.
To make sure your customizable messages on our native Slack and Microsoft Teams integrations are formatted correctly, please follow the guidelines below.
  • Important Callout: If you’re on the new Advanced or Enterprise tiers, and trying to create a custom Slack message for field updates made in Affinity, check out Affinity’s new Automation Builder. Please note that Affinity’s Automation Builder is not supported for Microsoft Teams at this time.

Overview

  1. Entity
    • Person
    • Organization
    • Opportunity
  2. Entity Associations
  3. Fields
  4. Text Formatting
  5. Example

Entity

There are three objects that are accessible in configuring the Slack/Microsoft Teams message: Person, Organization, and Opportunity. It is critical that you understand which type of entity the integration is enabled for.

Person

Here are the valid expressions for a Person entity:
  • {entity.first_name}
  • {entity.last_name}
  • {entity.primary_email}

Organization

Here are the valid expressions for an Organization entity:
  • {entity.name}
  • {entity.domain}
    • Wrapping the above with <> appended with https:// will create a clickable link in Slack (not available in Microsoft Teams):
      • <https://{entity.domain}>
      • <https://{entity.domain}|{entity.name}>
      • <https://{entity.domain}|Custom Text Here>

Opportunity

Here are the valid expressions for an Opportunity entity:
  • {entity.name} Note: Affinity Data fields and enriched fields are not accessible for custom message formatting for opportunities.

Entity Associations

These are the people/organizations associated with an entity (opportunity, organization, person).
  • For a people list, you can access the organizations associated with that person using {entity.organization_names}.
  • For an organization list, you can access the people associated with that organization using {entity.person_names}.
  • For an opportunity list, you can access both the associated organizations and people using {entity.organization_names} and {entity.person_names}, respectively.
    • For both of those associations, the output will be a comma-separated list of the names of the organizations and people (see example below):
      • {entity.organization_names} => Stripe, Dropbox, Affinity
      • {entity.person_names} => Mimi Lee, Calvin Lee

Fields

These are the fields you can change to trigger a response or fields you would like to have populated in a message. Think of these as columns in your list. You can reference the fields by the Index, in the same order as your input in the list in the previous step.
  • For example, if you added [12345, 678910]
    • You can reference the field 12345 by field[0]
    • You can reference the field 678910 by field[1] It’s also important to double-check the field value Type as it changes the way you can access the actual value. See below on how to access the value of each field by type:
Field TypeOptionVariable
TextEntire Text{field[0].value}
NumberChoice of number in column{field[0].value}
DateEntire Date{field[0].value}
Ranked Dropdown (e.g. Status)Dropdown Text{field[0].value.text}
Managed DropdownDropdown option{field[0].value}
PersonFirst Name{field[0].value.first_name}
PersonLast Name{field[0].value.last_name}
PersonPrimary Email{field[0].value.primary_email}
OrganizationName{field[0].value.name}
OrganizationDomain{field[0].value.domain}
LocationStreet Address{field[0].value.street_address}
LocationCity{field[0].value.city}
LocationState{field[0].value.state}

Text Formatting

Please note that not all formatting is compatible with Microsoft Teams and Slack.
Format TypesIn AffinityIn Slack
Italicitalicsitalics
Bold*bold*bold
Strikethroughstrikethroughstrikethrough
Line Breakline\nbreaklinebreak
Link to website<https://{entity.domain}>https://affinity.co
Link to website with company name<https://{entity.domain}&#124;{entity.name}>Affinity
Link to website with custom text<https://{entity.domain}&#124;Custom Text Here>Custom Text Here
Link to Person’s Profile<https://subdomain.affinity.co/persons/{entity.id}&#124;{entity.first_name} {entity.last_name}>John Doe
Link to Organization’s Profile<https://subdomain.affinity.co/companies/{entity.id}&#124;{entity.name}>Company XYZ
Link to Opportunity’s Profile<https://subdomain.affinity.co/opportunities/{entity.id}&#124;{entity.name}>Opportunity 123
Notify the team<!here>@here

Example

Sheet View Integration View {field[1].value.first_name} just closed {entity.name} for ${field[0].value}! This will translate into: “Calvin just closed Affinity for $10000000!”

Screenshots