English French Spanish
English French Spanish

Slack Webhook [BETA]

Connecting to Slack

Slack receives events as readable messages in a channel rather than as raw data. Electric writes each message for you, with a bold title, a short sentence, and the relevant details underneath. Task events also include a View details link back into Electric.

Steps in Slack:

  1. Log in to Slack

  2. Navigate to Agents & tools and then select Open in Slack Marketplace

  3. In the Slack Marketplace select Manage and then Custom integrations

  4. Select Incoming webhooks

  5. Click Add a configuration, or Edit an existing one

  6. Choose a default channel

  7. Copy the Webhook URL

Need detailed instructions? Slack documents this in Legacy custom integrations: incoming webhooks. Slack now recommends app-based incoming webhooks for new setups, and either kind of address works with Electric.

Steps in Electric:

  1. Log in to Electric

  2. Select Settings, then the Webhooks tab

  3. Click Create webhook and select Slack

  4. Enter a Name for the webhook

  5. Paste the Slack webhook URL into Endpoint URL

  6. Enter a Channel to override the default you chose in Slack, for example #it-alerts, or leave it blank to use that default

  7. Enter a Username to control the name shown on each message, for example Electric IT Hub, or leave it blank

  8. Select your topics, leave Active on, and Click Create webhook

  9. You are all set!

Please note: A Slack incoming webhook posts to one channel. To send the same events to more than one channel, create a separate incoming webhook in Slack and a separate webhook in Electric for each channel.

What each Slack message looks like

Electric writes each Slack message for you, with a bold title, a short sentence, and the relevant details underneath. The table shows the message for each event, using the sample data from a test event. Your messages will show your own employee, group, and task details.

Event

Message

employee.created

New employee: Jane Doe
Jane Doe was added to the organization.
Job title: Software Engineer
Email: jane.doe@example.com

employee.updated

Employee updated: Jane Doe
Jane Doe's profile was updated.
Job title: Senior Software Engineer
Email: jane.doe@example.com
Previous job title: Software Engineer

employee.offboarded

Employee offboarded: Jane Doe
Jane Doe was offboarded.
Job title: Software Engineer
Email: jane.doe@example.com

employee.reactivated

Employee reactivated: Jane Doe
Jane Doe was reactivated.
Job title: Software Engineer
Email: jane.doe@example.com

employee.group_added

Jane Doe added to a group
Jane Doe was added to group Example Group.
Job title: Software Engineer
Email: jane.doe@example.com

employee.group_removed

Jane Doe removed from a group
Jane Doe was removed from group Example Group.
Job title: Software Engineer
Email: jane.doe@example.com

group.created

New group: Example Group
Group Example Group was created.
Employees: 0

group.updated

Group updated: Example Group (renamed)
Group Example Group (renamed) was updated.
Employees: 0
Previous name: Example Group

group.deleted

Group deleted
Group 00000000-0000-0000-0000-000000000000 was deleted.

request.created

New request: Grant access to Slack
Grant access to Slack was requested.
Requester: Sam Lee (sam.lee@example.com)
Requested for: Jane Doe (jane.doe@example.com)
View details

request.completed

Request completed: Grant access to Slack
Grant access to Slack was completed.
Requester: Sam Lee (sam.lee@example.com)
Assignee: Alex Rivera (alex.rivera@example.com)
View details

request.canceled

Request canceled: Grant access to Slack
Grant access to Slack was canceled.
Requester: Sam Lee (sam.lee@example.com)
View details

request.automation_failed

Request automation failed: Grant access to Google Workspace
Automation failed for: Grant access to Google Workspace.
Requester: Electric Support (support@electric.ai)
Requested for: Jane Doe (jane.doe@example.com)
View details

Please note: View details is a link that takes you to the task in Electric. Messages for task events use the word "request", to match the event names such as request.created.

Which lines appear

Some lines only appear when the information is available.

Employee events

  • The Job title and Email lines appear only if the employee has them.

  • If the employee has no first or last name, the message says "An employee" instead.

  • Previous lines appear only on employee.updated, and only for fields that changed. There is one line for each changed field, such as Previous job title, Previous email, or Previous groups. A value that was cleared shows as "(none)". The sample above changes only the job title, so only one Previous line shows.

  • If the group name is missing on employee.group_added or employee.group_removed, the message says "an unknown group".

Group events

  • Employees always appears on group.created and group.updated, and shows 0 if the count is missing.

  • Previous lines appear only on group.updated, and only for fields that changed. The fields are name, parent group, and employee count.

  • If the group name is missing, the message says "Unknown group".

  • group.deleted has no detail lines, and the sentence shows the group's ID.

Task events

  • Requester, Requested for, and Assignee each appear only if that person exists and has a name. Their email appears in parentheses when there is one. Requested for is the person the task was raised for.

  • View details appears only if the task has an ID.

  • If a task has no title, the message uses the task type instead.