Actions are activities that can be taken on a Pub. Actions are configured on specific Stages via the Actions tab of the Stage Editor sidebar. Actions can be triggered manually (by an Administrator on a specific Pub) or automatically (by a Rule on any Pub in that Stage). Actions can be triggered manually via the Actions tab of the Stage Editor,
Currently, there are three Actions available in PubPub Platform:
- email: Send an email to one or more users
- http (alpha): Make an arbitrary HTTP request
- move: Move a Pub to a different stage
Users can add an action to a stage by selecting Add an action in the Actions tab of the Stages sidebar and selecting from the pop up list.
Once an action has been added, it will appear in the Actions tab for configuration.
Configuring Actions via the Actions Tab
Once added, Actions appear in the Actions tab for configuration. Each Action has unique configuration requirements to run successfully. Actions can be configured by selecting the pencil icon from the Action card. Once all configurations are updated, select Update config. A pop-up at the bottom of the screen saying “Action updated successfully!”.
All Actions can also be renamed for specificity in the top text box. To delete an Action, select Remove.
email:
- Recipient email address (required): If the email address is registered with a member of your Community, their name and email will appear. If not found, the email can be added as a user to your community from this step. You can also select a Pubfield for the recipient email address by selecting the + button next to the Recipient email address. An additional box will appear, in which a user can select any of the fields with a MemberId schema from the Community. If a Pubfield is selected, the email will be sent to the corresponding member's email address.
- Email subject (required): The subject of the email. This textbox accepts Tokens.
- Email body (optional): The body text of the email. This textbox accepts Markdown and Tokens.
More Information
Visit the Tokens page for learning more about Tokens and how to use them in the Email action.
http (alpha):
- URL (required): The URL to send the request to
- Method (required): HTTP method to use. Defaults to GET
- Bearer token (optional): will put as “Authorization: Bearer <token>”,
- Response (optional): expected type to return. Can select options for json, text, binary; defaults to json.
- Output Map (optional): If retrieving information via the API request to map to a specific Pub field, this dropdown menu allows users to map the response field to the specified pub fields.
move:
-
Destination stage (required): The designated destination stage for the Pub being moved. This takes a stage ID, which can be found in the URL of the Stage via the Workflow Manager
Configuring Rules
Rules allow for further configuration of an Action, letting users trigger an Action on specific Events automatically. Add a new Rule by selecting Add a rule from the tab in the sidebar.
Rules require two components for configuring - actions and events. Select an action and an event to trigger it from the list below.
- Action: This drop down menu will contain any of the actions available for the stage.
-
Event: This drop down menu determines when the action will be triggered. Currently, events can be when “a pub enters this stage”, “a pub leaves this stage”, and “a pub stays in this stage for…"
- When “a pub stays in this stage for…” is selected, additional configuration is required for Duration (can type directly in the box or use the up-down arrows to the right) and Interval (minute, hour, day, week, month, year)