title | author | date |
---|---|---|
Set Up ERPnext Zapier App on Ubuntu 18.04 |
Raffael Meyer, ALYF Consulting, <[email protected]> |
\today |
Software | Version |
---|---|
Ubuntu | 18.04.2 |
NodeJS | 8.10.0 |
zapier-platform-cli | 8.0.1 |
zapier-platform-core | 7.4.0 |
ERPNext | v11.1.21 |
Frappe | v11.1.22 |
docker run -it ubuntu:latest
apt update
apt install git
apt install nodejs npm
npm install -g zapier-platform-cli
npm install zapier-platform-core
zapier login
git clone https://github.com/alyf-de/erpnext-zapier.git
cd erpnext-zapier
npm install
zapier push
We'll assume that your ERPNext instance is hosted at https://my-company.alyf.de.
Open ERPNext, create new Social Login Keys:
- Provider: Frappe
- Client ID, Client Secret: random
- Base URL: https://alyf.de
The Base URL you enter into ERPNext has to be your Second-Level-Domain (for example, https://alyf.de), even if your ERPNext runs under a subdomain (for example, https://my-company.alyf.de).
Get your app's Redirect URI from Zapier:
zapier describe
-------------------------------------------------------------------------------------
| Authentication
|
| Type oauth2
| Redirect URI https://zapier.com/dashboard/auth/oauth/return/App17218CLIAPI/
-------------------------------------------------------------------------------------
In ERPNext, create a new OAuth Client with Redirect URI from above as Redirect URIs and Default Redirect URI. Save and copy the Client ID.
Run these commands to put your configuration into the apps environment. Remember to replace the values at the end of each line (f9a3905f4c
, ds8fd8vc5xx
, https://my-company.alyf.de
) with the actual values for your instance.
zapier env 0.0.2 CLIENT_ID f9a3905f4c
zapier env 0.0.2 CLIENT_SECRET ds8fd8vc5xx
zapier env 0.0.2 BASE_URL https://my-company.alyf.de
Notice that the Base URL for zapier is the actual URL of your ERPNext server, NOT your Second-Level-Domain.
Log into Zapier and create a new Zap. In the Choose Account step of your new Zap you should be able to authenticate with ERPNext and successfully Test your credentials.