Automation based on user sign ups


#1

Hi there,

I’m curious if there’s any sort of API in Discourse to automate an event when a user signs up. We’d like to add all of our sign ups to Salesforce so we can track their actions more easily. After looking through the API documentation, there didn’t seem to be a way to initiate something when a new user is added - only to pull a list of recently added users. Thought I would ask just in case.

Thanks!


(Vinoth Kannan) #2

May be you can use WebHooks or DiscourseEvent to achieve.


#3

Webhooks would be the way to go. Its also made easier by using something like Zapier if need be which hooks into salesforce already.

You can trigger the webhooks to work based on user creation, edit etc so that it updates/creates a new record in salesforce.


(Anton) #4

Anyone else here might be interested in Discourse / Salesforce integration?


#5

I saw in the various Webhook threads that you kept asking about setting up the webhook so that email would be included in the payload. Did you ever receive an answer or figure out how to do it?


#6

I believe that @fantasticfears has sorted that within this pull request which is awaiting merging.


#7

Email address isn’t available in the payload when a new user is created. We are also trying to create/sync data to Salesforce based on certain events using Zapier.

This is the payload from a new member signup:

post__hidden:
False
post__staff:
True
post__can_unaccept_answer:
False
post__display_username:
discobot
post__version:
1
post__cooked:
<p>Thanks for joining Infusionsoft Community, and welcome!</p>

<ul>
<li><p>I’m only a robot, but <a href="/about">our friendly staff</a> are also here to help if you need to reach a person.</p></li>
<li><p>For safety reasons, we temporarily limit what new users can do. You’ll gain new abilities (and <a href="/badges">badges</a>) as we get to know you.</p></li>
<li><p>We believe in <a href="/guidelines">civilized community behavior</a> at all times.</p></li>
</ul>

<p>If you’d like to learn more, select <img src="/images/font-awesome-ellipsis.png" width="16" height="16"> below  and <img src="/images/font-awesome-bookmark.png" width="16" height="16"> <strong>bookmark this private message</strong>.  If you do, there may be a <img src="/images/emoji/emoji_one/gift.png?v=3" title=":gift:" class="emoji" alt=":gift:"> in your future!</p>
post__reads:
1
post__can_accept_answer:
False
post__reply_count:
0
post__actions_summary:
can_act: True
id: 2

can_act: True
id: 3

can_act: True
id: 4

can_act: True
hidden: True
id: 5

can_act: True
id: 6

can_act: True
id: 7

can_act: True
id: 8
post__created_at:
2017-06-07T23:01:36.566Z
post__post_type:
1
post__yours:
False
post__moderator:
False
post__updated_at:
2017-06-07T23:01:36.566Z
post__avatar_template:
/user_avatar/community.infusionsoft.com/discobot/{size}/203_1.png
post__post_number:
1
post__score:
0
post__username:
discobot
post__user_created_at:
2017-05-05T01:58:58.768Z
post__name:
discobot
post__wiki:
False
post__topic_title:
:robot: Greetings!
post__admin:
True
post__accepted_answer:
False
post__user_deleted:
False
post__user_id:
-2
post__can_view_edit_history:
True
post__topic_id:
716
post__incoming_link_count:
0
post__id:
1514
post__quote_count:
0
post__trust_level:
4
post__topic_slug:
robot-greetings
Fields with no value:
post__primary_group_flair_bg_color
post__primary_group_flair_color
post__reply_to_post_number
post__user_title
post__user_date_of_birth
post__deleted_at
post__avg_time
post__primary_group_name
post__primary_group_flair_url
post__edit_reason
post__hidden_reason_id