Display all online users in a Slack channel - slack-api

New to slack at the moment - I've looked around to see if there's a Slack command to show all online users in a Slack channel but haven't found any.
Would a custom slack command calling a Slack API method eg. users.getPresence be the way to go or is there another way?

Your best bet would be to first retrieve the list of members within the channel using the Web API method channels.info.
Each channel object will contain a members field containing a collection of user IDs -- those who have joined the channel.
You would then have two options depending on your preferences:
1) Use users.list to retrieve a list of all team members (including each user's presence) and narrow list of users down to those listed in the members field from above.
2) or, you could look up each user from that members field, one at a time using users.info.

Related

Programmatically access Tags in Teams

I am building an application that creates Teams for my training classes and I can Create a Group, make it a team, and then add the required folks to the Members list. I want to be able to differentiate between "students" and "facilitators" for reporting and management.
I have found /api/v1/teams/{0}/memberTags/ but I don't seem to be able to call it directly or find it in the SDK documentation.
Is this API available?
Teams Tags are currently in the Graph beta
https://learn.microsoft.com/en-us/graph/api/resources/teamworktag
Tags provide a flexible way for customers to classify users or groups based on a common attribute within a team. For example, a Nurse or Manager or Designer tag will enable users to reach groups of people in Teams without having to type every single name.
Tags are scoped at the Team level.
When a tag is added, users can #mention it (#tag) in a channel in that team . Everyone who has been assigned that tag will receive a notification just as they would if they were #mentioned individually. Users can also use a tag is to start a new chat with the members of that tag.
No, there’s no API for this now .
Check here to Manage tags in Microsoft Teams app. We will keep you posted once this feature is available through API.

Query to pulled data using Microsoft graph

I never use Microsoft graph. I just want to query to just pull a selection of users by supervisor using Microsoft graph
Run https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/directReports
See reference
Create SPFx to call graph api to get users.
the demo had shared how to search/filter users, to get all users, just remove the filter logic.
https://graph.microsoft.com/v1.0/users?$select=displayName,mail,userPrincipalName
This should work, if you want to get specific user with given email ID. Just change your email ID. The email ID I have given is just an example.
https://graph.microsoft.com/v1.0/users/xyz#mail.com?$select=displayName

Eloqua API - Retrieve a list of contacts based on Security Label

I'm trying to build a dashboard that provides information (aggregates only) about contacts in our Eloqua database, but only those with a specific security label. Is there a way to gather this info using the REST APIs that ELoqua publishes? If not, is it something I can filter on in the Analytics suite?
Unfortunately, the contact security labels are very internal and are not directly available through the api or reporting. A workaround would be to create a shared list for each label, and then add the contact to that list depending on what label they have been assigned, and handle this directly on the label assignment workflow (each time they run through the label assignment workflow, remove them from all shared lists in case their label changes).
You can then access list membership through the API or bring it in as a subject area in OBIEE, filtering on the appropriate lists.

Asana API: organization_exports

How do I get organization ID? I tried this:
https://app.asana.com/api/1.0/organization_exports
But it returns
{"errors":[{"message":"Not Found","help":"For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"}]}
Of course I'm logged in, or use an access token, and other API calls work fine.
My final goal is to make use of the organization ID in https://github.com/Asana/export_importer.
sorry for the delay - the system that was supposed to alert us to your question didn't pick this one up.
The easiest way to get the organization ID is to query our API for your user to see what organizations you're a member of, rather than use the organization_exports endpoint - that's for exporting a full organization data dump for backup or reporting purposes.
If you look at our API documentation for getting your user at app.asana.com/api/1.0/users/me, you'll see that your user record returns a list of workspaces which have ID and name information. This is probably the most straightforward way to get your organization ID from our API.

Eventbrite custom ticket pdf

Is it possible to use event_list_attendees to get the list of attendees and their specific information for the event in order to place it onto my own custom designed ticket graphic/PDF?
For instance, I want to create my own stand alone website that links to my event, have users register/purchase tickets, then from my website via the API, I would send the user a custom email as well as a custom designed ticket specific to my event. On the ticket itself I would want to pull the attendee name and number of tickets ordered, as well as the barcode and the event information.
Yes, that is totally possible. See the page on the Eventbrite API - event_list_attendees
It should give you all the information you need.
Good luck!
You may be interested by Pygmento custom emails & tickets : https://www.pygmento.com/en/blog/eventbrite-custom-tickets-pdf/.
You can use the service customize the confirmation email and pdf ticket using any variable from Eventbrite : given name, surname, ticket class, barcode, or even the user-defined checkout fields.

Resources