- •The Fetch Objects action fetches and retrieves data from Slack using GET requests or GET Slack web API methods.
The following example shows how to retrieve a list of conversations using the conversations.list method.
Query Parameters Example:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<team_id>T08FENVBW00</team_id>
<limit m:type="xs:int">2</limit>
</root>
The GET requests send all the parameters as URL query parameters, whether they are for sorting, filtering, or any other method-specific requirement. They are included in a single queryParameters field in the payload, and will already be encoded.
The following snippet is a sample response:
<root>
<channels>
<is_private>false</is_private>
<purpose>
<last_set>1740574620</last_set>
<creator>U08ENPG9HBP</creator>
<value>This is the random channel, anything goes!</value>
</purpose>
......
......
<response_metadata>
<next_cursor>dGVhbTpDMDhGNzJOUU42OA==</next_cursor>
</response_metadata>
<ok>true</ok>
</root>
- •The Update Objects action creates, updates, and deletes objects in Slack using the POST request or POST Slack Web API methods.
The following example shows how to use the chat.postMessage method to send a message to the conversation whose ID we retrieved earlier.
RequestBody:
<root>
<channel>C08ERTAC10B</channel>
<team_id>T08FENVBW00</team_id>
<text>Hello World!</text>
</root>
The following snippet is a sample response:
<root>
<channel>C08ERTAC10B</channel>
<message>
<bot_profile>
<deleted>false</deleted>
<name>PiP App</name>
<team_id>T08FENVBW00</team_id>
<id>B08EJK1N2T0</id>
<icons>
<image_36>https://a.slack-edge.com/80588/img/plugins/app/bot_36.png</image_36>
<image_48>https://a.slack-edge.com/80588/img/plugins/app/bot_48.png</image_48>
<image_72>https://a.slack-edge.com/80588/img/plugins/app/service_72.png</image_72>
</icons>
<app_id>A08ENRX7XTP</app_id>
<updated>1740409976</updated>
</bot_profile>
<blocks>
<elements>
<elements>
<text>Hello World!</text>
<type>text</type>
</elements>
<type>rich_text_section</type>
</elements>
<type>rich_text</type>
<block_id>rOn</block_id>
</blocks>
<team>T08FENVBW00</team>
<text>Hello World!</text>
<type>message</type>
<user>U08FESD94GG</user>
<app_id>A08ENRX7XTP</app_id>
<bot_id>B08EJK1N2T0</bot_id>
<ts>1741701746.069729</ts>
</message>
<ok>true</ok>
<ts>1741701746.069729</ts>
</root>
The following snippet shows a sample request body that requires a JSON-based array of structured elements instead of plain text.
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<channel>C08ERTAC10B</channel>
<blocks m:isArray="true">
<type>header</type>
<text>
<type>plain_text</type>
<text>Test block header 2</text>
<emoji m:type="xs:boolean">true</emoji>
</text>
</blocks>
<blocks m:isArray="true">
<type>section</type>
<text>
<type>mrkdwn</type>
<text>This is a section block with a button.</text>
</text>
<accessory>
<type>button</type>
<text>
<type>plain_text</type>
<text>Click Me</text>
<emoji m:type="xs:boolean">true</emoji>
</text>
<value>click_me_123</value>
<url>https://google.com</url>
<action_id>button-action</action_id>
</accessory>
</blocks>
</root>
The following snippet is a sample response:
<root>
<channel>C08ERTAC10B</channel>
<message>
<bot_profile>
<deleted>false</deleted>
<name>PiP App</name>
<team_id>T08FENVBW00</team_id>
<id>B08EJK1N2T0</id>
<icons>
<image_36>https://a.slack-edge.com/80588/img/plugins/app/bot_36.png</image_36>
<image_48>https://a.slack-edge.com/80588/img/plugins/app/bot_48.png</image_48>
<image_72>https://a.slack-edge.com/80588/img/plugins/app/service_72.png</image_72>
</icons>
<app_id>A08ENRX7XTP</app_id>
<updated>1740409976</updated>
</bot_profile>
.....
.....
<team>T08FENVBW00</team>
<text>Test block header 2 This is a section block with a button. Click Me button</text>
<type>message</type>
<user>U08FESD94GG</user>
<app_id>A08ENRX7XTP</app_id>
<bot_id>B08EJK1N2T0</bot_id>
<ts>1741702782.618649</ts>
</message>
<ok>true</ok>
<ts>1741702782.618649</ts>
</root>
- •The Upload File action uploads a file to an external URL returned by the files.getUploadURLExternal method.
You must first obtain an external URL using the Fetch Objects action with the files.getUploadURLExternal method.
The following snippet shows the Fetch Objects queryParams example:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<filename>Test.csv</filename>
<length m:type="xs:int">500</length>
</root>
The following snippet is a sample response:
<root>
<file_id>F08HVLW0C8Y</file_id>
<upload_url>https://files.slack.com/upload/v1/CwABAAAAXAoAAeMuftzrryIGCgACGCvGdudUbLgMAAMLAAEAAAALRTA4RUpGTEtKOE4LAAIAAAALVTA4RkVTRDk0R0cLAAMAAAALRjA4SFZMVzBDOFkACgAEAAAAAAAAAfQACwACAAAAFISJ62ujD8U8X7hjk7dkW_PrqDE2AA</upload_url>
<ok>true</ok>
</root>
In the response, you obtained the URL and file_id for future use.
In the Upload File action input fields, you must specify the URL and attach the file to upload.
Response:
<result xml="false">OK - 500</result>
To complete the file upload, you must use the Update Object action with the files.completeUploadExternal method.
The following snippet shows the Update Objects requestBody example:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<files m:isArray="true">
<id>F08HVLW0C8Y</id>
</files>
<channel_id>C08ERTAC10B</channel_id>
</root>
The following snippet is a sample response:
<root>
<files>
<preview>Usage: Account Number,Usage: Created By ID,Usage: Created Date,Usage: Description,Usage: End Date,Usage: File Name,Usage: ID,Usage: Import ID,Usage: Quantity,Usage: RBE Status,Usage: Source Type,Usage: Start Date,Usage: Submission Date,Usage: Unit of Measure,Usage: Updated By ID,Usage: Updated Date
A00000022,b3e9bf3ea720389dbd8e504ef8cd8ab5,10/14/2024,Automated Usage load,,,8a8aa2ca927956ff01928be9eb8d44b6,,8,Processed,API,10/29/2024,10/31/2024,Each,b3e9bf3ea720389dbd8e504ef8cd8ab5,10/29/2024
</preview>
<filetype>csv</filetype>
<title>Test.csv</title>
<edit_link>https://pip-sandbox.enterprise.slack.com/files/U08FESD94GG/F08HVLW0C8Y/test.csv/edit</edit_link>
<file_access>visible</file_access>
<ims/>
<mode>snippet</mode>
......
......
<has_more_shares>false</has_more_shares>
<is_external>false</is_external>
<groups/>
<pretty_type>CSV</pretty_type>
<external_type/>
<url_private_download>https://files.slack.com/files-pri/T08EJFLKJ8N-F08HVLW0C8Y/download/test.csv</url_private_download>
<user_team>E08EJFLKJ8N</user_team>
<permalink_public>https://slack-files.com/T08EJFLKJ8N-F08HVLW0C8Y-689f43783d</permalink_public>
<has_rich_preview>false</has_rich_preview>
<is_starred>false</is_starred>
<size>500</size>
<channels>C08ERTAC10B</channels>
<comments_count>0</comments_count>
<name>Test.csv</name>
<is_public>true</is_public>
<mimetype>text/csv</mimetype>
<public_url_shared>false</public_url_shared>
<permalink>https://pip-sandbox.enterprise.slack.com/files/U08FESD94GG/F08HVLW0C8Y/test.csv</permalink>
<user>U08FESD94GG</user>
<username/>
</files>
<ok>true</ok>
</root>
- •The Add Remote File action adds and updates a file from a remote service.
You can add a remote file using the files.remote.add method as shown in the following example. You must specify the fields that are required and optional.
external_id: 8d79fd98-ff7b-437c-9fe8-4a22ae837888
external_url: http://imgs.xkcd.com/comics/regex_golf.png
title: regex_golf image
The following snippet is a sample response:
<root>
<file>
<filetype>remote</filetype>
<external_id>8d79fd98-ff7b-437c-9fe8-4a22ae837888</external_id>
<title>regex_golf image</title>
<file_access>visible</file_access>
<ims/>
<mode>external</mode>
<shares/>
<external_url>http://imgs.xkcd.com/comics/regex_golf.png</external_url>
<media_display_type>unknown</media_display_type>
<url_private>http://imgs.xkcd.com/comics/regex_golf.png</url_private>
<id>F08GSJC59GF</id>
<display_as_bot>false</display_as_bot>
<timestamp>1741706445</timestamp>
<created>1741706445</created>
<editable>false</editable>
<has_more_shares>false</has_more_shares>
<is_external>true</is_external>
<groups/>
<pretty_type>Remote</pretty_type>
<external_type>app</external_type>
<user_team>E08EJFLKJ8N</user_team>
<has_rich_preview>false</has_rich_preview>
<is_starred>false</is_starred>
<size>0</size>
<channels/>
<comments_count>0</comments_count>
<name>regex_golf_image</name>
<is_public>false</is_public>
<mimetype>application/vnd.slack-remote</mimetype>
<public_url_shared>false</public_url_shared>
<permalink>https://pip-sandbox.enterprise.slack.com/files/U08FESD94GG/F08GSJC59GF/regex_golf_image</permalink>
<user>U08FESD94GG</user>
<username/>
</file>
<warning>superfluous_charset</warning>
<response_metadata>
<warnings>superfluous_charset</warnings>
</response_metadata>
<ok>true</ok>
</root>
To update an existing remote file, use the same action as the files.remote.update method. Specify the file by providing its ID in the file field and the field(s) you want to update, such as the title field.
Response:
<root>
<file>
<filetype>remote</filetype>
<external_id>8d79fd98-ff7b-437c-9fe8-4a22ae837888</external_id>
<title>regex_golf image updated</title>
<file_access>visible</file_access>
<ims/>
<mode>external</mode>
<shares/>
<external_url>http://imgs.xkcd.com/comics/regex_golf.png</external_url>
<media_display_type>unknown</media_display_type>
<url_private>http://imgs.xkcd.com/comics/regex_golf.png</url_private>
<id>F08GSJC59GF</id>
<display_as_bot>false</display_as_bot>
<timestamp>1741706445</timestamp>
<created>1741706445</created>
<editable>false</editable>
<has_more_shares>false</has_more_shares>
<is_external>true</is_external>
<groups/>
<pretty_type>Remote</pretty_type>
<external_type>app</external_type>
<user_team>E08EJFLKJ8N</user_team>
<has_rich_preview>false</has_rich_preview>
<is_starred>false</is_starred>
<size>0</size>
<channels/>
<comments_count>0</comments_count>
<name>regex_golf_image</name>
<is_public>false</is_public>
<mimetype>application/vnd.slack-remote</mimetype>
<public_url_shared>false</public_url_shared>
<permalink>https://pip-sandbox.enterprise.slack.com/files/U08FESD94GG/F08GSJC59GF/regex_golf_image</permalink>
<user>U08FESD94GG</user>
<username/>
</file>
<warning>superfluous_charset</warning>
<response_metadata>
<warnings>superfluous_charset</warnings>
</response_metadata>
<ok>true</ok>
</root>
To share a remote file, use the Fetch Objects action with the files.remote.share method.
The following snippet is a queryParams example:
<root>
<channels>C08ERTAC10B</channels>
<file>F08GSJC59GF</file>
</root>
The following snippet is a sample response:
<root>
<file>
<filetype>remote</filetype>
<external_id>8d79fd98-ff7b-437c-9fe8-4a22ae837888</external_id>
<title>regex_golf image updated</title>
<file_access>visible</file_access>
<ims/>
<mode>external</mode>
<shares>
<public>
<C08ERTAC10B>
<channel_name>business</channel_name>
<share_user_id>U08FESD94GG</share_user_id>
<reply_users/>
<reply_users_count>0</reply_users_count>
<team_id>T08FENVBW00</team_id>
<source>UNKNOWN</source>
<reply_count>0</reply_count>
<ts>1741707399.987439</ts>
</C08ERTAC10B>
</public>
</shares>
<external_url>http://imgs.xkcd.com/comics/regex_golf.png</external_url>
<media_display_type>unknown</media_display_type>
<url_private>http://imgs.xkcd.com/comics/regex_golf.png</url_private>
<id>F08GSJC59GF</id>
<display_as_bot>false</display_as_bot>
<timestamp>1741706445</timestamp>
<created>1741706445</created>
<editable>false</editable>
<has_more_shares>false</has_more_shares>
<is_external>true</is_external>
<groups/>
<pretty_type>Remote</pretty_type>
<external_type>app</external_type>
<user_team>E08EJFLKJ8N</user_team>
<has_rich_preview>false</has_rich_preview>
<is_starred>false</is_starred>
<size>0</size>
<channels>C08ERTAC10B</channels>
<comments_count>0</comments_count>
<name>regex_golf_image</name>
<is_public>true</is_public>
<mimetype>application/vnd.slack-remote</mimetype>
<public_url_shared>false</public_url_shared>
<permalink>https://pip-sandbox.enterprise.slack.com/files/U08FESD94GG/F08GSJC59GF/regex_golf_image</permalink>
<user>U08FESD94GG</user>
<username/>
</file>
<ok>true</ok>
</root>
- •The Set User Photo action sets the user's profile photo.
Attach an image to the image field and optionally crop it using the crop fields.
The following snippet is a sample response:
<root>
<profile>
<image_32>https://avatars.slack-edge.com/2025-03-11/8596614448865_aa3744ce61fdf7bed774_32.jpg</image_32>
<image_original>https://avatars.slack-edge.com/2025-03-11/8596614448865_aa3744ce61fdf7bed774_original.jpg</image_original>
<image_1024>https://avatars.slack-edge.com/2025-03-11/8596614448865_aa3744ce61fdf7bed774_1024.jpg</image_1024>
<image_24>https://avatars.slack-edge.com/2025-03-11/8596614448865_aa3744ce61fdf7bed774_24.jpg</image_24>
<image_192>https://avatars.slack-edge.com/2025-03-11/8596614448865_aa3744ce61fdf7bed774_192.jpg</image_192>
<image_48>https://avatars.slack-edge.com/2025-03-11/8596614448865_aa3744ce61fdf7bed774_48.jpg</image_48>
<image_72>https://avatars.slack-edge.com/2025-03-11/8596614448865_aa3744ce61fdf7bed774_72.jpg</image_72>
<avatar_hash>aa3744ce61fd</avatar_hash>
<image_512>https://avatars.slack-edge.com/2025-03-11/8596614448865_aa3744ce61fdf7bed774_512.jpg</image_512>
</profile>
<ok>true</ok>
</root>
- •The Unfurl Message action provides custom unfurling behavior for posted URLs.
For example, you sent a message containing a link and retrieved its timestamp (ts).
The following snippet is a sample requestBody:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<channel>C08ERTAC10B</channel>
<ts>1741349416.035149</ts>
<unfurls>
<url_to_unfurl url="https://www.nytimes.com/2025/03/06/dining/secret-to-best-pancakes.html">
<blocks m:isArray="true">
<type>section</type>
<text>
<type>mrkdwn</type>
<text>Take a look at this unfurled message!</text>
</text>
<accessory>
<type>image</type>
<image_url>https://images.pexels.com/photos/376464/pexels-photo-376464.jpeg</image_url>
<alt_text>pancakes_image</alt_text>
</accessory>
</blocks>
</url_to_unfurl>
</unfurls>
</root>
The following snippet is a sample response:
<root>
<ok>true</ok>
</root>
Note: Unfurling links work only if the links are registered in the app settings on the Event Subscriptions page.