Adding users to a slack workspace based on a google form submission

Hi there,

I help run an online community, climateAction.tech (it’s a slack of about 5k people now), and we’re looking at n8n for automating a bunch of manual tasks we do each week. I was hoping some kind soul here might be able to give me some pointers as I get to grips with n8n.

Every week we do a batch import of users who have requested to join and filled out this form at the link below:

And every week one of us takes the new people rows in a spreadsheet, and then adds them to mailchimp and adds them to slack, so they’re batched in a weekly cohort.

It’s important for us to have the weekly batching, as it lets us experiment with new onboarding few members each week.

How to automate this and get the time back each week

I think these can be automated with n8n, but I’m not sure - I’ll share what I’ve seen in the docs so far, and I’d appreciate pointers if there’s something I missed.

Getting the data from a google spreadsheets submission

I think I can hook into a google spreadsheet ‘append row’ event:

It looks like I could plausibly do something to query for all rows between two dates as well. If I can’t do that natively inside n8n, writing some custom code to do the date math for it doesn’t that difficult.

Getting the email into mailchomp

I’ve seen this automation here for mailchimp - that makes me think I could add the email address from the form submissions:

Getting the users into slack

I’m less confident about adding users in bulk via slack, or even piecemail for that matter.

Is there API support for adding an indivudual user based on their email address, or would this have to be a manual step we need to keep?

I’m happy to write a blog post about what we learned along the way, as I’m really impressed with n8n so far.

Thanks

Hey @mrchrisadams!

Welcome to the community :sparkling_heart:

There are multiple ways that you can handle this!

  1. You can use polling to fetch the data from the Google Sheets (where you store the signup information), and add them to Slack/Mailchimp. You can read more about polling here: Creating triggers for n8n workflows using polling ⏲
  2. You can use App script to write a function that sends the new entry to a webhook URL. Inside n8n, you can use the Webhook node to trigger the workflow.

The former method can be triggered every week if you like, while the latter will execute the workflows immediately.

I think I can hook into a google spreadsheet ‘append row’ event

This operation will append new data to the Google Sheet, while you want to receive the information from the sheet. You will have to use the Read operation. The blog post linked above provides more information on how you can do this for polling.

Getting the email into mailchimp

You can add the email address to Mailchimp as well. This can be handled in the same workflow.

Getting the users into slack

This can be a bit tricky. On a quick search, I found out that only paid accounts have access to the API endpoint (Ref: SLACK: Is it possible to invite users to a workspace via api? - Stack Overflow).

If you have a paid workspace, you can use the HTTP Request node to access the endpoint (admin.users.invite method | Slack) and add user via their email.

I hope this helps :slight_smile:

1 Like