Why this isn’t a find-and-replace
Zapier Functions let you write Python code with the requests library available for outbound HTTP calls, inside Zapier’s own hosted runtime, with a five-minute max execution time. Zapier’s Help Center confirms the shutdown date plainly, in its migration guide updated 2026-07-13:
“Zapier Functions is being deprecated on September 1, 2026”
Code by Zapier is positioned as the direct replacement, but it runs JavaScript or Python on a different execution environment, one that doesn’t ship the requests library old Functions code relied on. A script built around requests.get() or requests.post() has no equivalent library to fall back to; it has to be rewritten against whatever HTTP mechanism the new runtime actually provides.
For JavaScript-based Code by Zapier steps, that mechanism is the standard fetch API:
import requests
response = requests.get("https://api.example.com/items")
data = response.json()
print(data)const response = await fetch("https://api.example.com/items");
const data = await response.json();
console.log(data);requests.post(url, json=data) follows the same pattern, rewritten as a fetch call with an explicit method, JSON body, and content-type header:
const response = await fetch(url, {
method: "POST",
body: JSON.stringify(data),
headers: { "Content-Type": "application/json" },
});This site doesn't run Zapier
Direct statement, since this is the honesty note this whole series carries: bytetech247.com’s own automation runs on Cloudflare Workers and GitHub Actions, not Zapier (see this site’s actual deploy automation). This is a structural walkthrough of Zapier’s own published migration guide, not a first-person account of migrating our own Functions code.
The exception that breaks a naive find-and-replace
Zapier’s guide is explicit about where this pattern stops working: authenticated HTTP calls. Its warning reads:
“Do not use
fetchfor these calls.”
The reasoning is that Code by Zapier’s execution model doesn’t let code hold onto secrets the way Functions could. A fetch call with an API key baked into a header or query string would mean putting that credential directly in the Code step’s source, exactly the pattern the runtime is designed not to support. Instead, authenticated requests have to go through API by Zapier with the Zapier SDK, which handles the credential through a stored connection rather than inline code. The last post in this series covers that connection setup and its exact binding syntax in full.
Structural Comparison Matrix
| Operational Aspect | Zapier Functions (Python) | Code by Zapier |
|---|---|---|
| Shutdown / availability | Ends 2026-09-01 | Current replacement |
| Language | Python only | JavaScript or Python |
| Unauthenticated HTTP calls | requests.get() / .post() | fetch() |
| Authenticated HTTP calls | requests with inline credentials | API by Zapier connection via the Zapier SDK, not fetch |
| Console output | print() | console.log() |
Fix it: audit before you convert
Before rewriting anything, list every outbound HTTP call in the existing Functions code and mark whether it carries a credential (an API key header, a bearer token, a signed query string) or not. Unauthenticated calls convert straight to fetch. Authenticated ones need the API by Zapier connection instead, not a fetch call with the header simply carried over.
// Old Functions code:
// requests.get(url, headers={"Authorization": f"Bearer {api_key}"})
//
// This is an authenticated call. Per Zapier's own migration guide,
// route it through an API by Zapier connection, not fetch().Two other migration problems live in the same guide
Converting HTTP calls is one of three distinct problems Zapier’s migration guide covers. If the original Function handled multiple trigger events, see the next post on splitting it into separate Zaps. If it had hardcoded secrets anywhere, see the post on moving them to an API by Zapier connection. Fixing HTTP calls alone doesn’t cover either of those.
Confirmed version
Sourced from Zapier’s official Help Center migration guide for Zapier Functions, updated 2026-07-13. Browse more posts like this in the Data Automation archive.



![A terminal window showing the connections['api_by_zapier'] binding syntax from Zapier's real migration guide for moving hardcoded secrets out of Function code](/_astro/cover.BdYRbz3K_26AJBO.png)



