jupyter-naas / awesome-notebooks

A powerful data & AI notebook templates catalog: prompts, plugins, models, workflow automation, analytics, code snippets - following the IMO framework to be searchable and reusable in any context.
https://naas.ai/search
BSD 3-Clause "New" or "Revised" License
2.7k stars 454 forks source link

Typeform - Add new Slack user from Typeform #433

Open Dr0p42 opened 2 years ago

Dr0p42 commented 2 years ago
Naas

Typeform - Add new Slack user from Typeform

Tags: #typeform #slack #operations #automation

Author: Firstname Lastname

With this notebook, you create new Slack users from Typeform submissions.
References :

Input

Import libraries

import naas
... Typeform
... Slack

Setup Typeform

TYPEFORM_ACCESS_TOKEN = "<TYPEFORM_ACCESS_TOKEN>"

# Unique ID for the form. Find in your form URL.
# For example, in the URL "<https://mysite.typeform.com/to/u6nXL7>" the
# form_id is u6nXL7.
FORM_ID = "<FORM_ID>"

typeform = Typeform(TYPEFORM_ACCESS_TOKEN)

Setup Slack

# Token
SLACK_TOKEN = "xoxb-232887839156-1673274923699-vTF6xxxxxxxxxx"

Setup Naas

# Schedule your notebook every 15 minutes.
naas.scheduler.add(cron="*/15 * * * *")

#-> Uncomment the line below to remove your scheduler
# naas.scheduler.delete()

Model

Get data from Typeform

# Get form responses
# <https://developer.typeform.com/responses/reference/retrieve-responses/>

Send slack invite

def send_slack_invite(email):
    ...

Output

Process all responses and output invites.

for response in typeform_responses:
    user_email = response....email
    send_slack_invite(user_email)

    print(f'✅ Invite sent for {user_email}')
Dr0p42 commented 2 years ago

🚀 Branch and template have been created and pushed.

You should work on:

raiharshit47 commented 2 years ago

Hey @Dr0p42 I would like to work on this, can you please provide some resources so that I can get an idea on how to do this

Dr0p42 commented 2 years ago

👋 Hello @raiharshit47, I added some missing links in the notebook here https://github.com/jupyter-naas/awesome-notebooks/blob/433-typeform-add-new-slack-user-from-typeform-/Typeform/Typeform_Add_New_Slack_User_From_Typeform.ipynb

image

It should help you getting started :) Let me know if this helps 🙏

jravenel commented 2 years ago

Hi @raiharshit47 putting it back to Todo, let us know if can help, co-build this with you, or if we should proceed and do it.

raiharshit47 commented 2 years ago

Yes please proceed with it, as I am a little preoccupied these days

Thank you

On Tue, May 10, 2022, 9:37 PM Jeremy Ravenel @.***> wrote:

Hi @raiharshit47 https://github.com/raiharshit47 putting it back to backlog, let us know if can help, co-build this with you, or if we should proceed and do it.

— Reply to this email directly, view it on GitHub https://github.com/jupyter-naas/awesome-notebooks/issues/433#issuecomment-1122596842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVV6RLBIDBWGBQC3Y6JLUX3VJKCTDANCNFSM5SFWLDXA . You are receiving this because you were mentioned.Message ID: @.***>

jravenel commented 2 years ago

Oh, hope it's alright. If I can help in any way please me know jeremy@naas.ai