Sending thousands of healthcare locations and providers to Google Business Profile with Yext connectors
On this page
A large hospital system I work on at the agency has thousands of providers plus its clinics and hospitals, and each of them is supposed to have a correct listing on Google Business Profile (the code still calls it GMB) and Apple. The site runs on Craft, and Craft is the source of truth: a provider's name, NPI, primary location, specialties, headshot, hours, and whether they are accepting new patients all live there. Yext is the listings platform that fans that data out to Google, Apple and the rest. The job is getting Craft into Yext, every day, without anyone touching it.
The old way: one PUT per entity
The first version of this, which a colleague built in 2019, talked to the Yext entities API directly. Saving a location or a provider pushed a queue job that transformed the entry and sent a PUT to entities/{id}. Three cron runs a week, Monday, Wednesday and Friday, re-queued every entry in a section so nothing drifted.
Yext allows 5,000 requests an hour, and a provider update was three requests, so every job ended with this:
// 3600s/5000rph = 0.72 seconds per provider x 3 requests per provider = 2.16 seconds
usleep(2.16 * 1000000);
That line is mine, from July 2024, after the earlier sleep(0.72) kept tripping the rate limit. Multiply 2.16 seconds by a few thousand entries and a full resync is a long-running queue, and a failure partway through is a line in a log nobody reads. Whether a provider was actually in Yext was a question you answered by opening the Yext UI.
What a connector is
A Yext connector pulls instead of being pushed to. You give it a source (an API endpoint, a file, or a crawl of a website), tell it which entity type the rows map to (Healthcare Professional, Healthcare Facility), map each source field to an entity field, and schedule it. Yext does the diffing, the creating and the updating, and shows you per-row errors in its own UI. Rate limiting becomes Yext's problem.
In October 2024 I rewrote the module around that. The old module, a little over 4,000 lines, came out. What went in is three queue jobs and one controller.
$schedule->command('yextconnector/export/providers')
->description('Export providers data to S3 bucket for Yext Connector usage')
->when(fn () => $isProd)
->dailyAt('23:00')
->onOneServer();
The job walks every provider with the relations eager-loaded, skips anyone who fails isYextQualified() (not live, not employed, no name, no NPI, no primary location with a building, or the editor ticked "Do not send to Yext"), and transforms each one into a flat row. A doctor with exactly two locations gets a second row in a secondary folder so they can have a listing at each office. The whole array is written to S3 as one JSON file, and an anonymous controller action serves it back out in pages of 100 so the connector never hits Craft's database at all:
$result = $this->_s3Client()->getObject([
'Bucket' => getenv('S3_BUCKET'),
'Key' => 'yext/providers.json',
]);
$page = Craft::$app->request->getParam('page', 1);
$perPage = Craft::$app->request->getParam('perPage', 100);
return $this->asJson($this->_paginate($results, $page, $perPage));
The transform is where the Yext-specific knowledge lives. Hours become "monday": "08:00-17:00" or "closed". Categories become a comma-separated list of Yext category IDs with the system's own category prepended. Degrees are intersected with the list Yext accepts and sorted in the order the client prefers. Links use Yext's embedded-field syntax so the UTM parameters can be edited in Yext without a deploy:
'websiteUrl' => [
'url' => '[[website.displayUrl]][[c_listingsUTMCode]]',
'displayUrl' => $entry->canonicalUrl(),
'preferDisplayUrl' => true,
],
The folder a row lands in moved from hard-coded folder IDs in .env to folder names, which is what the connector mapping actually wants.
One thing the push model gave us for free was knowing what was already in Yext. In early 2025 I added a yext_ids table and a job that pages through the Yext entities API (fields=meta.id, 50 at a time) and stores every ID. isYextQualified() uses it: a provider who is already listed can keep their listing through a temporary gap in their data, and the control panel sidebar can say "record exists in Yext" with a link, or say that the provider is not qualified and their record will be closed. The per-rule flags go into the feed itself as c_craftLogicFlags, so they are visible from the Yext side too.
What the listings do
The reason any of this matters is in Yext's own report for the twelve months ending September 2026. These are actions people took on the Google listings the feed maintains, not visits to the website.
| Quarter | Driving directions | Tap to call | Website clicks |
|---|---|---|---|
| Q4 2025 | 773,382 | 348,330 | 201,195 |
| Q1 2026 | 694,536 | 384,233 | 237,161 |
| Q2 2026 | 692,876 | 359,143 | 212,143 |
| Q3 2026 | 701,755 | 393,982 | 225,412 |
That is about 2.9 million requests for directions, 1.5 million taps to call and 876,000 clicks through to the site in a year, roughly 5.2 million actions, or well over 400,000 a month. Directions alone outnumber website clicks three to one, which is the clearest argument I have seen that for a hospital system the Google listing is the front door and the website is the second stop. Every one of those listings is a row the nightly export wrote, so a provider the feed drops or Yext rejects is a clinic nobody can navigate to.
What broke
Two years in, a ticket arrived: more than 500 providers showing as not synced. Nothing in the export had failed, and nobody had a clear answer for why Yext was not creating them.
I wanted to see rejections with my own eyes, so I built a second, throwaway connector in a developer account. Yext's Site Crawler connector can read a page's application/ld+json block, and the provider pages already carry a hand-built Physician schema (that is its own post: Custom JSON-LD for an enterprise healthcare client). Production blocked the crawler, every page came back as a timeout, so I pointed it at a non-production environment instead. Provider pages are not link-discoverable, they sit behind a JavaScript search, so I added two scoped sitemap templates, one for providers and one for locations, and fed the crawler exact URLs. One gotcha: the crawler stores the JSON with doubled quotes, so the text extraction delimiters have to be postalCode"":"" rather than "postalCode":".
Out of 100 providers, 81 were created and 19 failed, all 19 with the same message: "The Address field is required for entities of this type." The Healthcare Professional entity type requires an address, and hospital-based providers have no practice address in the source data. Their page's JSON-LD has no address either. That is the most likely explanation for the 500: the feed sends them, and the entity type cannot accept them.
The fix is a decision for the client, not code: make Address optional on the entity type (an account-wide schema change) or exclude address-less providers from the feed and stop counting them as unsynced.
The rule
The required fields on the target's entity type are part of your contract, and the feed should be validated against them before it leaves. "Not synced" was not a sync problem. It was a schema problem, and a feed that is "fine" on our side can still be unacceptable on theirs. When you cannot see why a platform is rejecting rows, build the cheapest possible second pipeline into a sandbox account and read what it rejects.