Zapier Code Example

Use this code to get a CSV file from a URL in the 'Code by Zapier' module.

import requests
response = requests.get(input_data["csv_url"])
csv_content = response.content  
output = {
            "file_name": "fetched_data.csv",  
            "file_content": csv_content,      
            "file_mime_type": "text/csv"      
        }

Last updated