Daily Sendcloud returns log with Slack alerts on return reasons
Every morning this flow adds new Sendcloud returns to a Google Sheets log, counts reasons over 7 days, and posts to Slack when one reason crosses your threshold.
The prompt
Every morning, pull our returns from Sendcloud and add any new ones to the returns log in Google Sheets, with the return ID, date, status, reason, both parcel numbers and the refund details. Then count the return reasons over the last 7 days. When one reason reaches 5 returns, post it to our Slack channel so product and packaging can look at it.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works
What each step does
- Pull returns from Sendcloud Gets the latest 100 returns from your Sendcloud account.
- Read the returns log Reads the rows already in your returns log in Google Sheets.
- Pick out new returns Keeps only the returns whose ID is not in the log yet and lays each one out as a row: ID, date, status, reason, outbound and return parcel, and refund details.
- Any new returns? When nothing new came in, the flow skips straight to counting.
- Add them to the returns log Appends the new returns to the log in Google Sheets.
- Count return reasons this week Counts returns by reason over the last 7 days and picks out any reason that just reached the alert threshold.
- Reason over the threshold? Goes on to Slack only when a reason crossed the line today, so the same pattern doesn't post every morning.
- Alert the team in Slack Posts each reason that crossed the threshold with its 7-day count, and points the team to the log for the parcels behind it.
Before you turn it on
- Enter your Sendcloud public key and secret key, and connect your Google Sheets and Slack accounts.
- Make a returns log spreadsheet whose first sheet has these column headers: Return ID, Created, Status, Reason, Outbound parcel, Return parcel, Refund. Paste its URL into the flow setting Returns log spreadsheet.
- Change the flow setting Alert threshold if 5 returns with one reason in 7 days is not the right line for you.
- Pick your Slack channel in Alert the team in Slack, and schedule the flow to run once a day in the morning.