<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: David Corney</title>
    <description>The latest articles on DEV Community by David Corney (@davidcorney4).</description>
    <link>https://dev.to/davidcorney4</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4282243%2F35d55fdf-e1f9-428d-ab07-7cff1655b936.png</url>
      <title>DEV Community: David Corney</title>
      <link>https://dev.to/davidcorney4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davidcorney4"/>
    <language>en</language>
    <item>
      <title>Keep a floor-plan availability map in sync with a Google Sheet, with no OAuth or API keys</title>
      <dc:creator>David Corney</dc:creator>
      <pubDate>Fri, 04 Dec 2026 08:07:48 +0000</pubDate>
      <link>https://dev.to/davidcorney4/keep-a-floor-plan-availability-map-in-sync-with-a-google-sheet-with-no-oauth-or-api-keys-55ga</link>
      <guid>https://dev.to/davidcorney4/keep-a-floor-plan-availability-map-in-sync-with-a-google-sheet-with-no-oauth-or-api-keys-55ga</guid>
      <description>&lt;p&gt;A property project's website needs to show which units are available, reserved or sold. The people who know are in sales, and they live in a spreadsheet. If every status change needs a developer or a WordPress login, the website falls behind.&lt;/p&gt;

&lt;p&gt;Here's a pattern that keeps a WordPress floor-plan map in sync with a Google Sheet, with no Google API, OAuth consent screen or API keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Serve the sheet as a CSV
&lt;/h2&gt;

&lt;p&gt;A Google Sheet can be published as a CSV at a public HTTPS URL (in Sheets: &lt;strong&gt;File → Share → Publish to web&lt;/strong&gt;, then choose the sheet and &lt;strong&gt;Comma-separated values&lt;/strong&gt;). You can also use the &lt;code&gt;.../export?format=csv&lt;/code&gt; form of the sheet URL. Your site can fetch that file with no Google login at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fetch it safely and cache it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Fetch HTTPS only, with a size cap and a timeout. In WordPress, &lt;code&gt;wp_safe_remote_get()&lt;/code&gt; handles the safe-URL part.&lt;/li&gt;
&lt;li&gt;Cache the parsed result in a transient. 15 minutes is a sensible default.&lt;/li&gt;
&lt;li&gt;Refresh on WP-Cron, and add a manual "sync now" button for when sales can't wait.&lt;/li&gt;
&lt;li&gt;Show the last sync time and the last error in the admin, so staff know when it breaks instead of finding out from a customer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Match on a stable key
&lt;/h2&gt;

&lt;p&gt;Give each unit a unique code (for example &lt;code&gt;A-101&lt;/code&gt;) and update status, price, area, rooms and floor by matching on it. Never touch the drawn shape during a sync. That way sales can change data in the sheet without anyone moving polygons on the map.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trade-offs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A published sheet is public to anyone with the link, so keep only data you'd show on the website anyway.&lt;/li&gt;
&lt;li&gt;Sync is cached, not live. For a property site that's usually fine.&lt;/li&gt;
&lt;li&gt;If someone renames a unit code, that row stops matching. Test with a deliberately bad row and make sure the error is visible.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where this came from
&lt;/h2&gt;

&lt;p&gt;I built this into a WordPress plugin called UnitMap: draw clickable unit shapes over a site plan image, colour them by status, and collect enquiries. Disclosure: I'm the developer, the Google Sheet sync is in the Pro version, and Pro isn't on sale yet. I wrote this post with help from an AI assistant and checked it against the plugin.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free version demo (runs in your browser, sample data): &lt;a href="https://playground.wordpress.net/?blueprint-url=https://davidcorney4.github.io/unitmap-demo/blueprint-en.json" rel="noopener noreferrer"&gt;https://playground.wordpress.net/?blueprint-url=https://davidcorney4.github.io/unitmap-demo/blueprint-en.json&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Pro preview: &lt;a href="https://davidcorney4.github.io/unitmap-demo/static-pro-preview/" rel="noopener noreferrer"&gt;https://davidcorney4.github.io/unitmap-demo/static-pro-preview/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Project page and Free zip: &lt;a href="https://davidcorney4.github.io/unitmap-demo/" rel="noopener noreferrer"&gt;https://davidcorney4.github.io/unitmap-demo/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you'd want Pro, email &lt;a href="mailto:davidcorney4@gmail.com"&gt;davidcorney4@gmail.com&lt;/a&gt; with the subject "UnitMap Pro waitlist – devto". I'm also happy to answer questions about the sync approach in the comments.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>webdev</category>
      <category>php</category>
      <category>googlesheets</category>
    </item>
  </channel>
</rss>
