Best answer

One zap to handle 50 paths

  • 18 March 2021
  • 9 replies
  • 65 views

Userlevel 2
Badge

I have a zap use case where I need one action that can be done on 50 states regardless of the state, but then send slack message to the specific state channel which right now is requiring that I make 50 zap flows because paths only allows for 3 max. This is killing my total zap allotment each month and becoming costly

Anyone have ideas on how I could create an action that would send to the proper slack channel based on which state the previous action was sent in?

icon

Best answer by ForYourIT 18 March 2021, 19:45

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

9 replies

Userlevel 7
Badge +7

@chrisfinck You could do this a lot more efficiently. Try using an Airtable or Google Sheet with values for each state. It would look like:

→ Get the state from somewhere

→ Lookup the state in Airtable/Sheet

→ Extract the channel from that record

→ Send a message to the extracted channel

 

Hope this helps you. Let me know if I can help you otherwise.
~Bjorn

Userlevel 2
Badge

@chrisfinck You could do this a lot more efficiently. Try using an Airtable or Google Sheet with values for each state. It would look like:

→ Get the state from somewhere

→ Lookup the state in Airtable/Sheet

→ Extract the channel from that record

→ Send a message to the extracted channel

 

Hope this helps you. Let me know if I can help you otherwise.
~Bjorn

Ok I see on the slack send channel message I can use the custom tab to dynamically select the channel, but does that mean I need to create an airtable that has the city/state and specific slack channel ID to send to? 

Userlevel 2
Badge

@chrisfinck You could do this a lot more efficiently. Try using an Airtable or Google Sheet with values for each state. It would look like:

→ Get the state from somewhere

→ Lookup the state in Airtable/Sheet

→ Extract the channel from that record

→ Send a message to the extracted channel

 

Hope this helps you. Let me know if I can help you otherwise.
~Bjorn

Ok I see on the slack send channel message I can use the custom tab to dynamically select the channel, but does that mean I need to create an airtable that has the city/state and specific slack channel ID to send to? 

Figured it out, I made a new column in airtable that did 50 if statements to match against the records city/state and then spit out the specific slack channel ID I needed.

Userlevel 7
Badge +7

@chrisfinck You could do this a lot more efficiently. Try using an Airtable or Google Sheet with values for each state. It would look like:

→ Get the state from somewhere

→ Lookup the state in Airtable/Sheet

→ Extract the channel from that record

→ Send a message to the extracted channel

 

Hope this helps you. Let me know if I can help you otherwise.
~Bjorn

Ok I see on the slack send channel message I can use the custom tab to dynamically select the channel, but does that mean I need to create an airtable that has the city/state and specific slack channel ID to send to? 

Figured it out, I made a new column in airtable that did 50 if statements to match against the records city/state and then spit out the specific slack channel ID I needed.

Exactly what I meant! Good to see you got it solved ;)

Userlevel 4
Badge +3

@chrisfinck - another way you could try (which probably would require one less step) is through a Zapier Lookup Table:

Your key would be the states and the value would be the slack channel

 

@laurie - would you know if there is a max amount of keys for a lookup table? 

Userlevel 2
Badge

@chrisfinck - another way you could try (which probably would require one less step) is through a Zapier Lookup Table:

Your key would be the states and the value would be the slack channel

 

@laurie - would you know if there is a max amount of keys for a lookup table? 

I like this method because I would not have to create new airtables, but I cannot find Utilities or Lookup Table as an action, has it been rebranded as Storage?

Userlevel 4
Badge +3

@chrisfinck, it’s part of the formatter:

 

Userlevel 4
Badge

@MarijnVerdult  There isn’t an official maximum number of keys, but I find that anything over 20 tends to be a little harder to maintain. However, you can fake a lookup table with Google Sheets. If you set column A to be your ‘key’ column and column B to be your ‘value’ column and use a Lookup Spreadsheet Row action instead of a Formatter step, it will work the exact same way. That would also make it a little easier to import large amounts of text so you could go even higher than 50 if needed.

 

@chrisfinck This would let your workflow work a bit better - so your column A in the Google Sheet would be the name of the state coming from your trigger step and column B would be the corresponding channel for that state. The lookup step would match the state name with the state channel, and you’d output that into your Slack step.

Userlevel 2
Badge

@MarijnVerdult  There isn’t an official maximum number of keys, but I find that anything over 20 tends to be a little harder to maintain. However, you can fake a lookup table with Google Sheets. If you set column A to be your ‘key’ column and column B to be your ‘value’ column and use a Lookup Spreadsheet Row action instead of a Formatter step, it will work the exact same way. That would also make it a little easier to import large amounts of text so you could go even higher than 50 if needed.

 

@chrisfinck This would let your workflow work a bit better - so your column A in the Google Sheet would be the name of the state coming from your trigger step and column B would be the corresponding channel for that state. The lookup step would match the state name with the state channel, and you’d output that into your Slack step.

Thanks im already doing that same concept in airtable so i will stick with it as currently works :)