workflows/zapier/code_by_zapier.py
code_by_zapier.py: full Python source from the Zapier and Make workflows folder of Spatial9 Agent Skills. Free, MIT licensed code for immersive audio with...
Raw file · View on GitHub · Download every file as a zip
# Code by Zapier (Python). Input data: task = the raw JSON body from the catch hook.
import json
task = json.loads(input_data["task"])
links = []
for artifact in task.get("artifacts", []):
for part in artifact.get("parts", []):
if part.get("kind") == "file": # each download arrives as a file part
f = part["file"]
links.append(f.get("name", "file") + ": " + f["uri"])
output = {"title": task.get("id"), "links": "\n".join(links)}