Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Trigger Customer.io event with attachments in Python
import base64
import requests
from customerio import CustomerIO
file_content = requests.get(file_url).content
file_base64 = base64.b64encode(file_content)
customer_io = CustomerIO(site_id, api_key)
customer_io.track(
customer_id=1,
name='send_diz_shit',
attachments={'some.pdf': file_base64}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.