Question

Using file outputs in a Code step with Python

  • 6 April 2023
  • 1 reply
  • 211 views

Userlevel 1

I have a trigger with the Email by Zapier step which receives an email with an mp3 attachment. I am trying to use that attachment in a Code step with Python. In the trigger this looks like “Attachment: not shown” and contains a hydration pointer which looks like “hydrate|||…”. 
 

When I map this to an input to the Code step like file = Attachment, and I run python code “print(input[“file”]” the hydrate string is printed, not some bytes of the file as you would expect with an MP3 file. 
 

How can I get access to the file contents (bytes) in code? Is this a dehydrate operation?


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

1 reply

Userlevel 7
Badge +14

Hi @spencerogden 

Good question.

Perhaps you can give us more of an overview about what you are trying to configure the Zap to do across all the steps.