# 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.
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.
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.
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.
Step summary
This trigger checks Gmail for new emails at an interval you specify.
Click + Add step and select IF condition.
Set up your IF condition.
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
Step summary
This IF condition checks if the email contains attachments.
In the Yes path, click + Add step and select Repeat for each.
Set up your Repeat for each loop.
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
Step summary
This loop iterates through all the attachments in the email, ensuring that they're all processed.
Click + Add step and select IF condition.
Set up your second IF condition.
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
Step summary
This IF condition filters only image attachments.
Click Select an app and action.
Set up your Gmail Download attachment action.
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
Step summary
This step downloads the image attachment's content.
Click + Add step and select Action in app.
Set up your Workato FileStorage Create file action.
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
Step summary
This step stores the downloaded image in Workato FileStorage.
Click + Add step and select Action in app.
Set up your Workato FileStorage Generate shareable file link action.
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
Step summary
This step generates a public download link for the image.
Click + Add step and select Action in app.
Set up your Slack Post message action.
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
Step summary
This step posts the image link in Slack, which users can click to download the attachment.
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: 6/23/2025, 5:34:25 PM