Question

Microsoft Teams Attachments to Slack


Userlevel 1
Badge

Hello, we have on Microsoft Teams a “Teams Channel” and we would like send Images (Attachments) to a Slack Channel. Is that possible? The Text Message works good. But when i add a Image then we get in Slack only this Code. Can you help me?

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

29 replies

Userlevel 7
Badge +14

Hi @nickMarkatus 

Good question.

Please post screenshots with how you have your Slack step configured in order for us to have more context, thanks.

 

Are you using either of these fields?

 

Userlevel 1
Badge

Hi @Troy Tessalone 

here is my Configuration:
 

 

Userlevel 7
Badge +14

@nickMarkatus 

Looks like there is no value for the mapped variable, which may explain.

Make sure to test with a representative value.

 

Userlevel 1
Badge

Hi @Troy Tessalone can you explain in more detail what i should do?

Userlevel 7
Badge +14

@nickMarkatus 
Please provide screenshots with the attachment data points returned from the Zap trigger step.

Userlevel 1
Badge

Hi @Troy Tessalone 

Screenshot from Microsoft Teams

 

Screenshot Slack

content: None
contentType: reference
contentUrl: ******/sites/Marketingab2020/Freigegebene Dokumente/General/test.jpg
id: f56d9728-043c-484b-9284-026762c7b518
name: test.jpg
teamsAppId: None
thumbnailUrl: None

 

 

 

Userlevel 7
Badge +14

@nickMarkatus 

We’d need to see the data returned related to the Attachments from the Zap trigger in Step 1, which is not shown in the screenshots, thanks.

Userlevel 1
Badge

@Troy Tessalone 

Hi, here is the Screenshot from Step 1 (Trigger), i hope you mean this. Sorry for the many Questions, but we are working with the Software for the first time .

 

Userlevel 7
Badge +14

@nickMarkatus 

We need see the data returned from the Zap trigger step related to the Attachments that you are trying to map into the other Zap steps.

Userlevel 1
Badge

@Troy Tessalone can you show me, what do you need? We don't know what you need. Do you need a Screenshot from Slack or a Screenshot from my Zapier Project? It is possible to send you my Account Information via privat Message? 

We have only one Zap project:
 


Is something missing in the settings, what exactly do we have to set and where? Maybe you can send us a picture what exactly is needed. Thank you for your help

Userlevel 7
Badge +14

@nickMarkatus

Please post screenshots with all the data points returned from the Zap trigger step, these will include the data points related to the Attachments.

 

This will come from the Zap trigger step in the Zap editor where you configure the Zap OR the DATA OUT tab for Step 1 in the Zap Runs.

Userlevel 1
Badge

 

 

 

 

Teams Data Out:
 

Teams Data Out

id:    1656318691813
etag:    1656318691813
messageType:    message
createdDateTime:    2022-06-27T08:31:31.813Z
lastModifiedDateTime:    2022-06-27T08:31:31.813Z
importance:    normal
locale:    en-us
webUrl:    https://teams.microsoft.com/l/message/19%3Ac2f36257344a4b83a9d543974694b643%40thread.skype/1656318691813?groupId=d3641b26-bb78-4002-91d6-579f3733df72&tenantId=1d4774fc-d15a-4033-8d03-199790d3ac27&createdTime=1656318691813&parentMessageId=1656318691813
from:
application:    null
device:    null
user:
id:    e7b191dc-854e-45f2-b64b-fabd4bb77dea
displayName:    Björn***
userIdentityType:    aadUser
body:
contentType:    text
content:    Testpicture<attachment id="f56d9728-043c-484b-9284-026762c7b518"></attachment>
channelIdentity:
teamId:    d3641b26-bb78-4002-91d6-579f3733df72
channelId:    19:c2f36257344a4b83a9d543974694b643@thread.skype
attachments:
1:
id:    f56d9728-043c-484b-9284-026762c7b518
contentType:    reference
contentUrl:    ***/sites/Marketingab2020/Freigegebene Dokumente/General/test.jpg
content:    
name:    test.jpg
thumbnailUrl:    
teamsAppId:    
Fields with no value:
replyToId
lastEditedDateTime
deletedDateTime
subject
summary
chatId
onBehalfOf
policyViolation
eventDetail
mentions
reactions

 

Slack Data out

message:
type:    message
text:    Testpicture&lt;attachment id="f56d9728-043c-484b-9284-026762c7b518"&gt;&lt;/attachment&gt;
upload:    true
user:    U03L4CT9YHX
display_as_bot:    false
ts:    1656318694.846259
permalink:    ****/archives/C03JXPWNG3D/p1656318694846259
file:
id:    F03LU5BV539
created:    1656318694
title:    content: Non ... 
mimetype:    text/plain
filetype:    text
pretty_type:    Klartext
user:    U03L4CT9YHX
size:    241
is_external:    false
is_public:    true
url_private:    https://files.slack.com/files-pri/TBUM56JQJ-F03LU5BV539/content__non_..._.txt
url_private_download:    https://files.slack.com/files-pri/TBUM56JQJ-F03LU5BV539/download/content__non_..._.txt
permalink:    https://markatus.slack.com/files/U03L4CT9YHX/F03LU5BV539/content__non_..._.txt
permalink_public:    https://slack-files.com/TBUM56JQJ-F03LU5BV539-4a9459c4c0
preview:    content: None
contentType: reference
contentUrl: *****/sites/Marketingab2020/Freigegebene Dokumente/General/test.jpg
id: f56d9728-043c-484b-9284-026762c7b518
name: test.jpg
lines:    7
comments_count:    0
channels:
1:    C03JXPWNG3D
file:    hydrate|||.eJw1jstuwjAURH8luutgh7wI3jWLLqIWCamwtSzHgIVzHcU3AoT495oWljNHOjN30B7JIEm6jQYEfEAKFgMp1EbaHkRRNFmTl3kKeg7khzmY6Q8s81Ve18smBaW1n6Pi3ZZNVqZwsMb1EtXw1B6sM9F8vqjpGEDcYZ5crE9EYxCcP3FgwSl9ZtoP_3kxTpb_tLvvqu623eIzK752VbuvijXv_QWdVz1_v5foUTLGJKMrxaHX7AuLZOMxiTiBx-MXNfROLw:1o5k9f:cirq-1IFGSBpiCVZa-UjcOEn1PI|||hydrate
created_time:    2022-06-27T08:31:34Z
channel:    C03JXPWNG3D
ts:    1656318694.846259
ts_time:    2022-06-27T08:31:34Z


Do you mean this?

Userlevel 7
Badge +14

@nickMarkatus 

Below is why the image is not being sent as expected to Slack...

 

Help article about using Files in Zaps: https://zapier.com/help/create/basics/send-files-in-zaps

 

 The Teams Message content is a reference to an attachment (id), not an actual file URL (http).

 

The referenced attachments related data points don’t include a full URL to the attachment. (notice the ***/sites)


 

Userlevel 1
Badge

Hi @Troy Tessalone 

 

thank you for the Information. The URL is change by me (****), we have here a complete URL. 
When i add here a fix URL, than it works. When i add the 

then we have only the Attachment-ID. Code. In my Field-List i haven’t another File Items
 

 

Slack looks good (with the fixed URL)

 

 

Userlevel 7
Badge +14

@nickMarkatus 

The Attachments variable is an array of data.

If you only want the URL, then try mapping the contentURL variable to the Slack Message Text field.

 

If you are trying to attach a file to the Slack message then use the file variable.

(may show as file exists but not shown when trying to map the variable)

 

Userlevel 7
Badge +9

Hey @nickMarkatus! Were you able to get things working with Troy’s suggestion of using the “contentURL” to get the URL to populate within Slack? Let us know - we want to make sure you’re good to go here!

Userlevel 1
Badge

Hi @Troy Tessalone 


thank you for your Message. Can you tell me, how i read the contentURL from the attachment Field? When i Add the Field “Attachment” i see the complete Array in my Message. How can i read the contentURL from the Array? Do you have a Example for me?

Thank you

Userlevel 7
Badge +14

@nickMarkatus 

There should be other fields related to the attachments that you can map in the Zap steps.
Try searching for “contentURL”.

Userlevel 1
Badge

@Troy Tessalone Do you mean here? Here we have only “attachments”...

 

no contentURL

 

Userlevel 7
Badge +14

@nickMarkatus 

Try searching/scrolling thru the available data points to see if there is a value that matches the full URL or a file object that you can map.

 

Userlevel 1
Badge

@Troy Tessalone 

here all Data Fields

 

 

-

 

Userlevel 7
Badge +14

@nickMarkatus 

Make sure the sample data being used is representative to configure and test your Zap.

How to change your trigger test data: https://zapier.com/help/create/basics/change-the-test-data-in-your-zap-trigger

Otherwise, my advice would be to open a ticket with Zapier Support for further assistance: https://zapier.com/app/get-help

Userlevel 1
Badge

Hi @Troy Tessalone 

thank you for your Support. This Link helps me https://zapier.com/help/create/basics/change-the-test-data-in-your-zap-trigger

Now i see the Attachment URL, but in Slack we see this:

After my Text, Zapier add automaticly the Attachment ID and the URL Link is not complete:

 _ZWpZfBzQc2vlf9IlWEKYG7qrVTU9pFiqaHLUG8nIWuDGHv-45eUdVq_jmK6u-NFm5b9oFfQTgMrIMRBJngvqDIjiQNXeBHAng4q1yV3nR59C4Rbou9sYNkivDTloTdfbyAEB0gtgrar5q0jeBbF_Nc
My Configuration:

5zTHjlSpZOm5T4yrz1eDco7a9Um9GrEqbdJrhBlEpSjSqm6XOFrJIj30czliDgkLGp7NakxSxVfqn6Lu0fxdc3SpF3m6nCiLERuk1vfxEdo5RrIG5Zl8Bia7SOyTlVNflk6PFbCoJRHNwydR977uyyo

d5PYG0CsebyiVb4hmWEJQwQfYCWYYZceH6ruVjSGg8_5ZquUcl2NhXApAF-yaaOmKTou1-5Ul4lPug1AESO7UwSxuBgV9SWyjuBPyC9fqrpMK3qE5l7wWw9APW88hPj09VFU1dhVMEcng_LofOdtoq0

 when i try this
hGPdatrGus1er2qVt7S8xCyTSbG2U-vFcQSe19yTvzNmR-egwOK3FU7RT1MwNa4lc7cmZfpfNqGa0G_Ca9bt79qaSpstfLz7huAPa_AOSNvL1xxgmfkqo6hbsfIXUagtPp8WuCtKZ5rgPsxkBwUCd4E

We get this:
KH0GCgQri42CgUPdH-1w0Q-MoEc7rF53OMP0iC3a2yqKi1fW35X0JCk5fatQWtqVcUzfbnDUcOF64U_Z-jK8eSmiLz7oXBvt0flhRMPkRUUEvsG_ECUmtwFrWTD1FAI-k8mf5OljpedBLCGVME1KR6c

8hxWhawVBxMbkqXdg2X4x-7YUN-X0PZQa6EeYQsBRtAe39aKDlLgMJhKcJraSRVOIlZiRlaY4LMUTMX7dYDh1PE2-7znBVpAM6CCNx7tqkMDczQk84th5My4em11N5aFNyIKqpjhx13cZxq5p8k

Userlevel 7
Badge +14

@nickMarkatus 

Help article for using Markdown to format Slack messages including links: https://www.markdownguide.org/basic-syntax/#links

Userlevel 1
Badge

@Troy Tessalone Thank you for your Link. We try it! 

And it is possible to disable the <attachment id”…? This Add Zapier automaticly to the Message and send it to Slack.

Thank you