# Share image attachments from email in Slack using a public link recipe
This use case guides you through connecting Gmail, Workato FileStorage, and Slack to create a powerful automation.
# What does this recipe do?
This recipe extracts image attachments from Gmail, stores them in Workato FileStorage, generates a public link, and posts it in Slack. You can use this recipe to share submitted images, reports, or visuals without manually uploading them.
# Create your recipe
Complete the following steps to create your recipe:
USE CASES ARE INTENDED AS EXAMPLES ONLY
This use case serves as an example. Modifications to triggers, actions, or conditional logic may be necessary to adapt this recipe to your workflow.
Sign in to Workato.
Select the project where you plan to create the recipe.
Create connections for Gmail and Slack:
WORKATO UTILITY CONNECTORS DON'T REQUIRE SETUP
The Workato FileStorage connector doesn't require connection setup.
Create a Gmail connection.
# Create a Gmail connection
This step creates a connection between Workato and your Gmail account.
Click Create > Connection.
Search for and select Gmail on the New connection page.
Enter a name for your connection in the Connection name field.
Use the Location drop-down menu to select the project where you plan to store the connection.
Select OAuth 2.0 as the Authentication type.
Optional. Click Advanced settings and select additional OAuth 2.0 scopes. If left blank, the following scopes are requested:
- See your primary Google Account email address
- See and edit your email labels
- Send email on your behalf
- View your email messages and settings
- Read, compose, and send emails from your Gmail account
Click Sign in with Google and sign in to your Google account to complete the setup.
Create a Slack connection.
# Create a Slack connection
This step creates a connection between Workato and your Slack account.
Click Create > Connection.
Search for and select Slack on the New connection page.
Enter a name for your connection in the Connection name field.
Slack connection setup
Use the Location drop-down menu to select the project where you plan to store the connection.
Optional. Configure Advanced and Custom OAuth profile settings if required for your account type.
Click Connect.
Go back to your project and click Create > Recipe.
Create a new recipe
Enter a name for your recipe in the Name field.
Select the project where you plan to store the recipe from the Location drop-down menu.
Click Start building.
Start building your recipe
Click Pick a starting point, then select Trigger from an app.
Click Select an app and trigger event.
Set up your Gmail New email trigger.
# Set up Gmail New email trigger
This trigger checks Gmail for new emails at an interval you specify.
Search for Gmail and select it as your app. The New email trigger is selected automatically.
Choose Gmail
Optional. Configure the Trigger poll interval field to specify how frequently to check for new events.
Optional. Configure the When first started, this recipe should pick up events from field to specify the date to retrieve emails from.
Click + Add step and select IF condition.
Set up your IF condition.
# Set up email attachments IF condition
This IF condition checks if the email contains attachments.
Switch Data field to formula mode and map the Gmail Attachments Step 1 datapill.
Set Condition to is present.
Check if the email contains attachments
Go to the Yes path and click + Add step > Repeat for each.
Set up your email attachments Repeat for each loop.
# Set up an email attachments Repeat for each loop
This loop iterates through all the attachments in the email to ensure that all attachments are processed.
Map the Gmail Attachments Step 1 list datapill to the Input list field.
Ensure Repeat mode is set to One item at a time.
Iterate through attachments list
Click + Add step and select IF condition.
Set up your image attachment IF condition.
# Set up your image attachment IF condition
This IF condition filters only image attachments.
Map the Gmail Mime type Step 1 datapill to Data field.
Set Condition to contains.
Enter image/ in the Value field.
Check the image's MIME type
Click Select an app and action.
Set up your Gmail Download attachment action.
# Set up Gmail Download attachment action
This step downloads the image attachment's content.
Search for Gmail and select it as your app.
Choose Gmail
Select the Download attachment action.
Select the Download attachment action
Map the Gmail ID Step 1 datapill to the Email ID field.
Map the Gmail Attachment ID Step 1 datapill to the Attachment ID field.
Configure the Download attachment action
Click + Add step and select Action in app.
Set up your Workato FileStorage Create file action.
# Set up your Workato FileStorage Create file action
This step stores the downloaded image in Workato FileStorage.
Search for Workato FileStorage and select it as your app.
Choose Workato FileStorage
Select the Create file action.
Select the Create file action
Map the Foreach Filename Step 3 datapill to the File name field.
Specify the location of where to create the file in the File path field.
Map the Gmail Content bytes Step 5 datapill to the File contents field.
Select the Create file action
Click + Add step and select Action in app.
Set up your Workato FileStorage Generate shareable file link action.
# Set up Workato FileStorage Generate shareable file link action
This step generates a public download link for the image.
Search for Workato FileStorage and select it as your app.
Choose Workato FileStorage
Select the Generate shareable file link action.
Select the Generate shareable file link action
Set the Scope field to Download.
Map the Workato FileStorage File path Step 6 datapill to the File path field.
Configure the Generate shareable file link action
Click + Add step and select Action in app.
Set up your Slack Post message action.
# Set up Slack Post message action
This step posts the image link in Slack, which users can click to download the attachment.
Search for Slack and select it as your app.
Choose Slack
Select the Post message action.
Select the Post message action
Use the Channel drop-down menu to specify where to post the message.
Enter a message in the Basic text field. For example, *New attachment*.
Map the Workato FileStorage File name Step 6 datapill to the Attachment title field.
Map the Workato FileStorage Shareable link Step 7 datapill to the Attachment title link field.
Optional. Enter text in the Attachment text field. This text appears under the attachment link.
Configure the Post message action
Outcome
Click Save.
Your Share image attachments from email in Slack using a public link recipe is ready to test and implement.
Example recipe configuration.
Share image attachments from email in Slack using a public link recipe
Last updated: 10/14/2025, 5:37:34 PM