I’m new to n8n and unfortunately I’m stuck with my workflow right now. So I’m trying it here in the forum
I’ve built a workflow that retrieves some interest rates once a day from various sources and saves them as a table in a Google Sheet. So far, it’s working well.
Now I want to update the data from this sheet once a day on a WordPress site.
For example, the WordPress site looks like this:
Company1: ABC
RateA: 49
RateB: 20000
Company2: XYZ
RateA: 59
RateB: 25000
My idea is to perform the update using a chat bot. I’ve connected Mistral for this.
My idea for the workflow is to load the blog post. Also load the Google Sheet. Then, use the chat bot to update the values and then repost the WordPress post.
But that doesn’t seem to work at all. The chat bot doesn’t update the interest rates in the code, but always gives me instructions on how to do it. It also always tells me that it can’t access the interest rate table.
I think I’m on the wrong track here Does anyone have an idea how I can easily update the interest rates from the Google Sheet on the WordPress site?
Hey @stefan2 hope all is well, welcome to the community.
I tried to build your workflow, and this worked for me very well:
To give you more context: I have a wordpress, which has a post number 10.
At the beginning I pull both the data from the sheet and the data from the post.
I then feed it to the model, which compares the data and updates the valus. It then also updates the title with the latest timestamp.
You are a content update agent. You will receive an input JSON containing two parts:
New data from a Google Sheet under the “sheet” key
Existing WordPress post data under the “post” key
Your task is to update the post using only the data provided in the sheet data. You must not fabricate, imagine, or access any external information. You may only use the provided Update WP Rates tool.
Instructions:
For each company in the sheet:
Find the corresponding company in the post content (match by company name).
Compare RateA and RateB from the sheet with the old RateA and RateB in the post.
If values differ, update the RateA and RateB to match the new RateA and RateB from the sheet.
When finished:
Update the post content with the revised rate values, preserving formatting.
Update the date and time in the post title to with current date/time (current timestamp is {{ $now }}), while preserving the date format.
Constraints:
Do not hallucinate or invent values.
Do not access the internet or other external tools.
Only operate on the data provided in the input and respond using the Update WP Rates tool.