The Scenario
You're a performance marketer at a DTC brand. Every week, your team publishes new blog posts and sends the URLs to the social media team, the email team, and the affiliate partners. Before those URLs go anywhere, they need to be shortened with a retargeting CTA attached — your pixel needs to follow people who click, so you can serve them ads for the next 30 days.
This week there are 50 URLs. Your Friday afternoon is already spoken for.
The bad version:
- Open RiteKit's link shortener, paste in URL 1, select the CTA from the dropdown, copy the shortened link, paste it into the sheet. Fifty times.
- Build a Zapier workflow that fires on each new row, calls RiteKit, writes the short link back — spend two hours getting the CTA parameter right and debugging why 12 of the 50 links returned an error.
- Send out the long URLs this week with a note that "we'll add the tracking next week," and then forget next week comes.
Your job is media buying and campaign management. URL shortening is infrastructure. You shouldn't need to spend your Friday on it.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads the campaign URLs in column A and, through its built-in RiteKit integration, calls the link shortener with the specified CTA and writes the shortened URLs back to column C.
For each URL in column A of the "Campaign Links" sheet, shorten it with RiteKit using the CTA ID in column B and write the shortened link into column C. Skip rows where column C already has a value.
What You Get
- Column C: The RiteKit-shortened URL for each row, with the CTA from column B attached
- Rows where column C already has content are skipped — safe to re-run without overwriting processed links
- Rows where the URL in column A is blank or malformed get an error note in column D
What If the Data Is Not Quite Ready
All 50 links should use the same CTA — I don't have individual CTAs per row
For each URL in column A of the "Campaign Links" sheet, shorten it with RiteKit using CTA ID "newsletter-signup" for every row and write the shortened link to column C. Skip any rows where column A is blank.
Some URLs are internal staging links (contain "staging." in the domain) that shouldn't be shortened yet
For each URL in column A, skip any that contain "staging." in the domain — write "STAGING: SKIP" in column C. For the remaining URLs, shorten with RiteKit using the CTA ID in column B and write the short link to column C.
The URLs are split across two sheets — "Blog Posts" and "Landing Pages" — and each needs a different CTA
On the "Blog Posts" tab, shorten each URL in column A using RiteKit with CTA ID "blog-retargeting" and write to column C. On the "Landing Pages" tab, shorten each URL in column A with CTA ID "lp-retargeting" and write to column C. After both are done, on a new tab called "All Short Links" combine both sets of shortened URLs with a column indicating their source tab.
I want to shorten the URLs, track which ones were successfully shortened, and flag failures in one pass
For each URL in column A of the "Campaign Links" sheet, attempt to shorten with RiteKit using the CTA ID from column B. Write the shortened URL to column C if successful. If RiteKit returns an error for any row, write "ERROR: [reason]" in column C and the original URL in column D so it can be retried manually. After all rows are processed, add a summary at the bottom: total URLs processed, total successful, total errors.
Shortening, error-tracking, and the summary — one prompt, one pass.
Try It
Get the 7-day free trial of SheetXAI and open your campaign links Google Sheet, then ask it to bulk-shorten every URL in column A through RiteKit with your specified CTA. You might also want to explore how to generate quote images for your social campaigns, or return to the RiteKit + Google Sheets overview.
