Set up Slack notifications with Webhooks and Zapier

Mediagraph Support
Mediagraph Support
  • Updated

Who can use this feature?

Admins, Content Managers and Library Managers

Available on all plans with a Zapier account

Webhooks are a way for apps to automatically send messages or information to each other. They enable different apps to communicate with each other whenever something new happens. Zapier is an application that uses webhooks to integrate your Mediagraph account with various web apps.

Sending a notification in Slack is one of the many processes that can be automated using Webhooks and Zapier. This means that any time a new asset is added to a designated container in Mediagraph, a message is automatically sent in a Channel of your choosing on your organization's Slack account. This is an easy way to notify members of your team any time a new file comes in through a contribution request or another upload pipeline. This integration can also allow you to receive a notification in Slack alerting you to a request for review or a new approval, among other things.

Slackmsg.png

In this example, a notification is sent whenever a file has been added to a Lightbox. The notification has been set up to include the names of the file, Lightbox, and user who added it. It also includes a thumbnail. There are a number of other configurations possible, according to your needs.

Create a Zapier Account

  1. Follow this link to open the Mediagraph Webhook to Slack template on Zapier.
  2. Click Sign up and try this Zap.
  3. If you already have a Zapier account, log in. If you do not, enter your name and email address, and choose a password for your new account. Click Get Started Free after each prompt. At the end of the signup process, you should be redirected back to the Mediagraph template from earlier. If not, click the link in step one again.

Set up and test a Webhook in Mediagraph and Zapier.

  1. In the Mediagraph Webhook to Slack template, click to open the Trigger panel at the top of the page.
  2. In the Test panel, copy the link under Your Webhook URL to your clipboard.
  3. In another tab or window, open the Manage tab of your Mediagraph account. You will need to keep Mediagraph and Zapier open simultaneously for the rest of the setup process.
  4. Select Integrations from the sidebar. 
  5. Click Add New in the top right corner of the Webhooks panel.
  6. Paste the URL copied from the Zapier test panel into the URL field.
  7. Click Send Test.
  8. Back in Zapier, click Test Trigger. If the test was successful, you should see “request A” from Mediagraph, with a message reading “Test POST.” If the test was not successful, ensure the URL copied into Mediagraph matches the URL in Zapier.
  9. Back in Mediagraph, Add a Name and descriptive Note (optional) to your new webhook.
  10. Click the slider to switch “Group Assets in payload?” to No.
  11. Select a source container. This can be a new container you create, or an existing Lightbox, Collection, or Storage Folder. 

    Make sure you choose the correct container, as all assets added to it after the webhook has been enabled will trigger a Slack message.

  12. At the top of the page, click the enabled/disabled slider to enable your webhook.
  13. Click Save Webhook.
  14. Test your webhook by adding an asset to your designated source container. Webhooks001.png
  15. Go back to the Test panel in Zapier.
  16. Click Request A.
  17. In the dropdown, click Load more. You should now see Request B. If you do not, the second test was unsuccessful. Make sure you have selected the correct container when setting up your webhook in Mediagraph. 
  18. Click Request B to select it. Make sure the filename matches the asset you added to the source container.
  19. If the test was successful, click Continue to open the Action tab, where you can connect your webhook to Slack.

     

    webhooks002.png

Connect your Webhook to Slack

  1. In the Action tab, click Sign in to open a pop-up where you can sign in to your Slack account.
  2. Follow the prompts to find your Workspace, sign in to your account, and allow Zapier to access Slack.
  3. Back in the Action tab of Zapier, confirm that your account has been connected and click Continue to open the next panel, where you can configure the content of your Slack notification.

slack002.png

Configure your Slack Notification

Here are some suggestions for one way to configure your Slack notification. Any of these settings can be adjusted to fit your organization's needs.

  1. Begin setting up your Slack Notification by choosing a Channel to send the message in. Here, a pre-existing channel named #zapier has been created and selected for the purposes of this demo.
  2. Next, format your Message Text. We recommend using some of the fields included in your second test from earlier, in order to include information specific to the new file. These are visible in the Insert Data ... dropdown, which appears when you click on the Message Text field. You can copy and paste the following example, but make sure to delete the name of each field (in parentheses) and replace with the matching field from the dropdown.  (Owner User Name) added "(Assets Filename)" to the "(Asset Group Path Names)" (Asset Group Type) in Mediagraph. (URL)
  3. Type Mediagraph under Bot Name.
  4. Copy this link:

    and paste under Bot Icon
  5. Change Include a link to this Zap? to No.
  6. Change Auto-Expand Links? to No.
  7. Click Continue to finish configuration and move on to the Test panel.
  8. Click Test. If the test was successful, a message will be sent to the Slack channel you selected.
  9. Verify that the test message is formatted correctly, and click Publish and Turn On in Zapier to begin automating Slack notifications. slack003.png

To learn more about how to use webhooks with your Mediagraph account, see our guides linked below:

Getting Started with Webhooks

Add a New Webhook

Set up Wordpress integration with Webhooks and Zapier

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request