I want to send a csv every day in an email. I have the csv data as a string field from a private API and I cannot make the API public.
Gmail takes in a file object.
So, how does one take that string into a file object and give it a name which gmail can attach?
Page 1 / 1
I have an open ticket, they haven’t gotten back to me yet
@TylerFromReceive
You may be better served by trying to open a ticket with Zapier Support to ask about possible guidance for the solution you seek: https://zapier.com/app/get-help
So I tried to make an app but nowhere does it say I can output a file:
How do I output a file object?
While I could, this is still messier than I’d like. csv → json → csv.
Is there no private zap app where you pass in two strings and get back a file object?
@TylerFromReceive
You could use a Code step to convert the raw CSV text into JSON.
ChatGPT should be able to help with that.
Thank you, this is closer and does offer the output file option, but it only takes in json and my data is raw csv text, ex: “A,B,C\nD,E,F”.
@TylerFromReceive
Maybe try this private invite only Zap app: Advanced Utilities which has a toCSV option.
gdrive also creates a temp file, which I want to avoid.
> You can try using a Code step to create a CSV file.
I asked the chatbot AI how to do it, and it did what I did which was output it as text. We also both tried using stringIO, but got back an error “We were unable to place a file in a text field or possibly the otherway around.” It did not help me output a value that’s type is “file object”
Another option would be to try this Zap action: GDrive - Create File from Text
Hi, so i have zap which is:
every day at 2pm UTC
grab a list of users
do a for loop for each user:
run custom code which downloads a csv file from https://example.com/csv?k1=v1&k2=v2 and puts it as an output variable since it’s a string. it uses headers for authorization which is why I can’t put the public URL in the gmail section.
Send an email via gmail to the user with the csv as an attachment
My problem is that gmail requires a “file object” (or a public URL which I don’t have). I cannot figure out how to turn my csv text into a “file object” that gmail can attach. I don’t want to upload the csv publicly and then attach as that’s messy.
What i’d like is a very simple utility which given a filename and file content, both as strings, creates a file object for usage in later parts of zapier
Hi @TylerFromReceive
Can you provide more details and a specific example to better clarify for us?