• Hi. I am trying to achieve an automation between Google Sheets and my website (FTP) so that my client would be able to change the appearance of the pages through the sheets, without having to log in to the WP admin.

    On this Google Sheets (https://docs.google.com/spreadsheets/d/1vhjbR6K_mwhxs-ocrE8zosrmAgefYvcos3hloahANlk/edit?usp=sharing), on the “Final Code” tab, on the cell A2, I have a collection of CSS code.

    Each time that the document is updated, I needed to export the code on that A2 cell into a document called “style.css”, and then, send it to my FTP Account, where it would replace the old file with the same name.

    Do you have any idea of how to achieve this? I was looking into tools like Integromat but still couldn’t find a way.

    Thanks in advance!

    • This topic was modified 3 years, 7 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    What’s feasible depends on the Sheets API. Google has documentation on this, and I believe there’s a support forum for it as well. Ideally there’d be some way to get Sheets to push a HTMLS request to a specific URL on your server any time that sheet is updated. If not, you could have your code periodically check for updates via WP Cron.

    Since PHP can write to files directly, you don’t need to go through FTP. Your code would get the CSS through the Sheets API, then simply overwrite the file on the server.

Viewing 1 replies (of 1 total)
  • The topic ‘Updating style.css through Google Sheets’ is closed to new replies.