Syncing Salesforce and Google Sheets: A Guide for Make.com Users
Hey there, Make.com users! Today, we're going to tackle a common problem many of you might have encountered - syncing data between Salesforce and Google Sheets. Specifically, we're going to discuss how to delete rows in Google Sheets when a corresponding Salesforce record is deleted. So, let's dive right in!
The Problem
When you're storing data from Salesforce in a Google Sheet, creating new data or updating existing data is straightforward. You can easily set up Salesforce outbound messages (webhooks) to create or edit rows in Google Sheets. However, the challenge arises when Salesforce objects are deleted. Salesforce Outbound messages can't be configured to reflect these deletions in Google Sheets. So, how do we solve this?
The Solution
One alternative is to have Make look for all of the IDs stored in the Google Sheet in Salesforce every few hours. If it can't find an ID, we use that ID to find the corresponding row in Google Sheets and delete it. But there's a catch - if Salesforce can't find the ID, then it won't know what ID to use. So, how do we get around this?
Here's a step-by-step guide:
- Create a filter for the next step if the Total Number of Bundles =0 then get the rowid of the Google sheets and delete the row.
- Search for the Google Sheet rows, using the ID from the Salesforce lookup.
- If the Salesforce search didn't find it, it doesn't have an ID, and therefore the Google Search Row doesn't have an ID to look for.
- Change the order of the steps. You need the information in Google sheets to do the query, so you have the row ID from your google sheets and your Salesforce record ID. If the SF Id that you're getting from your Google Sheets row is not found then just delete your google sheets rowid.
Troubleshooting Tips
If you're still having trouble, try adding an array aggregator and an iterator between Google and Salesforce. Saving each record id as its own variable means you can then use them further down the flow.
Conclusion
And there you have it! With these steps, you should be able to sync deletions between Salesforce and Google Sheets. Remember, the key is to use the ID from Google Sheets to query Salesforce, and if the ID is not found, delete the corresponding row in Google Sheets. Happy Making!
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.