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.
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
- Follow this link to open the Mediagraph Webhook to Slack template on Zapier.
- Click Sign up and try this Zap.
- 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.
- In the Mediagraph Webhook to Slack template, click to open the Trigger panel at the top of the page.
- In the Test panel, copy the link under Your Webhook URL to your clipboard.
- 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.
- Select Integrations from the sidebar.
- Click Add New in the top right corner of the Webhooks panel.
- Paste the URL copied from the Zapier test panel into the URL field.
- Click Send Test.
- 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.
- Back in Mediagraph, Add a Name and descriptive Note (optional) to your new webhook.
- Click the slider to switch “Group Assets in payload?” to No.
- 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.
- At the top of the page, click the enabled/disabled slider to enable your webhook.
- Click Save Webhook.
- Test your webhook by adding an asset to your designated source container.
- Go back to the Test panel in Zapier.
- Click Request A.
- 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.
- Click Request B to select it. Make sure the filename matches the asset you added to the source container.
- If the test was successful, click Continue to open the Action tab, where you can connect your webhook to Slack.
Connect your Webhook to Slack
- In the Action tab, click Sign in to open a pop-up where you can sign in to your Slack account.
- Follow the prompts to find your Workspace, sign in to your account, and allow Zapier to access Slack.
- 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.
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.
- 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.
- 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)
- Type Mediagraph under Bot Name.
- Copy this link:
and paste under Bot Icon. - Change Include a link to this Zap? to No.
- Change Auto-Expand Links? to No.
- Click Continue to finish configuration and move on to the Test panel.
- Click Test. If the test was successful, a message will be sent to the Slack channel you selected.
- Verify that the test message is formatted correctly, and click Publish and Turn On in Zapier to begin automating Slack notifications.