Skip to main content
Best answer

Extracting Slack attachments to send to Airtable

  • 12 January 2024
  • 4 replies
  • 202 views

 Hello

I have a zap which triggers when a new reaction is added to a message in Slack. This will then create a new task in Airtable from the message.

This all works fine, except for when a message includes some attachments (like an image for example).

I can see the attachment info in the Slack meta data in the Zapier tests, but adding the attachment URL into the Airtable attachments field results in a blank file being added.

After a few trial and errors, I’m assuming this is because the Slack attachment URLs require authentication to view, and the Zap is using a URL to add to Airtable and is getting hit by the login page.

I’ve added the relevant attachment output below. Some of it looks like base64 encoding, but I can’t seem to make that decode to the image, unless I’m missing something? I’m also unfamiliar with the `hydrate|||` tag in the `file` parameters.

Is there a way to extract these attachments and add it to a task in Airtable without needing to authenticate the URLs? Or to format the base64 so it can be sent to Airtable properly formatted?

Thanks!

 

files
0
thumbnails
small_image_url
https://files.slack.com/files-tmb/T04V5Q35U-F06DH80FF18-474474829d/old-man-yells-at-monday_64.jpg

medium_image_url
https://files.slack.com/files-tmb/T04V5Q35U-F06DH80FF18-474474829d/old-man-yells-at-monday_160.jpg

large_image_url
AwAwAC7TpqurZwwOOtR3MhjjwOrcZqOJDGnI+Zv5VMpcquWo6XLQIPQ0VEjhZPLwc+tS007rUi6ewUUUUwAgHqM0UVXuJWV8KcYGeO9Juw0WMDOcc015FT7x59KZA5aLLdRVcsGfJyMnqO4ov2Cw9pWL7lJHtVoHIBqjHt81VU5GeDV6lG/UGFV7hMvk55FWKZKm5eOo6U2roERRqHjMZJGDkVBcRGGIvkMB26VJ3zyCKbNmQAHkVOg7DIJAxRz2PetCqCR47YqdJdnDZI7UR0Bo/9k=

url_private
https://files.slack.com/files-pri/T04V5Q35U-F06DH80FF18/old-man-yells-at-monday.jpg
url_private_download
https://files.slack.com/files-pri/T04V5Q35U-F06DH80FF18/download/old-man-yells-at-monday.jpg

permalink
https://stormideas.slack.com/files/U04H8REPQGK/F06DH80FF18/old-man-yells-at-monday.jpg

permalink_public
https://slack-files.com/T04V5Q35U-F06DH80FF18-c4afa681ad

file
hydrate|||.eJx9jcsOgjAURP_lriktAlrZmRji1kTdkpu2arUPQksIIf67oK5dzpnJmQmEd1G52MSxVVDBDhLQLkR0QjVaQpVvCs7zgicg-hC97YPqPkXGeMG2-TYBFML3s2Kh5YqtNlkCV62MbBzaRXrVRs3e54DdLUA1Qd-ZGd9jbENF6VKHNBgUz1R4-82k7TQ9seJSHvPyTGq23h84q-uMU-kHZzxK6o0kFh0ZlTGBYCTWO4lj-mhv893v_N_o9XoD1qNUng:1rOFa0:8XblA8aPB-LiKT_jidcZ4BQ9Wws|||hydrate

 

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

4 replies

Userlevel 7
Badge +14

Hi @Katrina_Storm 

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

To help us have more context, can you post the DATA OUT from the Slack step related to files/attachments, and how your Slack step is configured.

Userlevel 1

Thanks, I’ve found the right file output now to make it work!

Userlevel 1

Hi @Katrina_Storm 

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

To help us have more context, can you post the DATA OUT from the Slack step related to files/attachments, and how your Slack step is configured.

Ok just to come back to this, and this works for one attachment but how can I add multiple attachments to Airtable via Zapier? I’ve tried objects, arrays, comma separated file tags… but either nothing works or only the first image attaches.

Data Out:

ID
id
rec46W3NYz1qa0ABW
Created Time
createdTime
2024-01-12T17:56:49.000Z
fields
fields
Name
Name
New task from Luke Wilson in #creative-ops
Collaborators
Collaborators
1
1
Fields Collaborators ID
id
usrw6QSkClWFDVIiU
Fields Collaborators Email
email
luke.wilson@stormideas.com
Fields Collaborators Name
name
Luke Wilson
Fields Last Modified Status
Status
To Do
Fields Notes
Notes
**[From @luke.wilson on Slack:]** test task with multi attachments
Fields Priority
Priority
Daily Priority
Client
Client
Internal
Attachments
Attachments
1
1
id
id
attAYMB8ME0VP7itp
url
url
https://zapier.com/engine/hydrate/10840939/.eJyFjbuOwjAURP_l1jE2ibN5dBRsj3bZNrJsAxb2dRTfCLGIf8cBeso5MzpzAx2RLNJA19FCDxsowGEihdoOzkBfNbJtK9kWoOdEMczJTs9iLVopuqorQGkd56xYaF2KslkXcHDWmwFVWKQH5232ni9qOibobzBPPuMT0Zh6zpc6rZJX-rzSMbwyGyfHf4X8q3dVvWff4mtbyh_Z7Dpu4gV9VIZHb1hQyK7W-8QUMXLB_kfMthGP-fH9_2F3vz8A7vVXXA:1rOLlu:XMoROrM-kkM0iLmNOst4Q37fOkA/
filename
filename
Unnamed attachment
Fields Task Type
Task Type
Ad-Hoc
Fields Today
Today
2024-01-12
Fields Last Modified Status
Last Modified Status
2024-01-12T17:56:49.000Z
Fields Due
Due
2024-01-12
Total Billable Hours Worked
Total Billable Hours Worked
0
Fields Created
Created
2024-01-12
Fields Duration
Duration
0 days

 

Userlevel 7
Badge +6

Hi there @Katrina_Storm,

I’m jumping in to see if I can help!

You can only send 1 attachments at a time. I’d recommend using Looping by Zapier to send multiple attachments.

You can read more about Looping by Zapier here: 

Hopefully, this helps!