README.md 1.84 KB
Newer Older
Robert Speicher's avatar
Robert Speicher committed
1
2
# marketo-tools

Robert Speicher's avatar
Robert Speicher committed
3
4
5
6
7
8
9
10
11
12
13
14
15
This is a simple Sinatra application that receives several web hooks and
forwards the relevant information to Marketo via its REST API.

## Handlers

### Newsletter

```text
GitLab.com Sign-Up -> System Hook -> marketo-tools -> Marketo
```

Receives the `user_create` system hook from GitLab.com and creates or updates a
lead in Marketo.
Robert Speicher's avatar
Robert Speicher committed
16
17
18

This replaces our internal [mailchimp-tools] project.

Robert Speicher's avatar
Robert Speicher committed
19
**Relevant issues:**
Robert Speicher's avatar
Robert Speicher committed
20
21
22
23
24

- [Point webhook from Mailchimp to Marketo](https://gitlab.com/gitlab-com/www-gitlab-com/issues/427)
- [Remove nl-importer.gitlap.com](https://dev.gitlab.org/cookbooks/chef-repo/issues/316)
  (internal)

Robert Speicher's avatar
Robert Speicher committed
25
### Recurly
Robert Speicher's avatar
Robert Speicher committed
26

Robert Speicher's avatar
Robert Speicher committed
27
28
```text
"Buy Now" -> Recurly -> webhooks.io -> marketo-tools -> Marketo
Robert Speicher's avatar
Robert Speicher committed
29
30
```

Robert Speicher's avatar
Robert Speicher committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Receives a Recurly hook (via webhooks.io splitter) and forwards information to
Marketo.

TODO (rspeicher): Expand on information forwarded.

**Relevant issues:**

- [Replace all Wufoo forms with Marketo forms](https://gitlab.com/gitlab-com/www-gitlab-com/issues/422)

## Development

1. Edit the `.env` file to view or change the HTTP Basic Auth credentials and to
   add the Marketo API keys.
1. Start the server:

    ```sh
    bundle install
    bundle exec rackup -p 4567
    ```

Robert Speicher's avatar
Robert Speicher committed
51
52
## Deployment

Robert Speicher's avatar
Robert Speicher committed
53
This project stores HTTP Basic Auth credentials and Marketo API keys in the
Robert Speicher's avatar
Robert Speicher committed
54
55
environment variables, using [Dotenv]. The default values should be overridden
in a `.env.production` file for deployment.
Robert Speicher's avatar
Robert Speicher committed
56

57
58
59
The required values are in the [marketo-tools secrets](https://gitlab.1password.com/vaults/medb67sd6uwuzzv66nobz2hjxq/allitems/c7f6rvguqfal5ep4xgol5vjsfa)
login in the **DevOps** vault in 1Password.

Robert Speicher's avatar
Robert Speicher committed
60
61
62
63
64
65
## License

Copyright © 2015 GitLab, Inc. It is free software, and may be redistributed
under terms specified in the [`LICENSE`](LICENSE) file.

[mailchimp-tools]: https://dev.gitlab.org/gitlab/mailchimp-tools
Robert Speicher's avatar
Robert Speicher committed
66
[Dotenv]: https://github.com/bkeepers/dotenv