Skip to content

When a new user signs up in your application, add new or update their information in Pipedrive. Create an opportunity in Pipedrive and send an internal slack message with custom rules based on whether the new user is already a pipedrive contact.

Notifications You must be signed in to change notification settings

zenaton-samples/pipedrive-slack

Repository files navigation

New user synch with Pipedrive (CRM) and Slack

A workflow that updates Pipedrive (CRM) when a new user signs up and notifies the internal team via slack. If the user is an existing lead info is updated in Pipedrive, otherwise a new deal is created and a reminder sent to the team 2 days later to follow up.

Development

The boot.js file is where you tell the Zenaton Agent where to find - by name - the source code of your tasks and workflows.

If you add a task or a workflow to your project, do not forget to update the boot.js file.

Look at Zenaton documentation to learn how to implement workflows and tasks.

Run

Requirements

A Zenaton account.

This example project uses Pipedrive API to sync your user data and Slack API to send a notification.

Before getting starting, make sure you have a Slack Incomming Webhook URL available to send the Slack notification. If you don't have one yet, you can read the dedicated Slack documentation to set up one.

You will also need a Pipedrive API key. If you don't have one yet, you can sign-in to your Pipedrive account and get an API token here.

Starting the workflow

You can dispatch the workflows by name from within your application using Zenaton API. They will be processed as soon as you run this project.

Note: Workflows are dispatched in an environment (AppEnv) of your Zenaton application (AppId). They will be processed by this project, if you set it up with the same AppId and AppEnv. You must also provide an Api Token to authorize access to this application (found at https://app.zenaton.com/api)

Run Locally

First, install dependencies:

npm install

Then, fill-in the environment variables referenced in the .env file.

Install a Zenaton Agent:

curl https://install.zenaton.com | sh

and run it:

zenaton listen --boot=boot.js

Run on Heroku

Follow this button Deploy, then fill in the env variables and click "deploy".

Run in Docker

Create your .env file

cp -n .env.sample .env

and fill-in the environment variables referenced in the .env file.

Then start your container:

cd docker && docker-compose up

Run on your hosting solution

Check our documentation for more options (AWS, Google Cloud, Clever Cloud ...)

Checking that your project is running

Whatever your installation method, you should see that a new Agent is listening from this url: https://app.zenaton.com/agents. If you do not see it, please check again that you have selected the right application and environment.

Dispatching Tasks and Workflows

Using Zenaton API

The workflows can be dispatched by name from within your application using the Zenaton API or our Node.js SDK.

You can test it from your command line interface:

Dispatching a PipedriveSync workflow:

curl --request POST \
  --url https://gateway.zenaton.com/graphql \
  --header 'authorization: Bearer <API_TOKEN>' \
  --header 'content-type: application/json' \
  --data '{"query":"mutation($input: DispatchWorkflowInput!) {\n  dispatchWorkflow(input: $input) {\n    id\n  }\n}\n ","variables":{"input":{"appId":"<APP_ID>","environment":"dev","name":"PipedriveSync","input":"[{\"name\": \"John Cibot\", \"email\": \"[email protected]\", \"org_name\": \"Piedpiper\"}]"}}}'

Do not forget to replace <APP_ID> and <API_TOKEN> by your Zenaton AppId and api token.

Workflow Processing

Check your Zenaton dashboard (if you do not see your dispatched tasks or workflows, please check that you have selected the right application and environment).

About

When a new user signs up in your application, add new or update their information in Pipedrive. Create an opportunity in Pipedrive and send an internal slack message with custom rules based on whether the new user is already a pipedrive contact.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published