Webhooks are great right? They let you pass information where you need them and then you can use them when you need to use them. Sounds perfect! There can come a time however when you have a webhook built into a script which you want to be able to do multiple different things. Multiple different things with the same webhook becomes difficult if you are not passing a lot of data.
This problem occurred to me. I have a python script which when executed passed a webhook to a URL after every loop through. The webhook will then pass a URL which I then want to search in a CRM system and change the stage of a deal. The issue is, some of the URLs are in the first stage and some in the 2nd and 3rd.. etc. How does one solve this?
With a master hook that is how! The python script will pass the data to one webhook. This will then go into zapier and that is where the magic happens;
Webhook arrives (trigger in Zapier)
find the URL in the CRM to find the deal
with this found, you can see what stage that deal is. Each stage has an ID
Create 4 fresh webhook zaps and note the URL of the webhooks
Create a google sheet with the 4 webhook URLs, in the same row, add the id of each stage
In the master hook zap, add a stage to search this google sheet for the stage id.
Finally push a webhook out and build the url with <webhook url>+<google sheet info>+<url data in step 1>
Hey presto, you have successfully filtered the webhooks to where they need to go.
What can I do now?
Now that you have each of these webhooks receiving based on the master hook zap – you can build the zaps you need for each. The Stage 1 zap can now push the deal to stage 2 and mark an activity as done. The stage 2 zap can now push the deal to stage 3 and mark an activity as done etc etc.
This is a fairly powerful workflow as it let’s you create a bunch of custom actions based off a single webhook. It takes a bit of time and patience to set up correctly and for a noob like me, dealing with webhooks is something completely new but I am starting to realize the potential now.
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
Selling on Etsy is fairly difficult. If you manage to get some traction then you will find that more sales will likely follow. I started to sell a few things on Etsy to just try to understand the market and dip my toes into some ecommerce. It all started like all good things start… out shopping!
I was walking around Bangkok and figured to go into one of the shopping malls for the air conditioning and shelter from the sweltering weather. I didn’t really have any plans to buy anything and I think this frame of mind is very much the definition of mooching. I was mooching around and noticed there was a handicraft market going on in the middle of the shopping mall and decided to take a closer look.
Pretty standard stuff but one thing in particular caught my eye – a stall selling handmade natural wood business card holders. I always see these guys at networking events with these metal card holders so figured I could probably make use of one. Purchase made, I went home and decided to research the guys who made them. They had a whole line of products and some of them were pretty cool. I figured, I could probably sell the stuff on Etsy as it was handmade and just work as a middle man connecting the Thai seller with the European, US and Australian buyers. Fast forward 3 months, and the first sale happened.
That was cool! I can now see when an order comes in but I still need to manually go to Etsy, find out what it is and then message the guys to fulfill it. The deal I made was to not touch any goods, I hate the word but effectively dropship the items where I provide the item quantity and the address, they provide me the bill and everyone is happy.
Turns out even this takes more time than I wanted to spend… how do you automate this so that I can literally click a button and have it taken care of?
Email Parsing comes to the rescue!
An email parser is something that looks at your email and looks for patterns within it, it then will extract certain pieces of text / data which you can then feed into other applications you may want to use. I figured that the important bits of text from an Etsy order confirmation were the following;
Now I had all the fields I needed there was just one more problem. The makers of the products had somewhat standard names for them. I obviously had tried to make them sound more appealing playing on alliteration and other techniques. I couldn’t just send them the product name that I had and expect them to fulfill it. How would I go about fixing this? Time to get automatic. Let’s head to Zapier.
Automating the Data
Before creating a Zap (process in Zapier). I like to try and envisage it in my head and write it down if possible. What we want to be able to do here is the following;
Only process on emails matching the Etsy confirmation style – easily achieved with a filter.
Send the email to the parser – simple with the Parseur application.
Take the parsed text and feed the product into a database to find the matching text – could use Google Sheets for this but I used Airtable.
When the matching field is found, find the other field in the row which is the name the maker gave the product.
Compose an email to the maker with the Order ID in the title and ‘New Order Received – ID’ in the subject and giving the order details in the body with the quantity.
Compose an email to the buyer thanking them for the order and letting them know that we have many other products for sale and if they did want more they would save on shipping (the upsell).
Add the customer email to a list – mailchimp or google sheet works here.
Send a message in Slack to provide basic details on the price and items that have been ordered – this just ensures that I see it from the Slack command center.
Issues to overcome
Parseur which is the email parsing product I use have a table parsing feature. This will identify a table and parse all data within it. This means if someone orders 1 item, it will parse the information for the 1 item, if 2 or 3, you will still get the items parsed. The problem with this is that it is hard to feed it into Zapier with the lookup database workflow to get the real names if you don’t know how many items are going to appear each time. This led us to not using this feature in the parser. So how did we solve it?
Parseur doesn’t put a limit on the amount of email addresses you can use for parsing. I simply created an inbox for 1 item and an inbox for 2 items and so on. It is rare that someone orders more than 4 different items from us, so setting up these 4 inboxes covered 100% of the orders. Now this does mean that you actually have to set up individual zaps in Zapier for each of these to run correctly and you will need to manually trigger the process by looking in the email for how many items before sending it to the right inbox.. this is a small price to pay for the freedom it allows though!